[PATCH v4 15/16] PPC: Enable Job ring driver model in U-Boot

2021-10-25 Thread Gaurav Jain
removed sec_init() call and CONFIG_FSL_CAAM from defconfig. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Reviewed-by: Priyanka Jain --- arch/powerpc/cpu/mpc85xx/Kconfig | 44 +++ arch/powerpc/cpu/mpc85xx/cpu

[PATCH v4 14/16] PPC: Add crypto node in device tree

2021-10-25 Thread Gaurav Jain
device tree imported from linux kernel. c500bee1c5b2 (tag: v5.14-rc4) Linux 5.14-rc4 Signed-off-by: Gaurav Jain Reviewed-by: Priyanka Jain --- arch/powerpc/dts/p2041si-post.dtsi | 1 + arch/powerpc/dts/p3041si-post.dtsi | 1 + arch/powerpc/dts/p4080si-post.dtsi | 1 + arch/powerpc/dts/

[PATCH v4 13/16] Layerscape: Enable Job ring driver model in U-Boot.

2021-10-25 Thread Gaurav Jain
LS(1021/1012/1028/1043/1046/1088/2088), LX2160, LX2162 platforms are enabled with JR driver model. removed sec_init() call from board files. removed CONFIG_FSL_CAAM from defconfig files. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Revie

[PATCH v4 12/16] Layerscape: Add crypto node in device tree

2021-10-25 Thread Gaurav Jain
LS(1021/1012/1028/1043/1046/1088/2088), LX2160 - updated device tree Signed-off-by: Gaurav Jain Reviewed-by: Priyanka Jain --- arch/arm/dts/fsl-ls1012a.dtsi | 46 ++- arch/arm/dts/fsl-ls1043a.dtsi | 45 +- arch/arm/dts/fsl-ls1046a.

[PATCH v4 09/16] i.MX8: Add crypto node in device tree

2021-10-25 Thread Gaurav Jain
i.MX8(QM/QXP) - updated device tree for supporting DM in SPL. disabled use of JR1 in SPL and uboot, as JR1 is reserved for SECO FW. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- arch/arm/dts/fsl-imx8dx.dtsi | 61 +++- arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi

[PATCH v4 11/16] crypto/fsl: Fix kick_trng

2021-10-25 Thread Gaurav Jain
From: Ye Li fix hwrng performance issue in kernel. Signed-off-by: Ye Li Acked-by: Gaurav Jain > --- drivers/crypto/fsl/jr.c | 109 ++-- include/fsl_sec.h | 1 + 2 files changed, 94 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/fsl/jr.c

[PATCH v4 10/16] crypto/fsl: i.MX8: Enable Job ring driver model in SPL and U-Boot.

2021-10-25 Thread Gaurav Jain
i.MX8(QM/QXP) - added support for JR driver model. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Signed-off-by: Horia Geantă Reviewed-by: Ye Li --- arch/arm/Kconfig | 3 +++ arch/arm/include/asm/arch-imx8/imx-r

[PATCH v4 08/16] i.MX7ULP: Enable Job ring driver model in U-Boot.

2021-10-25 Thread Gaurav Jain
added crypto node in device tree. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- arch/arm/Kconfig | 2 +- arch/arm/dts/imx7ulp.dtsi| 24 arch/arm/mach-imx/mx7ulp/Kco

[PATCH v4 07/16] i.MX7: Enable Job ring driver model in U-Boot.

2021-10-25 Thread Gaurav Jain
i.MX7D - added support for JR driver model. removed sec_init() call, sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- arch/arm/Kconfig | 2 +- arch/arm/mach-imx/mx7/Kconfig | 3 +++ arch/arm/mach-imx/m

[PATCH v4 06/16] i.MX6: Enable Job ring driver model in U-Boot.

2021-10-25 Thread Gaurav Jain
i.MX6,i.MX6SX,i.MX6UL - added support for JR driver model. removed sec_init() call, sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- arch/arm/mach-imx/mx6/Kconfig | 20 arch/arm/mach-imx/mx6/soc.

[PATCH v4 05/16] mx6sabre: Remove unnecessary SPL configs

2021-10-25 Thread Gaurav Jain
From: Ye Li Because we don't use SPL_DM on mx6sabresd and mx6sabreauto, so it is unnecessary to have SPL DTB related configs and SPL_OF_CONTROL enabled. Signed-off-by: Ye Li Reviewed-by: Fabio Estevam Reviewed-by: Gaurav Jain --- configs/mx6sabreauto_defconfig | 2 -- configs/mx6sabresd_defc

[PATCH v4 04/16] crypto/fsl: i.MX8M: Enable Job ring driver model in SPL and U-Boot.

2021-10-25 Thread Gaurav Jain
i.MX8MM/MN/MP/MQ - added support for JR driver model. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- arch/arm/Kconfig | 2 +- arch/arm/include/asm/arch-imx8m/imx-regs.h | 1 + arch/arm/ma

[PATCH v4 03/16] i.MX8M: crypto: updated device tree for supporting DM in SPL

2021-10-25 Thread Gaurav Jain
disabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 18 +- arch/arm/dts/imx8mm.dtsi | 1 + arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 18 ++

[PATCH v4 02/16] crypto/fsl: Add CAAM support for bkek, random number generation

2021-10-25 Thread Gaurav Jain
added api and descriptor for blob key encryption key(bkek) generation. added api for random number generation. Signed-off-by: Gaurav Jain Signed-off-by: Ji Luo Reviewed-by: Ye Li --- drivers/crypto/fsl/desc.h | 5 +++ drivers/crypto/fsl/fsl_blob.c | 82 +++

[PATCH v4 01/16] crypto/fsl: Add support for CAAM Job ring driver model

2021-10-25 Thread Gaurav Jain
added device tree support for job ring driver. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain Reviewed-by: Ye Li --- cmd/Kconfig | 1 + drivers/crypto/fsl/Kconfig | 7 + drivers/crypto/fsl/Makefile | 4 +- drivers/c

[PATCH v4 00/16] Add CAAM driver model support

2021-10-25 Thread Gaurav Jain
This patchset adds the support for following: 1) CAAM Driver model for all i.MX, layerscape, PPC platforms. 2) Added crypto node in device tree files. 3) CAAM support for blob key encryption key(bkek), random number generation. 4) fix build issue for mx6sabre: Remove SPL DTB related configs and SP

RE: [EXT] Re: [PATCH v3 12/16] Layerscape: Add crypto node in device tree

2021-10-25 Thread Gaurav Jain
Hi Michael > -Original Message- > From: Vladimir Oltean > Sent: Thursday, October 21, 2021 5:30 PM > To: Tom Rini ; Priyanka Jain > Cc: Michael Walle ; Gaurav Jain ; > Shengzhou Liu ; Varun Sethi ; > Adrian Alonso ; Alison Wang > ; Andy Tang ; > feste...@gmail.com; Franck Lenormand ; Hor

Re: [PATCH v4 4/4] mtd: spi-nor-core: Add support for Macronix Octal flash

2021-10-25 Thread liao jaime
MX66UW2G345G is similar to MX66UW2G345GX0 and MX66UW2G345G's device ID is 0xc2843c actually. So that I correct it and add MX66UW2G345GX0 in IDs table. Pratyush Yadav 於 2021年10月26日 週二 上午3:45寫道: > On 18/10/21 02:24PM, JaimeLiao wrote: > > Adding Macronix Octal flash for Octal DTR support. > > > >

Re: [PATCH v4 2/4] mtd: spi-nor-core: Adding different type of command extension in Soft Reset

2021-10-25 Thread liao jaime
For validating soft_reset after probe, I have test it on my side. It is working with command extension type which got from BFPT. Pratyush Yadav 於 2021年10月26日 週二 上午3:42寫道: > On 25/10/21 12:30PM, Jagan Teki wrote: > > On Mon, Oct 18, 2021 at 11:54 AM JaimeLiao > wrote: > > > > > > Power-on-Reset

Re: [PATCH] doc: Remove the obsolete README.AMCC-eval-boards-cleanup file

2021-10-25 Thread Stefan Roese
On 26.10.21 08:13, Thomas Huth wrote: The related boards have been removed four years ago already, in commit 98f705c9cefd ("powerpc: remove 4xx support"), so this README file is not required anymore. Signed-off-by: Thomas Huth Reviewed-by: Stefan Roese Thanks, Stefan --- doc/README.AMCC

[PATCH] doc: Remove the obsolete README.AMCC-eval-boards-cleanup file

2021-10-25 Thread Thomas Huth
The related boards have been removed four years ago already, in commit 98f705c9cefd ("powerpc: remove 4xx support"), so this README file is not required anymore. Signed-off-by: Thomas Huth --- doc/README.AMCC-eval-boards-cleanup | 31 - 1 file changed, 31 deletions(-)

Re: [PATCH v5 00/26] fdt: Make OF_BOARD a boolean option

2021-10-25 Thread François Ozog
Hi Simon Position unchanged on this series: adding fake dts for boards that generate their device tree in the dts directory is not good. If you have them in documentation the it is acceptable. Cheers FF Le mar. 26 oct. 2021 à 02:24, Simon Glass a écrit : > With Ilias' efforts we have dropped

Re: [PATCH v4 04/11] tools: add fdtsig.sh

2021-10-25 Thread AKASHI Takahiro
On Mon, Oct 25, 2021 at 12:06:39PM +0900, AKASHI Takahiro wrote: > Simon, > > On Thu, Oct 14, 2021 at 06:40:24PM -0600, Simon Glass wrote: > > Hi Takahiro, > > > > On Mon, 11 Oct 2021 at 19:42, AKASHI Takahiro > > wrote: > > > > > > Simon, > > > > > > On Mon, Oct 11, 2021 at 08:54:09AM -0600, Si

Re: [PATCH u-boot-marvell 13/13] tools: kwboot: Resend first 3 xmodem retry packets immediately

2021-10-25 Thread Stefan Roese
On 25.10.21 15:13, Marek Behún wrote: From: Pali Rohár Currently when kwboot receive some garbage reply which does not understand, it waits 1s before it tries to resend packet again. The most common error on UART is that receiver sees some bit flipped which results in invalid reply. This beha

Re: [PATCH u-boot-marvell 12/13] tools: kwboot: Change retry loop from decreasing to increasing

2021-10-25 Thread Stefan Roese
On 25.10.21 15:13, Marek Behún wrote: From: Pali Rohár This patch does not change behavior of the code, just allows to implement new changes more easily. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 8 1 fi

Re: [PATCH u-boot-marvell 11/13] tools: kwboot: Calculate real used space in kwbimage header when calling kwboot_img_grow_hdr()

2021-10-25 Thread Stefan Roese
On 25.10.21 15:13, Marek Behún wrote: From: Pali Rohár Size of the header stored in kwbimage may be larger than real used size in the kwbimage header. If there is unused space in kwbimage header then use it for growing it. So update code to calculate used space of kwbimage header. Signed-off-b

Re: [PATCH u-boot-marvell 10/13] tools: kwboot: Do not modify kwbimage header before increasing its size

2021-10-25 Thread Stefan Roese
On 25.10.21 15:13, Marek Behún wrote: From: Pali Rohár This ensures that kwboot_img_grow_hdr() function still sees valid kwbimage header. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 9 ++--- 1 file changed, 6 i

Re: [PATCH u-boot-marvell 09/13] tools: kwboot: Simplify code for aligning image header

2021-10-25 Thread Stefan Roese
On 25.10.21 15:13, Marek Behún wrote: From: Pali Rohár Expression (hdrsz % KWBOOT_XM_BLKSZ) is non-zero therefore expression (KWBOOT_XM_BLKSZ - hdrsz % KWBOOT_XM_BLKSZ) is always less than value KWBOOT_XM_BLKSZ. So there is no need to add another modulo. Also rename variable `offset` to `grow`

Re: [PATCH u-boot-marvell 08/13] tools: kwboot: Show verbose message when waiting for baudrate change magic

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár It is hard to debug why kwboot is failing when the last message is 'Finishing transfer' and no additional output. So show verbose message when kwboot finished transfer and is waiting for baudrate change magic sequence. Signed-off-by: Pali

Re: [PATCH u-boot-marvell 07/13] tools: kwboot: Correctly set configuration of UART for BootROM messages

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár For kwbimage v1, tell BootROM to send BootROM messages to UART port number 0 (used also for UART booting) with default baudrate (which should be 115200) and do not touch UART MPP configuration. Signed-off-by: Pali Rohár Reviewed-by: Marek

Re: [PATCH u-boot-marvell 06/13] tools: kwboot: Recalculate 4-byte data checksum after injecting baudrate code

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár If data part of image is modified, update 4-byte data checksum. It looks like A385 BootROM does not verify this checksum for image loaded via UART, but we do not know if other BootROMs are also ignoring it. It is always better to provide c

Re: [PATCH u-boot-marvell 05/13] tools: kwboot: Inject baudrate change back code after data part

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár Some vendor U-Boot kwbimage binaries (e.g. those for A375) have load address set to zero. Therefore it is not possible to inject code which changes baudrate back to 115200 Bd before the data part. So instead inject it after the data part a

Re: [PATCH u-boot-marvell 04/13] tools: kwboot: Validate 4-byte image data checksum

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár Data part of the image contains 4-byte checksum. Validate it when processing the image. Signed-off-by: Pali Rohár [ refactored ] Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 34

Re: [PATCH u-boot-marvell 03/13] tools: kwboot: Reserve enough space for patching kwbimage in memory

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár SPI image header and data parts do not have to be aligned to 128 byte xmodem block size. So reserve additional memory for aligning header part and additional memory for aligning data part. Signed-off-by: Pali Rohár Reviewed-by: Marek Behú

Re: [PATCH u-boot-marvell 02/13] tools: kwboot: Fix initialization of tty device

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár Explicitly disable 2 stop bits by clearing CSTOPB flag, disable modem control flow by clearing CRTSCTS flag and do not send hangup after closing device by clearing HUPCL flag. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed

Re: [PATCH u-boot-marvell 01/13] tools: kwboot: Initialize rfds to zero

2021-10-25 Thread Stefan Roese
On 25.10.21 15:12, Marek Behún wrote: From: Pali Rohár Explicitly zero out the rfds fd_set with FD_ZERO() before using it. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] doc: Remove the obsolete README.mpc74xx file

2021-10-25 Thread Stefan Roese
On 25.10.21 08:56, Thomas Huth wrote: Support for the PPC74xx processors has been removed in commit d928664f41 ("powerpc: 74xx_7xx: remove 74xx_7xx cpu support") more than 6 years ago already. So the corresponding README file can now be removed, too. Signed-off-by: Thomas Huth Reviewed-by: St

Re: [PATCH 1/1] doc: remove AMCC PPC405 processor references

2021-10-25 Thread Stefan Roese
On 23.10.21 13:14, Heinrich Schuchardt wrote: Support for PPC4XX processors has been removed. So we should not mention it in the documentation. Signed-off-by: Heinrich Schuchardt Reviewed-by: Stefan Roese Thanks, Stefan --- doc/README.bedbug | 22 -- 1 file changed,

Re: [PATCH] arm: mvebu: Fix comments about kwbimage structures

2021-10-25 Thread Stefan Roese
On 22.10.21 12:41, Pali Rohár wrote: kwbimage v1 is used on more SoCs. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- arch/arm/mach-mvebu/spl.c | 2 +- cmd/mvebu/bubt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mac

Re: [PATCH 3/3] arm: mvebu: Update name of kwbimage v1 field at offset 0x2-0x3

2021-10-25 Thread Stefan Roese
On 22.10.21 12:37, Pali Rohár wrote: At this offset is stored nand page size. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- arch/arm/mach-mvebu/spl.c | 2 +- cmd/mvebu/bubt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/

Re: [PATCH 2/3] tools: kwboot: Patch nandpagesize to zero also for v1 image

2021-10-25 Thread Stefan Roese
On 22.10.21 12:37, Pali Rohár wrote: kwbimage v1 has also nandpagesize field. So set it to zero for both image versions when image is not signed. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Thanks, Stefan --- tools/kwboot.c | 13 ++--- 1 file changed, 6 insertions(+), 7

Re: [PATCH 1/3] tools: kwbimage: Add support for NAND_PAGE_SIZE command also for v1 images

2021-10-25 Thread Stefan Roese
On 22.10.21 12:37, Pali Rohár wrote: The NAND_PAGE_SIZE command is already supported by mkimage for v0 images, but not for v1 images. A38x and A39x BootROM supports reading NAND flash page size from v1 image in the same way as Kirkwood BootROM from v0 image. It it documented in A38x and A39x Fun

[PATCH v3 34/35] efi: Support the efi command in the app

2021-10-25 Thread Simon Glass
At present the 'efi' command only works in the EFI payload. Update it to work in the app too, so the memory map can be examined. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to support the efi command in the app cmd/Makefile | 2 +- cmd/efi.c

[PATCH v3 35/35] efi: Show the system-table revision

2021-10-25 Thread Simon Glass
Show the revision of this table this is can be important. Alo update the 'efi table' entry to show the actual address of the EFI table rather than our table that points to it. This saves a step and the intermediate table has nothing else in it. Signed-off-by: Simon Glass --- Changes in v3: - Ad

[PATCH v3 32/35] efi: Allow easy selection of serial-only operation

2021-10-25 Thread Simon Glass
Add info about how to select vidconsole or serial. Also set up a demo boot command. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add a better boot command too include/configs/efi-x86_app.h | 25 + 1 file changed, 25 insertions(+) diff --git a

[PATCH v3 33/35] efi: Update efi_get_next_mem_desc() to avoid needing a map

2021-10-25 Thread Simon Glass
At present this function requires a pointer to struct efi_entry_memmap but the only field used in there is the desc_size. We want to be able to use it from the app, so update it to use desc_size directly. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/efi/payload.c | 8

[PATCH v3 31/35] efi: Show when allocated pages are used

2021-10-25 Thread Simon Glass
Add a message here so that both paths of memory allocation are reported. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Use log_info() instead of printf() lib/efi/efi_app.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi/efi_app.c b/lib/efi

[PATCH v3 29/35] efi: Check for failure when initing the app

2021-10-25 Thread Simon Glass
The stub checks for failure with efi_init(). Add this for the app as well. It is unlikely that anything can be done, but we may as well stop. Signed-off-by: Simon Glass --- (no changes since v1) lib/efi/efi_app.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/ef

[PATCH v3 30/35] efi: Mention that efi_info_get() is only used in the stub

2021-10-25 Thread Simon Glass
This provides access to EFI tables after U-Boot has exited boot services. It is not needed in the app since boot services remain alive and we can just call them whenever needed. Add a comment to explain this. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Fix 'as' typo

[PATCH v3 28/35] efi: Move exit_boot_services into a function

2021-10-25 Thread Simon Glass
At present this code is inline in the app and stub. But they do the same thing. The difference is that the stub does it immediately and the app doesn't want to do it until the end (when it boots a kernel) or not at all, if returning to UEFI. Move it into a function so it can be called as needed.

[PATCH v3 25/35] efi: Fix ll_boot_init() operation with the app

2021-10-25 Thread Simon Glass
This should return false when the EFI app is running, since UEFI has done the required low-level init. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) include/init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/init.h b/include/init.h index c781789e3

[PATCH v3 27/35] efi: Share struct efi_priv between the app and stub code

2021-10-25 Thread Simon Glass
At present each of these has its own static variable and helper functions. Move them into a shared file. Signed-off-by: Simon Glass --- (no changes since v1) include/efi.h | 21 + lib/efi/efi.c | 29 + lib/efi/efi_app.c | 21 ++

[PATCH v3 24/35] efi: Add comments to struct efi_priv

2021-10-25 Thread Simon Glass
This structure is uncommented. Fix it. Signed-off-by: Simon Glass --- Changes in v3: - Drop comments that confuse sphinx - Move device_path path change to its own patch include/efi.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/efi.h b/include/efi.h inde

[PATCH v3 26/35] efi: Add a few comments to the stub

2021-10-25 Thread Simon Glass
Comment some functions that need more information. Signed-off-by: Simon Glass --- (no changes since v1) lib/efi/efi_stub.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index b3393e47fae..156cbf0b928 100644 --- a/lib/efi/efi

[PATCH v3 23/35] efi: Drop device_path from struct efi_priv

2021-10-25 Thread Simon Glass
This is not used anywhere drop it. Signed-off-by: Simon Glass --- Changes in v3: - Move device_path path change to its own patch include/efi.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/efi.h b/include/efi.h index 908c5dc6ebd..77e599c256e 100644 --- a/include/efi.h +++ b/includ

[PATCH v3 22/35] x86: efi: Add room for the binman definition in the dtb

2021-10-25 Thread Simon Glass
At present only 4KB of spare space is left in the DTB when building the EFI app. Increase this to 32KB so there is plenty of space to insert the binman definition. This cannot be expanded later (as with OF_SEPARATE) because the ELF image has already been built. Signed-off-by: Simon Glass --- (no

[PATCH v3 21/35] x86: Don't process the kernel command line unless enabled

2021-10-25 Thread Simon Glass
If the 'bootm' command is not enabled then this code is not available and this causes a link error. Fix it. Note that for the EFI app, there is no indication of missing code. It just hangs! Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/zimage.c | 13 - 1 file c

[PATCH v3 19/35] bloblist: Support allocating the bloblist

2021-10-25 Thread Simon Glass
Typically the bloblist is positioned at a fixed address in memory until relocation. This is convenient when it is set up in SPL or before relocation. But for EFI we want to set it up only when U-Boot proper is running. Add a way to allocate it using malloc() and update the documentation to cover t

[PATCH v3 18/35] efi: serial: Support arrow keys

2021-10-25 Thread Simon Glass
At present only the backspace key is supported in U-Boot, when running as an EFI app. Add support for arrows, home and end as well, to make the CLI more friendly. Signed-off-by: Simon Glass --- (no changes since v1) drivers/serial/serial_efi.c | 11 +-- 1 file changed, 9 insertions(+),

[PATCH v3 17/35] binman: Support updating the dtb in an ELF file

2021-10-25 Thread Simon Glass
WIth EFI we must embed the devicetree in an ELF image so that it is loaded as part of the executable file. We want it to include the binman definition in there also, which in some cases cannot be created until the ELF (u-boot) is built. Add an option to binman to support writing the updated dtb to

[PATCH v3 14/35] binman: Support reading the offset of an ELF-file symbol

2021-10-25 Thread Simon Glass
Binman needs to be able to update the contents of an ELF file after it has been build. To support this, add a function to locate the position of a symbol's contents within the file. Fix the comments on bss_data.c and Symbol while we are here. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 16/35] binman: Tidy up comments on _DoTestFile()

2021-10-25 Thread Simon Glass
The comment for this function is missing an argument and the return value. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 8199a4fc7e0..39a4b94cd0b 10

[PATCH v3 15/35] binman: Allow timeout to occur in the image or its section

2021-10-25 Thread Simon Glass
At present testThreadTimeout() assumes that the expected timeout happens first when building the section, but it can just as easily happen at the top-level image. Update the test to cope with both. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/ftest.py | 3 +-- 1 file chang

[PATCH v3 13/35] binman: Report an error if test files fail to compile

2021-10-25 Thread Simon Glass
At present any error from the 'make' command is silently swallowed by the test system. Fix this by showing it when detected. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/elf_test.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/binman/el

[PATCH v3 20/35] x86: Allow booting a kernel from the EFI app

2021-10-25 Thread Simon Glass
At present this is disabled, but it should work so long as the kernel does not need EFI services. Enable it and add a note about remaining work. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Update documentation arch/x86/lib/bootm.c | 11 +++ doc/

[PATCH v3 12/35] patman: Use a ValueError exception if tools.Run() fails

2021-10-25 Thread Simon Glass
The Exception base class is a very vague and could be confusing to the test system. Use the more specific ValueError exception instead. Signed-off-by: Simon Glass --- (no changes since v1) tools/patman/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/to

[PATCH v3 11/35] efi: Locate all block devices in the app

2021-10-25 Thread Simon Glass
When starting the app, locate all block devices and make them available to U-Boot. This allows listing partitions and accessing files in filesystems. EFI also has the concept of 'disks', meaning boot media. For now, this is not obviously useful in U-Boot, but add code to at least locate these. Thi

[PATCH v3 10/35] efi: Add a media/block driver for EFI block devices

2021-10-25 Thread Simon Glass
Add a block driver which handles read/write for EFI block devices. This driver actually already exists ('efi_block') but is not really suitable for use as a real U-Boot driver: - The operations do not provide a udevice - The code is designed for running as part of EFI loader, so uses EFI_PRINT

[PATCH v3 09/35] efi: Add EFI uclass for media

2021-10-25 Thread Simon Glass
At present UCLASS_EFI is used to represent an EFI filesystem among other things. The description of this uclass is "EFI managed devices" which is pretty vague. The only driver that uses this uclass is in fact not a real U-Boot driver, since its operations do not include a struct udevice. Rather th

[PATCH v3 08/35] efi: Add video support to the app

2021-10-25 Thread Simon Glass
The current EFI video driver only works when running in the stub. In that case the stub calls boot services (before jumping to U-Boot proper) and copies the graphics info over to the efi table. This is necessary because the stub exits boot services before jumping to U-Boot. The app maintains acces

[PATCH v3 07/35] efi: Add a way to obtain boot services in the app

2021-10-25 Thread Simon Glass
Add a function to return this information along with a stub for the efi_info_get() function, since calling it otherwise hangs U-Boot. Signed-off-by: Simon Glass --- (no changes since v1) include/efi.h | 8 +++- lib/efi/efi_app.c | 10 ++ 2 files changed, 17 insertions(+), 1 de

[PATCH v3 06/35] x86: Don't duplicate global_ptr in 64-bit EFI app

2021-10-25 Thread Simon Glass
This variable is already defined by the EFI code. Drop the duplicate definition when building a 64-bit EFI app. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/x86_64/cpu.c | 15 +-- arch/x86/cpu/x86_64/misc.c | 16 lib/efi/efi.c |

[PATCH v3 04/35] x86: Create a 32/64-bit selection for the app

2021-10-25 Thread Simon Glass
Most EFI implementations use 64-bit but U-Boot only supports running as a 32-bit app at present. While efi-x86_payload64 does boot from 64-bit UEFI it immediately changes back to 32-bit before starting U-Boot. In order to support a 64-bit U-Boot app, update the Kconfig to add an option for 32/64 b

[PATCH v3 03/35] efi: Drop the OF_EMBED warning for EFI

2021-10-25 Thread Simon Glass
For the EFI app, we must embed the devicetree in the ELF file since that is the only thing that is run by UEFI. Drop the warning to avoid confusion. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to drop the OF_EMBED warning for EFI Makefile | 2 +- 1 file

[PATCH v3 05/35] efi: Create a 64-bit app

2021-10-25 Thread Simon Glass
Most modern platforms use 64-bit EFI so it is useful to have a U-Boot app that runs under that. Add a (non-functional) build for this. Note that --whole-archive causes the gcc 9.2 linker to crash, so disable this for now. Once this is resolved, things should work. For now, avoid mentioning the do

[PATCH v3 01/35] efi: Add a script for building and testing U-Boot on UEFI

2021-10-25 Thread Simon Glass
It is quite complicated to run U-Boot on QEMU since we have four different builds and they must use different versions of qemu and the UEFI binaries. Add a script to help. Signed-off-by: Simon Glass --- Changes in v3: - Fix 'complicating' typo - s/qemu/QEMU/ Changes in v2: - Add MAINTAINERS en

[PATCH v3 02/35] efi: Enable DM_ETH for the app

2021-10-25 Thread Simon Glass
There is no need to avoid driver model for networking. Drop this. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to enable DM_ETH for the app configs/efi-x86_app_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/efi-x86_app_defconfig b/c

[PATCH v3 00/35] efi: Improvements to U-Boot running on top of UEFI

2021-10-25 Thread Simon Glass
At present U-Boot can be built as an EFI app, but it is really just for testing, with very few features. Instead, the payload build is used for booting on top of UEFI, where U-Boot takes over the machine immediately and supplies its own drivers. But the app could be made more useful. This series

Re: [PATCH v2 05/39] x86: Show some EFI info with the bdinfo command

2021-10-25 Thread Simon Glass
Hi Heinrich, On Mon, 18 Oct 2021 at 11:15, Heinrich Schuchardt wrote: > > On 9/25/21 2:30 AM, Simon Glass wrote: > > It is useful to see some basic EFI info with the command as it forms part > > of the information about a board. > > > > Add a hook for this and show the table address as a start. >

Re: [PATCH 6/6] scripts: remove CONFIG_IS_ENABLED in config_whitelist.txt

2021-10-25 Thread Simon Glass
Hi Patrick, On Fri, 22 Oct 2021 at 11:13, Patrick DELAUNAY wrote: > > Hi Simon > > On 10/14/21 5:09 PM, Simon Glass wrote: > > Hi Patrick, > > > > On Mon, 4 Oct 2021 at 04:00, Patrick Delaunay > > wrote: > >> Redefine the macro CONFIG_IS_ENABLED is not allowed, > >> so this entry can be removed

Re: [PATCH v2 15/39] efi: Add EFI uclass for media

2021-10-25 Thread Simon Glass
Hi Heinrich, On Sat, 23 Oct 2021 at 06:31, Heinrich Schuchardt wrote: > > > > On 9/25/21 02:30, Simon Glass wrote: > > At present UCLASS_EFI is used to represent an EFI filesystem among other > > UCLASS_EFI is for UEFI drivers that provide the driver binding protocol. > > Your new UCLASS seems to

Re: [PATCH v2 24/39] efi: serial: Support arrow keys

2021-10-25 Thread Simon Glass
Hi Heinrich, On Mon, 18 Oct 2021 at 11:00, Heinrich Schuchardt wrote: > > On 9/25/21 2:30 AM, Simon Glass wrote: > > At present only the backspace key is supported in U-Boot, when running as > > an EFI app. Add support for arrows, home and end as well, to make the CLI > > more friendly. > > > > S

Re: [PATCH v2 09/39] efi: Drop the OF_EMBED warning for EFI

2021-10-25 Thread Simon Glass
Hi Heinrich, On Sat, 23 Oct 2021 at 05:42, Heinrich Schuchardt wrote: > > > > On 9/25/21 02:30, Simon Glass wrote: > > For the EFI app, we must embed the devicetree in the ELF file since that > > is the only thing that is run by UEFI. Drop the warning to avoid > > confusion. > > > > Signed-off-by

Re: [PATCH v2 07/39] efi: Add a script for building and testing U-Boot on UEFI

2021-10-25 Thread Simon Glass
Hi Heinrich, On Mon, 25 Oct 2021 at 13:40, Heinrich Schuchardt wrote: > > > > On 9/25/21 02:30, Simon Glass wrote: > > It is quite complicating to run U-Boot on qemu since we have four > > different builds and they must use different versions of qemu and the > > UEFI binaries. > > > > Add a scrip

Re: [PATCH v2 06/39] x86: Tidy up global_data pointer for 64-bit

2021-10-25 Thread Simon Glass
Hi Heinrich, On Mon, 18 Oct 2021 at 11:15, Heinrich Schuchardt wrote: > > On 9/25/21 2:30 AM, Simon Glass wrote: > > Add an extern declaration so that it is possible to use this macro in > > files other than the one that defines it. > > > > Signed-off-by: Simon Glass > > Reviewed-by: Heinrich Sc

[PATCH v3 3/3] rockchip: rk3568: add arch_cpu_init()

2021-10-25 Thread Nico Cheng
We configured the drive strength and security of EMMC in arch_cpu_init(). Signed-off-by: Nico Cheng --- Changes in v3: Replace configuration parameters of SGRF_SOC_CON4 with macro definitions. Changes in v2: We use the rk_clrreg function instead of the writel to set eMMC sdmmc0 to secure. Modif

[PATCH v3 2/3] arm: dts: rockchip: rk3568: Enable sdhci and sdmmc0 node

2021-10-25 Thread Nico Cheng
Enable sdhci and sdmmc0 node in rk3568-u-boot.dtsi Signed-off-by: Nico Cheng --- (no changes since v1) arch/arm/dts/rk3568-u-boot.dtsi | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/dts/rk3568-u-boot.dtsi b/arch/arm/dts/rk3568-u-boot.dtsi index 1570f13fc7..5a80

[PATCH v3 1/3] rockchip: Kconfig: Enable SPL support for rk3568

2021-10-25 Thread Nico Cheng
Enable SPL support in Kconfig and add some related option in rk3568_common.h Signed-off-by: Nico Cheng Signed-off-by: Jason Zhu --- (no changes since v1) arch/arm/mach-rockchip/Kconfig | 2 ++ configs/evb-rk3568_defconfig| 25 - include/configs/rk3568_common.h |

[PATCH v3 0/3] Add SPL build support for RK3568

2021-10-25 Thread Nico Cheng
This series adds support for the rk3568 SOC, SPL load next-stage image from eMMC will be supported after this series of patches. Changes in v3: Replace configuration parameters of SGRF_SOC_CON4 with macro definitions. Changes in v2: We use the rk_clrreg function instead of the writel to set eMM

Re: [PATCH] clk: introduce u-boot,ignore-clk-defaults

2021-10-25 Thread Sean Anderson
On 10/25/21 9:23 PM, Sean Anderson wrote: On 10/25/21 11:18 AM, Simon Glass wrote: Hi Sean, On Sun, 24 Oct 2021 at 18:13, Sean Anderson wrote: On 10/14/21 10:19 PM, Simon Glass wrote: Hi Peng, Sean, On Thu, 14 Oct 2021 at 19:17, Peng Fan wrote: Subject: Re: [PATCH] clk: introduce u-boo

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-10-25 Thread Simon Glass
Hi Rasmus, On Tue, 28 Sept 2021 at 02:57, Rasmus Villemoes wrote: > > The build system already automatically looks for and includes an > in-tree *-u-boot.dtsi when building the control .dtb. However, there > are some things that are awkward to maintain in such an in-tree file, > most notably the

Re: [PATCH v3 00/18] pxe: Refactoring to tidy up and prepare for bootflow

2021-10-25 Thread Simon Glass
Hi Ramon, On Thu, 14 Oct 2021 at 12:48, Simon Glass wrote: > > This collects together the patches previously sent relating to PXE. > > Firstly, it moves the boot code out of common/ and into a new boot/ > directory. This helps to collect these related files in one place, as > common/ is quite lar

Re: [PATCH] clk: introduce u-boot,ignore-clk-defaults

2021-10-25 Thread Sean Anderson
On 10/25/21 11:18 AM, Simon Glass wrote: Hi Sean, On Sun, 24 Oct 2021 at 18:13, Sean Anderson wrote: On 10/14/21 10:19 PM, Simon Glass wrote: Hi Peng, Sean, On Thu, 14 Oct 2021 at 19:17, Peng Fan wrote: Subject: Re: [PATCH] clk: introduce u-boot,ignore-clk-defaults On 10/13/21 5:37 AM

Re: [Query - 5 Mins] Information on U-BOOT FIT Malloc changes

2021-10-25 Thread Alex G.
On 10/25/21 6:55 PM, Spandan Mahadevegowda wrote: Hello Alexandru, I'm currently working on some POC on Pine64 that requires a Trusted Execution Environment. I was using U-Boot 2020.10 with SPL_FIT_GENERATOR and modified mksunxi_fit_atf.sh to accommodate OP-TEE. However, due to new changes in

[PATCH v5 15/26] arm: highbank: Add a fake devicetree file

2021-10-25 Thread Simon Glass
Add an empty file to prevent build errors when building with CONFIG_OF_SEPARATE enabled. Unfortunately there are no build instructions in the U-Boot tree to enable a real file to be created. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/Makefile | 2 ++ arch/arm/dts/

[PATCH v5 26/26] fdt: Don't call board_fdt_blob_setup() without OF_BOARD

2021-10-25 Thread Simon Glass
At present this override function is called even when OF_BOARD Is not enabled. This makes it impossible to disable this feature and in fact makes the OF_BOARD option useless. Reinstate its intended purpose, so that it is possible to switch between the appended devicetree and one provided by the bo

[PATCH v5 25/26] fdt: Drop remaining preprocessor macros in fdtdec_setup()

2021-10-25 Thread Simon Glass
We only have two choices for obtaining the devicetree. Simplify the code to make that clear. Signed-off-by: Simon Glass --- (no changes since v1) lib/fdtdec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 0973cf0690b..067c2

[PATCH v5 21/26] fdt: Drop CONFIG_SPL_BUILD check in fdtdec_setup()

2021-10-25 Thread Simon Glass
Move this to the header file to clean up the C code. Signed-off-by: Simon Glass --- (no changes since v1) include/fdtdec.h | 14 ++ lib/fdtdec.c | 6 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/fdtdec.h b/include/fdtdec.h index 239814228d7..3

[PATCH v5 22/26] fdt: Drop #ifdef around board_fdt_blob_setup()

2021-10-25 Thread Simon Glass
This serves no purpose. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) lib/fdtdec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 69877baaaf5..5a4cf440fa7 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1203,7 +1203,6 @@ static int uncom

[PATCH v5 20/26] fdt: Drop #ifdefs with MULTI_DTB_FIT

2021-10-25 Thread Simon Glass
Refactor the code to drop the #ifdefs for this feature. Signed-off-by: Simon Glass --- (no changes since v1) dts/Kconfig | 1 - include/asm-generic/global_data.h | 8 lib/fdtdec.c | 31 +++ 3 files changed, 19 in

  1   2   3   >