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

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

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.

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

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:

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

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

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

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

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

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:

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

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

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

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(+),

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

[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: -

[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

[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

[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

[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

[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

[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 ---

[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 +++

[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 ---

[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

[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

[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

[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

[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

[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

[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

[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 +++

[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

[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.

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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. > > > >

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. > > > >

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

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

[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.

[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

[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

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

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

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

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

[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 ++

[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

[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

[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

[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

[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

[PATCH v5 16/26] fdt: Make OF_BOARD a bool option

2021-10-25 Thread Simon Glass
This should not be a separate option from OF_SEPARATE. It is a run-time option to override the devicetree, even if present. Move the option out of the choice. Disable BINMAN_FDT for a few boards which don't actually use it. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v5 18/26] doc: Update info on devicetree update

2021-10-25 Thread Simon Glass
Since OF_BOARD has been corrected to be a run-time option, we can drop the historical info from this documentation. Signed-off-by: Simon Glass --- (no changes since v1) doc/develop/devicetree/dt_update.rst | 74 +++- 1 file changed, 8 insertions(+), 66 deletions(-)

[PATCH v5 17/26] Drop CONFIG_BINMAN_STANDALONE_FDT

2021-10-25 Thread Simon Glass
This was added as a hack to work around not having an in-tree devicetree. Now that this is fixed it is not needed. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) Makefile| 3 +-- dts/Kconfig | 18 -- tools/binman/binman.rst | 20

[PATCH v5 19/26] fdt: Move MULTI_DTB_FIT handling out of fdtdec_setup()

2021-10-25 Thread Simon Glass
This logic is a bit convoluted for one function. Move the mulit-FIT part into its own function. Signed-off-by: Simon Glass --- (no changes since v1) lib/fdtdec.c | 62 1 file changed, 38 insertions(+), 24 deletions(-) diff --git

[PATCH v5 12/26] arm: xilinx_versal_virt: Add a devicetree file

2021-10-25 Thread Simon Glass
Add a devicetree file obtained from qemu for this board. This was obtained with: qemu-system-aarch64 -M xlnx-versal-virt -machine dumpdtb=dtb.dtb Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/Makefile| 3 +- arch/arm/dts/xilinx-versal-virt.dts | 307

[PATCH v5 13/26] arm: bcm7xxx: Add a devicetree file

2021-10-25 Thread Simon Glass
Add a dummy devicetree file for these boards. It seems to be possible to obtain a real one from another bootloader called 'bolt' but I will leave this to the maintainer. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/Makefile | 2 ++ arch/arm/dts/bcm7xxx.dts | 15

[PATCH v5 09/26] arm: vexpress: Add a devicetree file for juno

2021-10-25 Thread Simon Glass
Add this file, obtained from the Linaro website[1], so there is a reference file in the U-Boot tree. Note that U-Boot does not normally need this at runtime, since CONFIG_OF_BOARD is enabled. The previous firmware stage provides a devicetree at runtime. [1]

[PATCH v5 14/26] arm: qemu-ppce500: Add a devicetree file

2021-10-25 Thread Simon Glass
Add a devicetree file obtained from qemu for this board. This was obtained with: qemu-system-ppc64 -machine ppce500 -cpu e6500 -M dumpdtb=dtb.dtb Signed-off-by: Simon Glass --- (no changes since v1) arch/powerpc/dts/Makefile | 1 + arch/powerpc/dts/qemu-ppce500.dts | 264

[PATCH v5 08/26] arm: rpi: Add a devicetree file for rpi_4

2021-10-25 Thread Simon Glass
Add this file, obtained from the Raspbian boot disk, so there is a reference devicetree in the U-Boot tree. The same one is used for 32- and 64-bit variants. Note that U-Boot does not normally need this at runtime, since CONFIG_OF_BOARD is enabled. The previous firmware stage provides a

[PATCH v5 11/26] arm: octeontx: 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| 3 +++

[PATCH v5 02/26] doc: Add documentation about devicetree usage

2021-10-25 Thread Simon Glass
At present some of the ideas and techniques behind devicetree in U-Boot are assumed, implied or unsaid. Add some documentation to cover how devicetree is build, how it can be modified and the rules about using the various CONFIG_OF_... options. Signed-off-by: Simon Glass Reviewed-by: Marcel

[PATCH v5 10/26] arm: xenguest_arm64: 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. The build instructions in U-Boot do not provide enough detail to build a useful devicetree, unfortunately. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/Makefile| 2 ++

[PATCH v5 06/26] arm: qemu: Add a devicetree file for qemu_arm64

2021-10-25 Thread Simon Glass
Add this file, generated from qemu, so there is a reference devicetree in the U-Boot tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/Makefile| 2 +- arch/arm/dts/qemu-arm64.dts | 381 +++ configs/qemu_arm64_defconfig | 1 +

[PATCH v5 07/26] riscv: qemu: Add devicetree files for qemu_riscv32/64

2021-10-25 Thread Simon Glass
Add these files, generated from qemu, so there is a reference devicetree in the U-Boot tree. Split the existing qemu-virt into two, since we need a different devicetree for 32- and 64-bit machines. Signed-off-by: Simon Glass --- (no changes since v1) arch/riscv/dts/Makefile |

[PATCH v5 05/26] arm: qemu: Add a devicetree file for qemu_arm

2021-10-25 Thread Simon Glass
Add this file, generated from qemu, so there is a reference devicetree in the U-Boot tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/dts/Makefile | 2 + arch/arm/dts/qemu-arm.dts | 402 + configs/qemu_arm_defconfig | 1 + 3

[PATCH v5 04/26] arm: riscv: qemu: Explain how to extract the generated dt

2021-10-25 Thread Simon Glass
QEMU currently generates a devicetree for use with U-Boot. Explain how to obtain it. Also explain how to merge it to produce a devicetree with the U-Boot features included. Signed-off-by: Simon Glass --- Changes in v5: - Merge RISC-V and ARM patches since they are similar

[PATCH v5 03/26] arm: qemu: Mention -nographic in the docs

2021-10-25 Thread Simon Glass
Without this option QEMU appears to hang. Add it to avoid confusion. Signed-off-by: Simon Glass --- (no changes since v1) doc/board/emulation/qemu-arm.rst | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/board/emulation/qemu-arm.rst

[PATCH v5 01/26] sandbox: Remove OF_HOSTFILE

2021-10-25 Thread Simon Glass
From: Ilias Apalodimas OF_HOSTFILE is used on sandbox configs only. Although it's pretty unique not a source of any confusions, we are better of having simple config options for the DTB. So let's replace that with the existing OF_BOARD. This will make U-Boot have only three different config

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

2021-10-25 Thread Simon Glass
With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so there are only three ways to obtain a devicetree: - OF_SEPARATE - the normal way, where the devicetree is built and appended to U-Boot - OF_EMBED - for development purposes, the devicetree is embedded in the

[PATCH v3 2/2] cmd: brcm: netXtreme commands

2021-10-25 Thread Roman Bacik
From: Bharat Gooty Following netXtreme commands are supported: probe, remove. Signed-off-by: Bharat Gooty Signed-off-by: Roman Bacik --- Changes in v3: - remove commands set/get mac/speed - add doc/bnxt.rst cmd/Kconfig | 2 + cmd/broadcom/Kconfig | 10 +

Re: [PATCH] introduce CONFIG_DEVICE_TREE_INCLUDES

2021-10-25 Thread Sean Anderson
Hi Roman, On 9/28/21 5:55 AM, Roman Kopytin wrote: Hi, all I prepared 3 patches for fdt_add_pubkey adding. But in our company infrastructure I can't use git send-email. Our IT can't help me to resolve issue. It appears that Linux offers email hosting [1] for this purpose. However, you need

[PATCH 1/1] env: superfluous check before free()

2021-10-25 Thread Heinrich Schuchardt
Free() checks if its argument in NULL. There is no need for the caller to do the same. Signed-off-by: Heinrich Schuchardt --- env/flash.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/env/flash.c b/env/flash.c index ebee9069e4..473e82454d 100644 --- a/env/flash.c +++

[PATCH] dfu: Sort Kconfig entries alphabetically

2021-10-25 Thread Marek Vasut
The DFU_MTD Kconfig entry is in the wrong position, move it into the correct alphabetically sorted position. No functional change. Signed-off-by: Marek Vasut Cc: Lukasz Majewski Cc: Patrice Chotard Cc: Patrick Delaunay --- drivers/dfu/Kconfig | 14 +++--- 1 file changed, 7

  1   2   3   >