Re: RFC: Devices for files and partitions

2021-07-08 Thread Heinrich Schuchardt
On 7/9/21 4:44 AM, AKASHI Takahiro wrote: On Tue, Jul 06, 2021 at 05:05:19PM -0600, Simon Glass wrote: Hi, At present U-Boot avoids the concept of 'opening' a file. Being in a bootloader environment, it is normally better to take the action immediately and avoid any caching, for example, since

Please pull u-boot-marvell/master

2021-07-08 Thread Stefan Roese
Hi Tom, please pull the first batch of Marvell MVEBU related patches. Here the summary log: - Support higher baudrates on Armada 3720 UART (Pali & Marek) - OcteonTX: do not require cavium BDK node to be present (Tim)

Re: [PATCH] octeontx: do not require cavium BDK node to be present

2021-07-08 Thread Stefan Roese
On 18.06.21 01:31, Tim Harvey wrote: The cavium,bdk node is a non-standard dt node used by the BDK and therefore it is removed from the dt before booting Linux. Do not require this node to exist as it won't for standard dt's. Signed-off-by: Tim Harvey Applied to u-boot-marvell/master

Re: [PATCH u-boot-marvell 0/5] Support higher baudrates on Armada 3720 UART

2021-07-08 Thread Stefan Roese
On 25.05.21 19:42, Marek Behún wrote: This series adds support for more baudrates on Armada 3720 UART (up to 6 MBaud). Marek Behún (1): clk: armada-37xx: Set DM_FLAG_PRE_RELOC Pali Rohár (4): serial: a37xx: Fix parent clock rate value and divider calculation serial: a37xx: Use TBG as

Re: [PATCH u-boot-mvebu 22/31] arm: mvebu: Always use BootROM for loading the rest of U-Boot's binary

2021-07-08 Thread Baruch Siach
Hi Marek, Pali, On Thu, Jul 08 2021, Marek Behún wrote: > From: Pali Rohár > > Now that proper load and execution addresses are set in v1 kwbimage, we > can use BootROM to continue loading main U-Boot binary instead of > U-Boot's SPL code. > > This also reduces the size of U-Boot's SPL image. >

[U-boot-SPL] issue with loading fitImage in SPL falcon mode.

2021-07-08 Thread Abder
Hi everyone, I'm trying to implement the SPL falcon mode on an embedded board based on the IMX6 SoC. I have succeeded recently in implementing it for a legacy Image and now i'm trying to implement it for a fitImage... after setting the appropriate configs, when I try now to boot with a fitImage

Re: [PATCH v2 2/3] phy: Add driver for ST-Ericsson AB8500 USB PHY

2021-07-08 Thread Jaehoon Chung
On 7/9/21 3:33 AM, Stephan Gerhold wrote: > The AB8500 PMIC contains an USB PHY that needs to be set up in > device or host mode to make USB work properly. Add a simple driver > for the generic PHY uclass that allows enabling it. > > The if (CONFIG_IS_ENABLED(USB_MUSB_HOST)) might be a bit

Re: [PATCH v2 1/3] power: pmic: Add driver for ST-Ericsson AB8500 via PRCMU

2021-07-08 Thread Jaehoon Chung
On 7/9/21 3:33 AM, Stephan Gerhold wrote: > All devices based on ST-Ericsson Ux500 use a PMIC similar to AB8500 > (Analog Baseband). There is AB8500, AB8505, AB9540 and AB8540 > although in practice only AB8500 and AB8505 are relevant since the > platforms with AB9540 and AB8540 were cancelled and

Re: [PATCH 4/5] efi_loader: add ExitBootServices() measurement

2021-07-08 Thread Masahisa Kojima
On Fri, 9 Jul 2021 at 02:40, Heinrich Schuchardt wrote: > > On 7/7/21 3:36 PM, Masahisa Kojima wrote: > > TCG PC Client PFP spec requires to measure > > "Exit Boot Services Invocation" if ExitBootServices() is invoked. > > Depending upon the return code from the ExitBootServices() call, > > "Exit

Re: RFC: Devices for files and partitions

2021-07-08 Thread AKASHI Takahiro
On Tue, Jul 06, 2021 at 05:05:19PM -0600, Simon Glass wrote: > Hi, > > At present U-Boot avoids the concept of 'opening' a file. Being in a > bootloader environment, it is normally better to take the action > immediately and avoid any caching, for example, since there is no > background task to

Re: [PATCH 3/5] efi_loader: add boot variable measurement

2021-07-08 Thread Masahisa Kojima
On Fri, 9 Jul 2021 at 02:46, Heinrich Schuchardt wrote: > > On 7/7/21 3:36 PM, Masahisa Kojima wrote: > > TCG PC Client PFP spec requires to measure "Boot" > > and "BootOrder" variables, EV_SEPARATOR event prior > > to the Ready to Boot invocation. > > Since u-boot does not implement Ready to

Re: [PATCH 2/5] efi_loader: add secure boot variable measurement

2021-07-08 Thread Masahisa Kojima
On Fri, 9 Jul 2021 at 02:46, Heinrich Schuchardt wrote: > > On 7/7/21 3:36 PM, Masahisa Kojima wrote: > > TCG PC Client PFP spec requires to measure the secure > > boot policy before validating the UEFI image. > > This commit adds the secure boot variable measurement > > of "SecureBoot", "PK",

Re: [PATCH 5/5] efi_loader: refactor efi_append_scrtm_version()

2021-07-08 Thread Masahisa Kojima
On Fri, 9 Jul 2021 at 02:32, Heinrich Schuchardt wrote: > > On 7/7/21 3:36 PM, Masahisa Kojima wrote: > > Refactor efi_append_scrtm_version() to use common > > function for adding eventlog and extending PCR. > > > > Signed-off-by: Masahisa Kojima > > --- > > lib/efi_loader/efi_tcg2.c | 14

RE: [v3 15/17] arm: dts: Add base dtsi and devkit dts for Intel N5X device

2021-07-08 Thread Lim, Elly Siew Chin
> -Original Message- > From: Ley Foon Tan > Sent: Friday, July 9, 2021 12:33 AM > To: Lim, Elly Siew Chin > Cc: ZY - u-boot ; Marek Vasut ; > Simon Goldschmidt ; Chee, Tien Fong > ; Westergreen, Dalon > ; Simon Glass ; Gan, > Yau Wai > Subject: Re: [v3 15/17] arm: dts: Add base dtsi

Re: [TF-A] Proposal: TF-A to adopt hand-off blocks (HOBs) for information passing between boot stages

2021-07-08 Thread Julius Werner
> Of course every project would like not to change... > > For TF-A I wonder whether it will/should in fact use devicetree if there is a > lot of complex data? TBD, I suppose. Okay, sorry, now I'm a bit confused -- I thought the discussion in this thread was about which parameter hand-off

Re: [PATCH u-boot-mvebu 25/31] tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes

2021-07-08 Thread Chris Packham
I'll take a proper look at the rest of the series this weekend. Just noticed a couple of typos in the commit message of this patch. On Fri, Jul 9, 2021 at 5:30 AM Marek Behún wrote: > > From: Pali Rohár > > This padding depends on board config file and therere it makes the s/therere/therefore/

Re: [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled

2021-07-08 Thread Masami Hiramatsu
Hi Marek, 2021年7月8日(木) 23:15 Marek Behún : > > On Thu, 8 Jul 2021 08:54:51 +0900 > Masami Hiramatsu wrote: > > > Hi Marek, > > > > I found that this changes the mtd device name and makes 'mtdparts' > > doesn't work on my developerbox platform. > > > > Before this change, > > --- > > => sf

Re: [PATCH 2/6] pci: gt64120: convert to driver model

2021-07-08 Thread Simon Glass
On Tue, 6 Jul 2021 at 08:22, Daniel Schwierzeck wrote: > > This driver is currently only used on MIPS Malta boards. > > Signed-off-by: Daniel Schwierzeck > --- > > drivers/pci/pci_gt64120.c | 72 ++- > 1 file changed, 71 insertions(+), 1 deletion(-)

Re: [PATCH 3/6] pci: msc01: convert to driver model

2021-07-08 Thread Simon Glass
On Tue, 6 Jul 2021 at 08:22, Daniel Schwierzeck wrote: > > This driver is currently only used on MIPS Malta boards. > > Signed-off-by: Daniel Schwierzeck > --- > > drivers/pci/pci_msc01.c | 70 - > 1 file changed, 69 insertions(+), 1 deletion(-) >

Re: [TF-A] Proposal: TF-A to adopt hand-off blocks (HOBs) for information passing between boot stages

2021-07-08 Thread Simon Glass
Hi Julius, On Thu, 8 Jul 2021 at 15:56, Julius Werner wrote: > Thank you all for your feedback. >> >> It appears that in theory we are all happy with using bloblist with few >> implementation details which needs to be taken care of during >> implementation. >> > > Just to clarify: are you using

Re: [TF-A] Proposal: TF-A to adopt hand-off blocks (HOBs) for information passing between boot stages

2021-07-08 Thread Julius Werner
> > Thank you all for your feedback. > > It appears that in theory we are all happy with using bloblist with few > implementation details which needs to be taken care of during > implementation. > Just to clarify: are you using "bloblist" as a general term for the concept of a simple linked list

[PATCH v2 1/3] power: pmic: Add driver for ST-Ericsson AB8500 via PRCMU

2021-07-08 Thread Stephan Gerhold
All devices based on ST-Ericsson Ux500 use a PMIC similar to AB8500 (Analog Baseband). There is AB8500, AB8505, AB9540 and AB8540 although in practice only AB8500 and AB8505 are relevant since the platforms with AB9540 and AB8540 were cancelled and never used in production. In general, the AB8500

[PATCH v2 0/3] Add support for USB on ST-Ericsson Ux500

2021-07-08 Thread Stephan Gerhold
This patch series adds support for USB on ST-Ericsson Ux500 by: - Adding a driver to talk to the AB8500 PMIC - Adding a driver to enable the USB PHY - Adding a simple Ux500 glue driver for the musb-new driver This was tested on the u8500 "stemmy" board that is already present in U-Boot.

[PATCH v2 3/3] usb: musb-new: Add glue driver for ST-Ericsson Ux500

2021-07-08 Thread Stephan Gerhold
The ST-Ericsson DB8500 SoC contains a MUSB OTG controller which supports both host and gadget mode. For some reason there is nothing special about it - add a simple glue driver for Ux500 that literally just sets up MUSB together with a generic PHY. There are no SoC-specific registers etc needed to

[PATCH v2 2/3] phy: Add driver for ST-Ericsson AB8500 USB PHY

2021-07-08 Thread Stephan Gerhold
The AB8500 PMIC contains an USB PHY that needs to be set up in device or host mode to make USB work properly. Add a simple driver for the generic PHY uclass that allows enabling it. The if (CONFIG_IS_ENABLED(USB_MUSB_HOST)) might be a bit strange. The USB PHY must be configured in either host or

[PATCH 3/3] arm: a37xx: pci: Fix typo in comment

2021-07-08 Thread Pali Rohár
Signed-off-by: Pali Rohár --- drivers/pci/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index 77ce9d0c8d87..1b9bae7cca72 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -605,7

[PATCH 1/3] arm: a37xx: pci: Extend validation for PCIe resources and oubound windows

2021-07-08 Thread Pali Rohár
Remapped address of PCIe outbound window may have set only bits from the mask. Add additional check that remapped address which is calculated from PCIe bus address specified in DTS file is valid. Remove also useless clearing of low 16 bits in win_mask. As win_size is power of two and is at least

[PATCH 2/3] arm: a37xx: pci: Optimize a3700_fdt_fix_pcie_regions() when fixup offset is zero

2021-07-08 Thread Pali Rohár
If fixup offset is zero then there is nothing to fix. All calculation in this case just increase addresses by value zero which results in identity. So in this case skip whole fixup re-calculation as it is not needed. This is just an optimization for special case when fix_offset is zero which

Re: [PATCH v2] cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num

2021-07-08 Thread Sean Anderson
On 7/8/21 2:00 PM, Marek Vasut wrote: On 7/8/21 7:36 PM, Sean Anderson wrote: This allows specifying partitions using more extended syntax. This is particularly useful to access eMMC hardware partitions. For example, this allows something like ums mmc 0.0,0.1,0.2,0.3 Shouldn't that be

Re: [PATCH v2] cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num

2021-07-08 Thread Marek Vasut
On 7/8/21 7:36 PM, Sean Anderson wrote: This allows specifying partitions using more extended syntax. This is particularly useful to access eMMC hardware partitions. For example, this allows something like ums mmc 0.0,0.1,0.2,0.3 Shouldn't that be ums X mmc Y ? to expose four LUNs

Re: [PATCH 3/5] efi_loader: add boot variable measurement

2021-07-08 Thread Heinrich Schuchardt
On 7/7/21 3:36 PM, Masahisa Kojima wrote: TCG PC Client PFP spec requires to measure "Boot" and "BootOrder" variables, EV_SEPARATOR event prior to the Ready to Boot invocation. Since u-boot does not implement Ready to Boot event, these measurements are performed when efi_start_image() is

Re: [PATCH 2/5] efi_loader: add secure boot variable measurement

2021-07-08 Thread Heinrich Schuchardt
On 7/7/21 3:36 PM, Masahisa Kojima wrote: TCG PC Client PFP spec requires to measure the secure boot policy before validating the UEFI image. This commit adds the secure boot variable measurement of "SecureBoot", "PK", "KEK", "db" and "dbx". Note that this implementation assumes that secure

Re: [PATCH 4/5] efi_loader: add ExitBootServices() measurement

2021-07-08 Thread Heinrich Schuchardt
On 7/7/21 3:36 PM, Masahisa Kojima wrote: TCG PC Client PFP spec requires to measure "Exit Boot Services Invocation" if ExitBootServices() is invoked. Depending upon the return code from the ExitBootServices() call, "Exit Boot Services Returned with Success" or "Exit Boot Services Returned with

[PATCH v2] cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num

2021-07-08 Thread Sean Anderson
This allows specifying partitions using more extended syntax. This is particularly useful to access eMMC hardware partitions. For example, this allows something like ums mmc 0.0,0.1,0.2,0.3 to expose four LUNs for each of the four default eMMC hardware partitions. Note that the comma

[PATCH u-boot-mvebu 08/31] tools: kwbimage: Validate extended headers of v1 images

2021-07-08 Thread Marek Behún
From: Pali Rohár Add basic checks for extended headers of v1 images. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 28 1 file changed, 28 insertions(+) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index 5192edb330..5f7cb8376a

[PATCH u-boot-mvebu 07/31] tools: kwbimage: Fix check for v0 extended header checksum

2021-07-08 Thread Marek Behún
From: Pali Rohár Extended header checksum for v0 image is present only in the case when extended header is present. Skip checksum validation if extended header is not present. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 18 +++--- 1 file changed, 11

[PATCH u-boot-mvebu 15/31] tools: kwboot: Check for v1 header size

2021-07-08 Thread Marek Behún
From: Pali Rohár Too small invalid headers may cause kwboot to crash. Check for header size of v1 images. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/kwboot.c b/tools/kwboot.c index

[PATCH u-boot-mvebu 17/31] tools: kwbimage: Use -a parameter (load address) for v1 images

2021-07-08 Thread Marek Behún
From: Pali Rohár The data part of v1 kwbimage currently contains U-Boot binary prepended by 64 bytes long Legacy U-Boot image header. This means that the load address is currently substracted by 64 bytes to ensure that U-Boot's entry point is at specified execution address. As mkimage has

[PATCH u-boot-mvebu 29/31] tools: kwbimage: Add support for DATA command also for v1 images

2021-07-08 Thread Marek Behún
From: Pali Rohár The DATA command is already supported by mkimage for v0 images, but not for v1 images. BootROM code which executes v1 images also supports DATA command via an optional extended v1 header OPT_HDR_V1_REGISTER_TYPE. Implement support for DATA command for v1 images.

[PATCH u-boot-mvebu 31/31] tools: kwbimage: Do not hide usage of secure header under CONFIG_ARMADA_38X

2021-07-08 Thread Marek Behún
From: Pali Rohár The mkimage host tool can be used to generate kwbimage v1 image with secure header on host system for A38x plaform also when U-Boot is being compiled for different platform. So there is no reason to not allow compiling of mkimage/kwbimage with secure header support for e.g.

[PATCH u-boot-mvebu 28/31] tools: kwbimage: Don't parse PAYLOAD keyword

2021-07-08 Thread Marek Behún
From: Pali Rohár The PAYLOAD keyword does nothing. No code is using it and both mkimage and kwbimage completely ignore it. It looks like a relict from the past. The payload image itself can be specified only via -d parameter to mkimage. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún ---

[PATCH u-boot-mvebu 09/31] tools: kwbimage: Validate data checksum of v1 images

2021-07-08 Thread Marek Behún
From: Pali Rohár The data part of v1 images contains 32-bit checksum after the data. Validate whether this checksum is correct. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 46 ++ 1 file changed, 46 insertions(+) diff

[PATCH u-boot-mvebu 30/31] tools: kwbimage: Add support for a new DATA_DELAY command

2021-07-08 Thread Marek Behún
From: Pali Rohár This command is supported only by v1 images and specifies a milliseconds delay after executing some set of DATA commands. The special string value SDRAM_SETUP instructs BootROM to setup SDRAM controller instead of executing delay. SDRAM_SETUP may be specified only once and after

[PATCH u-boot-mvebu 18/31] arm: mvebu: Fix return_to_bootrom()

2021-07-08 Thread Marek Behún
From: Pali Rohár Register r0 should be set to return value 0x0 - NO_ERR. Set r0 with return value after all registers are restored from the stack, so that the return value is always correct. Signed-off-by: Pali Rohár Fixes: 944c7a317675 ("arm: mvebu: Add option to use UART xmodem protocol via

[PATCH u-boot-mvebu 21/31] arm: mvebu: Use U-Boot's SPL BootROM framework for booting from NAND/UART

2021-07-08 Thread Marek Behún
From: Pali Rohár Current code uses hack in board_init_f() which calls return_to_bootrom() to skip U-Boot SPL code and return back to BootROM to load U-Boot via UART or from NAND. This change migrates that hack from the board_init_f() function and changes it to return BOOT_DEVICE_BOOTROM instead

[PATCH u-boot-mvebu 22/31] arm: mvebu: Always use BootROM for loading the rest of U-Boot's binary

2021-07-08 Thread Marek Behún
From: Pali Rohár Now that proper load and execution addresses are set in v1 kwbimage, we can use BootROM to continue loading main U-Boot binary instead of U-Boot's SPL code. This also reduces the size of U-Boot's SPL image. The v1 kwbimage contains two separate executable parts: DDR training

Re: [PATCH 5/5] efi_loader: refactor efi_append_scrtm_version()

2021-07-08 Thread Heinrich Schuchardt
On 7/7/21 3:36 PM, Masahisa Kojima wrote: Refactor efi_append_scrtm_version() to use common function for adding eventlog and extending PCR. Signed-off-by: Masahisa Kojima --- lib/efi_loader/efi_tcg2.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git

[PATCH u-boot-mvebu 23/31] arm: mvebu: gdsys: Remove custom spl_board_init()

2021-07-08 Thread Marek Behún
From: Pali Rohár Now that A38x SPL always calls return_to_bootrom() there is no need to provide custom spl_board_init() function which calls return_to_bootrom(). Remove it. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- board/gdsys/a38x/Makefile | 2 +- board/gdsys/a38x/spl.c|

[PATCH u-boot-mvebu 19/31] arm: mvebu: Mark return_to_bootrom() as a noreturn function

2021-07-08 Thread Marek Behún
From: Pali Rohár This function does not return, so add the appropriate compiler flag. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- arch/arm/mach-mvebu/include/mach/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/include/mach/cpu.h

[PATCH u-boot-mvebu 26/31] arm: mvebu: Remove unused macro CONFIG_SYS_U_BOOT_OFFS

2021-07-08 Thread Marek Behún
From: Pali Rohár Macro CONFIG_SYS_U_BOOT_OFFS is set but not used anymore. Remove it. Remove also mvebu dependency on options CONFIG_SPL_SPI_FLASH_SUPPORT, CONFIG_SPL_SPI_LOAD and CONFIG_SPL_SPI_SUPPORT as they were needed only for CONFIG_SYS_U_BOOT_OFFS. Signed-off-by: Pali Rohár

[PATCH u-boot-mvebu 13/31] tools: kwboot: Print trailing newline after terminal is terminated

2021-07-08 Thread Marek Behún
From: Pali Rohár Print trailing newline as the last printed byte can be something different. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/kwboot.c b/tools/kwboot.c index 7e8bf21d37..6e66ad4ecf 100644 ---

[PATCH u-boot-mvebu 27/31] tools: kwbimage: Add support for more BINARY headers

2021-07-08 Thread Marek Behún
From: Pali Rohár The kwbimage v1 format supports multiple BINARY executable headers. Add support for it into mkimage/kwbimage tool. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 44 1 file changed, 20 insertions(+), 24

[PATCH u-boot-mvebu 20/31] arm: mvebu: Implement return_to_bootrom() via U-Boot's SPL framework

2021-07-08 Thread Marek Behún
From: Pali Rohár U-Boot's SPL framework already has an API for loading U-Boot via BootROM. Implement the function board_return_to_bootrom() for mvebu SPL code. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 4 arch/arm/mach-mvebu/spl.c | 12

[PATCH u-boot-mvebu 25/31] tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes

2021-07-08 Thread Marek Behún
From: Pali Rohár This padding depends on board config file and therere it makes the mkimage binary tool board specific, which is not correct. One cannot use mkimage tool built as a result for board A to generate images for board B, even if both A and B are on the same platform. This

[PATCH u-boot-mvebu 24/31] arm: mvebu: Remove legacy U-Boot header from kwbimage v1 files

2021-07-08 Thread Marek Behún
From: Pali Rohár Now that BootROM always loads main U-Boot binary, the legacy 64-byte header is not used anymore. BootROM uses only kwbimage v1 headers where all necessary information about how to load and execute SPL / U-Boot is present. Remove this 64-byte header by putting u-boot.bin binary

[PATCH u-boot-mvebu 16/31] tools: kwbimage: Cosmetic fix - remove redundant space character

2021-07-08 Thread Marek Behún
Remove this space, since the constants are indented by tabs. Signed-off-by: Marek Behún --- tools/kwbimage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kwbimage.h b/tools/kwbimage.h index 9856b44536..cab3d95d13 100644 --- a/tools/kwbimage.h +++ b/tools/kwbimage.h

[PATCH u-boot-mvebu 14/31] tools: kwboot: Cosmetic fix - add missing curly brackets

2021-07-08 Thread Marek Behún
From: Pali Rohár Add missing curly brackets for this else statement. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 6e66ad4ecf..e4d4267e47 100644 ---

[PATCH u-boot-mvebu 12/31] tools: kwboot: Fix restoring terminal

2021-07-08 Thread Marek Behún
From: Pali Rohár Call tcsetattr() only if the file descriptor is valid. It may be invalidated by previous lines (if it is not a tty descriptor). Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH u-boot-mvebu 11/31] tools: kwboot: Fix wrong parameter passed to read()

2021-07-08 Thread Marek Behún
From: Pali Rohár The 'buf' is a pointer and '_buf' is the array itself. Therefore we should pass sizeof(_buf) instead of sizeof(buf) to read(). Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH u-boot-mvebu 10/31] tools: kwbimage: Print size of binary header in kwbimage_print_header()

2021-07-08 Thread Marek Behún
From: Pali Rohár The binary header in kwbimage contains executable SPL code. Print information about this binary header and not only information about it's data part. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 24 1 file changed, 24

[PATCH u-boot-mvebu 06/31] tools: kwbimage: Don't crash when binary file name does not contain '/'

2021-07-08 Thread Marek Behún
From: Pali Rohár In the case when the file name is specified relative to the current working directory, it does not contain '/' character and strrchr() returns NULL. The following strcmp() function then crashes on NULL pointer dereference. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

[PATCH u-boot-mvebu 05/31] tools: kwbimage: Fix generation of SATA, SDIO and PCIe images

2021-07-08 Thread Marek Behún
From: Pali Rohár SATA and SDIO images must be aligned to sector size (which in most cases is 512 bytes) and Source Address in main header is stored in number of sectors from the beginning of the drive. SATA image must be stored at sector 1 and SDIO image at sector 0. Source Address for PCIe

[PATCH u-boot-mvebu 04/31] tools: kwbimage: Add constant for SDIO bootfrom

2021-07-08 Thread Marek Behún
Add constant for SDIO value of the bootfrom header field. Signed-off-by: Marek Behún --- tools/kwbimage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/kwbimage.h b/tools/kwbimage.h index 0b6d05bef1..9856b44536 100644 --- a/tools/kwbimage.h +++ b/tools/kwbimage.h @@ -27,6 +27,7 @@

[PATCH u-boot-mvebu 03/31] tools: kwbimage: Align SPI and NAND images to 256 bytes

2021-07-08 Thread Marek Behún
From: Pali Rohár Writing into SPI NOR and NAND memory can be done only in 256 bytes long blocks. Align final image size so that when it is burned into SPI NOR or NAND memory via U-Boot's commands (sf or mtd), we can use the $filesize variable directly as the length argument. Signed-off-by: Pali

[PATCH u-boot-mvebu 02/31] tools: kwbimage: Simplify aligning and calculating checksum

2021-07-08 Thread Marek Behún
From: Pali Rohár The return value of kwbimage_generate() is used for aligning the data part of kwbimage. Use it for calculating proper 4 byte alignment as is required by BootROM and also use it for allocating additional 4 bytes for the 32-bit data checksum. This simplifies the alignment code to

[PATCH u-boot-mvebu 01/31] tools: kwbimage: Fix compilation without CONFIG_SYS_U_BOOT_OFFS

2021-07-08 Thread Marek Behún
From: Pali Rohár The CONFIG_SYS_U_BOOT_OFFS option may be defined as empty string. In this case it causes compilation error: tools/kwbimage.c: In function ‘image_headersz_v1’: tools/kwbimage.c:1002:39: error: expected expression before ‘)’ token if (headersz >

[PATCH u-boot-mvebu 00/31] kwboot / kwbimage improvements

2021-07-08 Thread Marek Behún
Hi Stefan and others, this is a series of improvements to kwboot, kwbimage and mvebu. The main goal of this series is to correctly use BootROM's code for loading U-Boot from NOR / NAND: currently only SPL is read by BootROM and the main U-Boot is read by SPL. By using BootROM to also load main

Re: [PATCH 1/4] cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num

2021-07-08 Thread Sean Anderson
Hi Marek, On 7/8/21 1:23 PM, Marek Vasut wrote: On 7/8/21 7:14 PM, Sean Anderson wrote: This allows specifying partitions using more extended syntax. This is particularly useful to access eMMC hardware partitions. What kind of syntax ? That should be in the commit message. See

Re: [PATCH 1/4] cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num

2021-07-08 Thread Marek Vasut
On 7/8/21 7:14 PM, Sean Anderson wrote: This allows specifying partitions using more extended syntax. This is particularly useful to access eMMC hardware partitions. What kind of syntax ? That should be in the commit message. If this is separate patch, it should not be part of a series, but

[PATCH 4/4] usb: f_mass_storage: Stop after the host deconfigures us

2021-07-08 Thread Sean Anderson
At the moment there is no way to signal to U-Boot from the host that we are done reading/writing data. This stops the gadget after the host deconfigures us by selecting config 0. In theory, the host could later select this configuration again, but this rarely happens. On Linux this may be

[PATCH 2/4] usb: f_mass_storage: Check bh->state in sleep_thread

2021-07-08 Thread Sean Anderson
Every caller of sleep_thread except one wraps it in a second loop which waits for a buffer head to be filled. Since sleep_thread is already (infinitely) looping, we can move this check down. Some parts of the code have been reorganized to better take advantage of this property and and be

[PATCH 3/4] usb: f_mass_storage: Drop wakeup_needed

2021-07-08 Thread Sean Anderson
Now that we check bh->state in sleep_thread, there is no need to have a separate wakeup_needed flag. Drop it. Signed-off-by: Sean Anderson --- drivers/usb/gadget/f_mass_storage.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/usb/gadget/f_mass_storage.c

[PATCH 1/4] cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num

2021-07-08 Thread Sean Anderson
This allows specifying partitions using more extended syntax. This is particularly useful to access eMMC hardware partitions. Signed-off-by: Sean Anderson --- This patch is independent of the others in this series and may be applied separately. cmd/usb_mass_storage.c | 4 ++-- 1 file changed,

Re: [v3 12/17] ddr: altera: Add SDRAM driver for Intel N5X device

2021-07-08 Thread Ley Foon Tan
On Sun, Jun 13, 2021 at 4:49 PM Siew Chin Lim wrote: > > From: Tien Fong Chee > > The DDR subsystem in Diamond Mesa is consisted of controller, PHY, > memory reset manager and memory clock manager. > > Configuration settings of controller, PHY and memory reset manager > is come from DDR handoff

Re: [RFC PATCH 02/28] cli: Add LIL shell

2021-07-08 Thread Wolfgang Denk
Dear Sean, In message <43880bf0-baa6-0cb2-80fe-0fe50d43b...@gmail.com> you wrote: > > > Tcl is a horror of a language for anything that is above trivial > > level. > > Can you please elaborate on this? You've made this claim several times, > but haven't explained your reasoning for it. A long,

Re: [v3 15/17] arm: dts: Add base dtsi and devkit dts for Intel N5X device

2021-07-08 Thread Ley Foon Tan
On Sun, Jun 13, 2021 at 4:49 PM Siew Chin Lim wrote: > > Add device tree for N5X. > > Signed-off-by: Siew Chin Lim > Signed-off-by: Tien Fong Chee > > --- > v3: > - Update comment for memory example code > - Move all common dts settings for N5X from > socfpga_n5x_socdk.dts to

Re: [RFC PATCH 05/28] cli: lil: Rename some functions to be more like TCL

2021-07-08 Thread Wolfgang Denk
Dear Sean, In message you wrote: > ... > And yet, this is not the field we compete in. While bourne-style shells > can take advantage of a multi-threaded environment, embedded shells tend > to implement a much wider set of languages. See [1] for a survey of > examples. > > [1]

Re: [v3 07/17] drivers: clk: Add memory clock driver for Intel N5X device

2021-07-08 Thread Ley Foon Tan
On Sun, Jun 13, 2021 at 4:49 PM Siew Chin Lim wrote: > > Add memory clock manager driver for N5X. Provides memory clock > initialization and enable functions. > > Signed-off-by: Siew Chin Lim > > --- > v3: > - Use BIT() and GENMASK() macro for all *MASK macro > > v2: > - common.h need to be

Re: [v3 05/17] drivers: clk: Add clock driver for Intel N5X device

2021-07-08 Thread Ley Foon Tan
On Sun, Jun 13, 2021 at 4:49 PM Siew Chin Lim wrote: > > Add clock manager driver for N5X. Provides clock initialization > and get_rate functions. > > Signed-off-by: Siew Chin Lim > > --- > v3: > - Use BIT() macro for CLKMGR_INTER_*_MASK macro > > v2: > - common.h need to be included before

Re: [v3 04/17] arm: socfpga: Add handoff data support for Intel N5X device

2021-07-08 Thread Ley Foon Tan
On Sun, Jun 13, 2021 at 4:49 PM Siew Chin Lim wrote: > > From: Tien Fong Chee > > N5X support both HPS handoff data and DDR handoff data. > Existing HPS handoff functions are restructured to support both existing > devices and N5X device. > > Signed-off-by: Siew Chin Lim > Signed-off-by: Tien

Re: [RFC PATCH 03/28] cli: lil: Replace strclone with strdup

2021-07-08 Thread Wolfgang Denk
Dear Sean, In message <4aa7ff19-b774-0d67-b96a-9c0c9290a...@gmail.com> you wrote: > > Without pipes, how do bourne-style shells communicate? Sure you can > transfer data into functions using arguments, but what about the other > way around? Numeric return values? Global variables? I think these

Re: [RFC PATCH 02/28] cli: Add LIL shell

2021-07-08 Thread Tom Rini
On Thu, Jul 08, 2021 at 07:19:05AM +0200, Michael Nazzareno Trimarchi wrote: > Hi > > On Wed, Jul 7, 2021 at 4:48 PM Marek Behun wrote: > > > > Dear Tom, Sean, Wolfgang and others, > > > > here are some of my opinions for this discussion > > > > - I agree with Wolfgang that there are far better

Re: [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled

2021-07-08 Thread Tom Rini
On Thu, Jul 08, 2021 at 04:15:17PM +0200, Marek Behún wrote: > On Thu, 8 Jul 2021 08:54:51 +0900 > Masami Hiramatsu wrote: > > > Hi Marek, > > > > I found that this changes the mtd device name and makes 'mtdparts' > > doesn't work on my developerbox platform. > > > > Before this change, > >

Re: [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled

2021-07-08 Thread Marek Behún
On Thu, 8 Jul 2021 08:54:51 +0900 Masami Hiramatsu wrote: > Hi Marek, > > I found that this changes the mtd device name and makes 'mtdparts' > doesn't work on my developerbox platform. > > Before this change, > --- > => sf probe > SF: Detected mx66u51235f with page size 256 Bytes, erase

[PATCH v5 8/8] test: add first autoboot unit tests

2021-07-08 Thread Steffen Jaeckel
This adds tests for the crypt-based and plain SHA256-based password hashing algorithms in the autoboot flow. Signed-off-by: Steffen Jaeckel Reviewed-by: Simon Glass --- (no changes since v4) Changes in v4: Add another test with `bootstopusesha256` unset common/Kconfig.boot | 2 +-

[PATCH v5 7/8] common: add support to fallback to plain SHA256

2021-07-08 Thread Steffen Jaeckel
In case crypt-based hashing is enabled this will be the default mechanism that is used. If a user wants to have support for both, the environment variable `bootstopusesha256` can be set to `true` to allow plain SHA256 based hashing of the password. Signed-off-by: Steffen Jaeckel Reviewed-by:

[PATCH v5 6/8] common: add AUTOBOOT_FLUSH_STDIN option

2021-07-08 Thread Steffen Jaeckel
The key-sequence based unlock mechanisms are sensitive to junk symbols that could have been sent to stdin and are still waiting to be retrieved. Enabling this option will read all symbols off stdin before displaying the autoboot prompt (and starting to read the password from stdin).

[PATCH v5 5/8] common: allow disabling of timeout for password entry

2021-07-08 Thread Steffen Jaeckel
In case a user has to enter a complicated password it is sometimes desireable to give the user more time than the default timeout. Enabling this feature will disable the timeout entirely in case the user presses the key before entering any other character. Signed-off-by: Steffen Jaeckel

[PATCH v5 4/8] common: Rename macro appropriately

2021-07-08 Thread Steffen Jaeckel
While doing code-review internally this got nitpicked by 2 reviewers, so I decided to include this here. Signed-off-by: Steffen Jaeckel Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- (no changes since v1) common/autoboot.c | 16 1 file changed, 8 insertions(+), 8

[PATCH v5 3/8] common: integrate crypt-based passwords

2021-07-08 Thread Steffen Jaeckel
Hook into the autoboot flow as an alternative to the existing mechanisms. Signed-off-by: Steffen Jaeckel Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- (no changes since v1) common/Kconfig.boot | 38 ++--- common/autoboot.c | 81

[PATCH v5 2/8] lib: wrap crypt API to hide errno usage

2021-07-08 Thread Steffen Jaeckel
In order to prevent using the global errno, replace it with a static version and create a wrapper function which returns the error value. Signed-off-by: Steffen Jaeckel Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- Changes in v5: Take review comments into account include/crypt.h

[PATCH v5 1/8] lib: add crypt subsystem

2021-07-08 Thread Steffen Jaeckel
Add the basic functionality required to support the standard crypt format. The files crypt-sha256.c and crypt-sha512.c originate from libxcrypt and their formatting is therefor retained. The integration is done via a crypt_compare() function in crypt.c. ``` libxcrypt $ git describe --long

[PATCH v5 0/8] common: Introduce crypt-style password support

2021-07-08 Thread Steffen Jaeckel
This patchset introduces support for crypt-style passwords to unlock the console in autoboot mode. The implementation of crypt-sha256 and crypt-sha512 originate from libxcrypt at https://github.com/besser82/libxcrypt.git Version v4.4.17 Git commit hash 6b110bc I didn't re-format those two

Re: [PATCH] Azure: Remove "spear" jobs

2021-07-08 Thread Tom Rini
On Thu, Jul 08, 2021 at 08:58:42PM +0800, Bin Meng wrote: > On Thu, Jul 8, 2021 at 7:50 PM Tom Rini wrote: > > > > With the spear family of platforms gone, remove references to them from > > the build jobs. > > > > Signed-off-by: Tom Rini > > --- > > .azure-pipelines.yml | 4 +--- > > 1 file

Re: [PATCH v4 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE

2021-07-08 Thread Patrice CHOTARD
Hi Alexandru Sorry for the delay, i just noticed that this patch didn't get reviewed neither by Patrick nor by me. That's done ;-) On 5/31/21 7:43 PM, Alexandru Gagniuc wrote: > OP-TEE is very particular about how the TZC should be configured. > When booting an OP-TEE payload, an incorrect TZC

Re: [PATCH] Azure: Remove "spear" jobs

2021-07-08 Thread Bin Meng
On Thu, Jul 8, 2021 at 7:50 PM Tom Rini wrote: > > With the spear family of platforms gone, remove references to them from > the build jobs. > > Signed-off-by: Tom Rini > --- > .azure-pipelines.yml | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH] get_maintainer.pl: update from Linux kernel v5.13-rc6

2021-07-08 Thread Trevor Woerner
ping? Tom, have you had a chance to try out this update? On Tue, Jun 15, 2021 at 3:30 AM Trevor Woerner wrote: > Update U-Boot's version of scripts/get_maintainer.pl to sync it up with > the > latest changes to the Linux kernel's version of the same script. > > The last sync was with Linux

Re: [TF-A] Proposal: TF-A to adopt hand-off blocks (HOBs) for information passing between boot stages

2021-07-08 Thread François Ozog
On Thu, 8 Jul 2021 at 13:19, Manish Pandey2 wrote: > Hi, > > Thank you all for your feedback. > > It appears that in theory we are all happy with using bloblist with few > implementation details which needs to be taken care of during > implementation. > > Few comments: > > > After all

Re: [TF-A] Proposal: TF-A to adopt hand-off blocks (HOBs) for information passing between boot stages

2021-07-08 Thread Manish Pandey2
Hi, Thank you all for your feedback. It appears that in theory we are all happy with using bloblist with few implementation details which needs to be taken care of during implementation. Few comments: > After all discussions, I now support Simon proposal to use existing bloblist: > it does

[PATCH] Azure: Remove "spear" jobs

2021-07-08 Thread Tom Rini
With the spear family of platforms gone, remove references to them from the build jobs. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 84409c284dbc..e3a994e0c441 100644 ---

  1   2   >