[PATCH v2 02/29] video: Move vesa_setup_video_priv() into its own file

2025-02-08 Thread Simon Glass
This helper is used by the EFI driver and we would like to use that on ARM. Move the helper function into its own file, separate from PCI ROMs, which are an x86 thing. Add a forward declaration for struct udevice so that the header can be included directly. Signed-off-by: Simon Glass --- (no ch

[PATCH v2 01/29] Makefile: Avoid using TEXT_BASE if not present

2025-02-08 Thread Simon Glass
This value is only available if CONFIG_HAVE_TEXT_BASE is enabled. Add conditions to avoid introducing errors in link scripts when it is not. Signed-off-by: Simon Glass --- Changes in v2: - Depend on CONFIG_EFI_APP instead - Drop change to u-boot-elf rule Makefile | 2 ++ 1 file changed, 2 inse

[PATCH v2 03/29] video: Use a local mode_info struct in the EFI driver

2025-02-08 Thread Simon Glass
There is no need to use the global struct provided by PCI. Declare a local structure instead, so this can be used on ARM without including support for PCI ROMs. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/efi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/

[PATCH v2 05/29] efi: Rename app and payload to include x86

2025-02-08 Thread Simon Glass
Since we plan to support the EFI app and payload on 64-bit ARM too, rename the x86 target. Adjust the Kconfig rules to allow non-x86 builds to be added. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Mention '64-bit ARM' here, rather than just 'ARM' board/efi/Kconfig

[PATCH v2 04/29] lib: Provide fdtdec_get_pci_bar32() only with PCI enabled

2025-02-08 Thread Simon Glass
This function calls dm_pci_read_bar32() which is only available if PCI is enabled. Add this condition here too, so that the EFI app can build without needing --gc-sections Signed-off-by: Simon Glass Reviewed-by: Matthias Brugger Reviewed-by: Tom Rini --- (no changes since v1) lib/fdtdec.c |

[PATCH v2 07/29] efi: x86: Move EFI SDRAM-handling into a common file

2025-02-08 Thread Simon Glass
This code is not actually x86-specific, so move it into the lib/efi dir where other archs can use it. Drop inclusion of the unnecessary x86-specific header. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/x86/cpu/efi/Makefile | 1 - lib/efi/Makefile

[PATCH v2 08/29] treewide: Rename VENDOR_EFI to ARCH_EFI

2025-02-08 Thread Simon Glass
The 'vendor' concept comes from arch/x86. Rather than letting this spread around the tree, rename it to ARCH_EFI. While EFI is not quite an architecture in the strict sense, it is similar to sandbox in that it sits somewhat above the CPU architecture. Signed-off-by: Simon Glass --- Ideas for a b

[PATCH v2 06/29] efi: Allow board/efi Kconfig to be used outside x86

2025-02-08 Thread Simon Glass
So far only x86 supports the EFI app. ARM is going the same way, so allow these options to be enabled for 64-bit ARM too. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: - Drop the word 'Sadly' - Mention '64-bit ARM' here, rather than just 'ARM' arch/Kconfig | 2 ++ a

[PATCH v2 10/29] efi: x86: Allow setting the global_data pointer with EFI

2025-02-08 Thread Simon Glass
Provide a function which sets this pointer, for use in the EFI app. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/global_data.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index

[PATCH v2 09/29] efi: x86: Rework VENDOR_EFI option to permit other archs

2025-02-08 Thread Simon Glass
At present only x86 supports the EFI app and (apart from Qualcomm) the payload. In preparation for supporting 64-bit ARM more generally, rename the existing ARCH_EFI option to ARCH_EFI_X86, using that to define a generic ARCH_EFI which will be enabled for all architectures. Signed-off-by: Simon Gl

[PATCH v2 11/29] efi: Tidy up setup of global_data

2025-02-08 Thread Simon Glass
Use the available functions for setting and getting the global_data pointer so that EFI-startup can operate on 64-bit ARM as well as x86. Signed-off-by: Simon Glass --- Changes in v2: - Mention '64-bit ARM' here, rather than just 'ARM' lib/efi/efi_app.c | 13 - 1 file changed, 8 in

[PATCH v2 12/29] efi: Rename ImageBase to image_base

2025-02-08 Thread Simon Glass
It is confusing to have a camel-case indentifier in the these files. Rename them to fit with U-Boot's snake-case style. The image_base symbol is already used in the x86 link-scripts. Signed-off-by: Simon Glass --- Changes in v2: - Rework the commit message to clarify the relationship to link-sc

[PATCH v2 14/29] efi: arm: Don't do the EL2 switch when running under EFI

2025-02-08 Thread Simon Glass
The previous bootloader has likely done this already, so avoid trying to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/bootm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/

[PATCH v2 15/29] efi: arm: Avoid allocating page tables when running under EFI

2025-02-08 Thread Simon Glass
The previous bootloader has already set up the page tables, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/cache.c b/ar

[PATCH v2 13/29] efi: lmb: Avoid access to _start

2025-02-08 Thread Simon Glass
The app does not have this symbol. Also the memory where the app is loaded is not under U-Boot's control. There is no sense in relocating from one alloced region to another. U-Boot is not able to relocate to the top of memory, nor decide what other parts of memory are used for. For these reasons,

[PATCH v2 17/29] efi: arm: Implement access to global_data for EFI

2025-02-08 Thread Simon Glass
The EFI app likes to use a simple variable for global data. Implement this for ARM (for use only with 64-bit ARM at present). Signed-off-by: Simon Glass --- Changes in v2: - Mention '64-bit ARM' here, rather than just 'ARM' arch/arm/include/asm/global_data.h | 14 -- 1 file changed

[PATCH v2 18/29] efi: arm: Omit the ARM start-up code in the EFI app

2025-02-08 Thread Simon Glass
This code is not used with the EFI app, since it enters through a call to efi_main(). Remove start.S and crt files from the build. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/Makefile | 2 ++ arch/arm/lib/Makefile | 6 -- 2 files changed, 6 inse

[PATCH v2 16/29] efi: arm: Avoid enabling caches when running under EFI

2025-02-08 Thread Simon Glass
The previous bootloader has already set up the cache, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- (no changes since v1) common/board_r.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/board_r.c

[PATCH v2 19/29] efi: arm: Drop exception code when running as an EFI app

2025-02-08 Thread Simon Glass
This code cannot be used since EFI is in charge of managing exceptions. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/cpu/armv8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile index

[PATCH v2 20/29] efi: arm: x86: Allow use of the EFI table in the app

2025-02-08 Thread Simon Glass
It isn't worth the hassle of omitting this field for the app, since code is shared between the payload and the app. Adjust the condition to avoid a build error in the 'efi' command with the app on 64-bit ARM. Signed-off-by: Simon Glass --- Changes in v2: - Document the x86 field better and add a

[PATCH v2 21/29] efi: arm: Disable --gc-sections for the app

2025-02-08 Thread Simon Glass
This option cannot be used with a shared library, since it results in everything being removed. Disable it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/config.mk b/arch/arm/config.

[PATCH v2 23/29] efi: arm: Adjust how the monitor length is calculated

2025-02-08 Thread Simon Glass
Adjust the conditions to support the EFI app when running on ARM. Signed-off-by: Simon Glass --- Changes in v2: - Put the EFI-app case first in setup_mon_len(), for clarity common/board_f.c | 6 +++--- common/board_r.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/co

[PATCH v2 22/29] efi: arm: Drop startup code from the app

2025-02-08 Thread Simon Glass
The EFI app uses different startup and relocation code and the existing code uses symbols not present in the app. Drop it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/cpu/armv8/Makefile | 2 ++ arch/arm/lib/Makefile | 4 +++- 2 files changed, 5 in

[PATCH v2 24/29] efi: arm: Provide startup and relocation code

2025-02-08 Thread Simon Glass
Build in the EFI-app startup code as well as the code to relocate U-Boot to the loaded position, since this is under the control of the previous firmware. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/lib/Makefile | 2 ++ 1 file changed, 2 insertions(+)

[PATCH v2 25/29] efi: Generate the app as a shared library

2025-02-08 Thread Simon Glass
The app should be built as a shared library, with position-independent code and the -shared flags. Update the Makefile to handle this. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index f989c31073f..b3

[PATCH v2 27/29] efi: arm: Use EFI flags for all compilation with the app

2025-02-08 Thread Simon Glass
As opposed to the payload, which is built normally with just an EFI stub, the app is build homogenously using EFI flags. Update PLATFORM_CPPFLAGS to enable this. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/cpu/armv8/config.mk | 4 1 file changed, 4 insertions(+) diff --

[PATCH v2 26/29] efi: arm: Disable STATIC_RELA for the EFI app

2025-02-08 Thread Simon Glass
This feature should not be used with the app, since we don't know where U-Boot will be loaded. Disable it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a55ba6b

[PATCH v2 28/29] efi: arm: Simplify the crt0 file and update link script

2025-02-08 Thread Simon Glass
We don't need to manually add the PE header, since binutils has support for this now. Remove it to simplify the file. Set the link-target to efi-app-aarch64 so that binutils knows what to do. Add rules to pick up the arm64 files. Make some updates to the link-script for arm64, so this all works:

[PATCH v2 29/29] efi: arm: Add an EFI app for arm64

2025-02-08 Thread Simon Glass
Introduce an EFI app for arm64 and update the documentation. Provide a value for LOAD_ADDR to avoid a link error. Signed-off-by: Simon Glass --- Changes in v2: - Use ARCH_EFI instead of VENDOR_EFI - Merge the linker-script rules into Kconfig in this patch - Drop patch 'Select the EFI linker scr

Re: [PATCH 2/6] riscv: dts: starfive: DeepComputing FML13V01 binman config

2025-02-08 Thread Simon Glass
Hi Heinrich, On Fri, 7 Feb 2025 at 10:23, Heinrich Schuchardt wrote: > > Add the DeepComputing Framework motherboard (FML13V01) to the binman > include for the starfive_visionfive2_defconfig. > > Signed-off-by: Heinrich Schuchardt > --- > arch/riscv/dts/starfive-visionfive2-binman.dtsi | 17 +++

[PATCH v2 00/29] arm: Support building as an EFI app

2025-02-08 Thread Simon Glass
The original x86 EFI-app was written back in 2015, about a year before the EFI-loader was introduced. At that point, ARM mostly used U-Boot and FIT (Flat Image Tree). Today, sadly, there are a few efforts to re-invent FIT poorly, to cater to more primitive boot-environments than U-Boot. One justif

[PATCH] configs: clearfog,helios4: disable sdhci sdma

2025-02-08 Thread Josua Mayer
Testing has shown that loading large initramfs causes data corruption where the kernel image had been loaded to. Debian 12 installation using a 17M initramfs boots fine, but the final system with an initramfs of 27M obscurely fails to boot with bootz reporting "Bad magic!". Inspecting kernel_addr_r

Re: [PATCH v4 05/12] power-domain: Add refcounting

2025-02-08 Thread Fabio Estevam
Hi Simon, On Wed, Jan 29, 2025 at 7:22 AM Miquel Raynal wrote: > > It is very surprising that such an uclass, specifically designed to > handle resources that may be shared by different devices, is not keeping > the count of the number of times a power domain has been > enabled/disabled to avoid

Re: [PATCH v3 1/6] fs: Add unimplemented rename hook to FS layer

2025-02-08 Thread Heinrich Schuchardt
On 2/7/25 13:45, Daniel Venzin wrote: The EFI API supports file renaming, which is required by systemd-stub for its bootcounting implementation. Signed-off-by: Daniel Venzin --- (no changes since v2) Changes in v2: - Adapt variable names for better consistency - Add missing rename hooks f

Re: [PATCH v3 2/6] efi_loader: Support for file renaming

2025-02-08 Thread Heinrich Schuchardt
On 2/7/25 13:45, Daniel Venzin wrote: File renaming is necessary for features like systemd-boot bootcounting. Signed-off-by: Daniel Venzin --- (no changes since v2) Changes in v2: - Use EFI_ACCESS_DENIED for unsuccessful renames - Avoid using of "== 0" - Move the call to set_blk_dev earlier

Re: [PATCH v3 3/6] fs: fat: Refactor delete_dentry_long interface

2025-02-08 Thread Heinrich Schuchardt
On 2/7/25 13:45, Daniel Venzin wrote: Directory entries cannot be deleted without also removing their corresponding FAT entries. This refactor allows for individual selection of deleting the directory entry and the FAT entry, facilitating better reuse of existing functionality. Signed-off-by: Da

Re: [PATCH v3 1/6] fs: Add unimplemented rename hook to FS layer

2025-02-08 Thread Heinrich Schuchardt
On 2/7/25 13:45, Daniel Venzin wrote: The EFI API supports file renaming, which is required by systemd-stub for its bootcounting implementation. Signed-off-by: Daniel Venzin Having a separate rename and move functionality makes no sense to me. The implementation for FAT would be nearly the s

Re: [PATCH v3 5/6] cmd: fat: Add fatrnfile command

2025-02-08 Thread Heinrich Schuchardt
On 2/7/25 13:45, Daniel Venzin wrote: The FAT rename file command supports renaming of a file, used by fs_test test suite. Signed-off-by: Daniel Venzin --- Changes in v3: - Add fatrnfile command for renaming files in a FAT file system cmd/fat.c| 13 + fs/fs.c | 20 +++

Re: [PATCH v3 4/6] fs: fat: Support basic file rename

2025-02-08 Thread Heinrich Schuchardt
On 2/7/25 13:45, Daniel Venzin wrote: This implementation currently does not support moving files between directories. Why would we make such a restriction? Signed-off-by: Daniel Venzin --- Changes in v3: - Abort the rename if the destination is a path instead of a file Changes in v2: -

Re: [PATCH v3 4/6] fs: fat: Support basic file rename

2025-02-08 Thread Heinrich Schuchardt
On 2/8/25 22:20, Heinrich Schuchardt wrote: On 2/7/25 13:45, Daniel Venzin wrote: This implementation currently does not support moving files between directories. Why would we make such a restriction? Signed-off-by: Daniel Venzin --- Changes in v3: - Abort the rename if the destination i

Re: [PATCH 01/17] miiphy: Introduce mdio_init()

2025-02-08 Thread Marek Vasut
On 2/4/25 7:17 PM, Paul Barker wrote: On 27/01/2025 13:28, Paul Barker wrote: On 27/01/2025 11:30, Marek Vasut wrote: On 1/27/25 11:32 AM, Paul Barker wrote: Hi Marek, On 25/01/2025 12:56, Marek Vasut wrote: On 1/21/25 3:38 PM, Paul Barker wrote: On 18/01/2025 06:53, Marek Vasut wrote: Int

Re: [PATCH] binman: Fill in most of the imx8mimage and imx8mcst tests

2025-02-08 Thread Marek Vasut
On 2/7/25 1:49 AM, Simon Glass wrote: Hi Marek, On Thu, 6 Feb 2025 at 13:52, Marek Vasut wrote: On 2/6/25 1:42 PM, Simon Glass wrote: Hi, FAILED (errors=1) So where is the SRK_1_2_3_4_table.bin file? See the tool documentation: https://gitlab.apertis.org/pkg/imx-code-signing-tool/-/blob

Re: [PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage

2025-02-08 Thread Marek Vasut
On 2/7/25 1:49 AM, Simon Glass wrote: Hi Marek, On Thu, 6 Feb 2025 at 13:52, Marek Vasut wrote: On 2/6/25 1:38 PM, Simon Glass wrote: Hi Marek, On Wed, 5 Feb 2025 at 07:37, Marek Vasut wrote: Add implementation of mkenvimage written purely in bourne shell. This is not a replacement for

Re: [PATCH v2 00/29] arm: Support building as an EFI app

2025-02-08 Thread Tom Rini
On Sat, Feb 08, 2025 at 10:11:20AM -0700, Simon Glass wrote: [snip] > Changes in v2: > - Depend on CONFIG_EFI_APP instead > - Drop change to u-boot-elf rule > - Mention '64-bit ARM' here, rather than just 'ARM' > - Drop the word 'Sadly' > - Mention '64-bit ARM' here, rather than just 'ARM' > - Add

Re: [PATCH v2 26/29] efi: arm: Disable STATIC_RELA for the EFI app

2025-02-08 Thread Tom Rini
On Sat, Feb 08, 2025 at 10:11:46AM -0700, Simon Glass wrote: > This feature should not be used with the app, since we don't know where > U-Boot will be loaded. Disable it. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

[PATCH 3/3] Revert "rockchip: rk3399: Fix TPL build of bob and kevin"

2025-02-08 Thread Jonas Karlman
These power rails must be on very early for the U-Boos TPL banner to be show over debug UART. This reverts commit 4576e65a5d6b10fd207c3a44061676ce0220d794. Signed-off-by: Jonas Karlman --- arch/arm/mach-rockchip/rk3399/rk3399.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 1/3] Revert "rockchip: rk3399: Drop unneeded bob and kevin board specific code"

2025-02-08 Thread Jonas Karlman
These power rails must be on very early for the U-Boos SPL banner to be show over debug UART. This reverts commit af518a1dfe637cb4dc486d7a832585e4a48bc970. Signed-off-by: Jonas Karlman --- arch/arm/mach-rockchip/rk3399/rk3399.c | 23 ++- 1 file changed, 22 insertions(+), 1 d

[PATCH 0/3] rockchip: rk3399-gru: Fix missing TPL and SPL banner on debug UART

2025-02-08 Thread Jonas Karlman
The PP1500 and PP3000 power rails must be on very early for the U-Boot TPL and SPL banner to be shown on debug UART for bob and kevin. This series restore the early power on of these power rails in board_debug_uart_init() for both TPL and SPL to restore the missing U-Boot TPL/SPL banner. The reve

[PATCH 2/3] rockchip: rk3399-gru: Enable TPL_GPIO for bob and kevin

2025-02-08 Thread Jonas Karlman
The PP1500 and PP3000 power rails must be on very early for the U-Boot TPL banner to be shown on debug UART. Enable TPL_GPIO Kconfig option for bob and kevin to allow use of spl_gpio.h functions in TPL. Signed-off-by: Jonas Karlman --- This fixes a linking issue that otherwise would happen with

Re: [PATCH 1/2] net: ravb: Drop empty init callback

2025-02-08 Thread Marek Vasut
On 2/4/25 7:30 PM, Paul Barker wrote: On 25/01/2025 12:34, Marek Vasut wrote: On 1/21/25 1:15 PM, Marek Vasut wrote: On 1/21/25 1:07 PM, Paul Barker wrote: On 18/01/2025 06:34, Marek Vasut wrote: The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is

Re: [PATCH v2 23/29] efi: arm: Adjust how the monitor length is calculated

2025-02-08 Thread Tom Rini
On Sat, Feb 08, 2025 at 10:11:43AM -0700, Simon Glass wrote: > Adjust the conditions to support the EFI app when running on ARM. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [PATCH v2 17/29] efi: arm: Implement access to global_data for EFI

2025-02-08 Thread Tom Rini
On Sat, Feb 08, 2025 at 10:11:37AM -0700, Simon Glass wrote: > The EFI app likes to use a simple variable for global data. Implement > this for ARM (for use only with 64-bit ARM at present). > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signatur

Re: [PATCH 02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop

2025-02-08 Thread Simon Glass
Hi Jonas, On Thu, 12 Dec 2024 at 16:57, Jonas Karlman wrote: > > Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option > instead of a hardcoded 0x4 for the FIT payload offset. > > This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x4. When you add CONFIG options into a devic

Re: [PATCH 02/12] rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop

2025-02-08 Thread Jonas Karlman
Hi Simon, On 2025-02-09 00:04, Simon Glass wrote: > Hi Jonas, > > On Thu, 12 Dec 2024 at 16:57, Jonas Karlman wrote: >> >> Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option >> instead of a hardcoded 0x4 for the FIT payload offset. >> >> This has no intended impact as SYS_SPI_

??????[PATCH v1] linker_lists:Update the alignment using CONFIG_LINKER_LIST_ALIGN

2025-02-08 Thread ??????
Dear Simon Glass, I noticed that the attached patch remains unmerged. While I believe it may have undergone prior auditing, I'm unable to locate the corresponding review records. Could you kindly confirm its status and initiate the merging process if appropriate? Please let me know if you need

Re: [PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage

2025-02-08 Thread Marek Vasut
On 2/7/25 8:40 AM, Alexander Dahl wrote: Hi Marek, had a short look on your script yesterday. Looks clean and well designed, nice job. Am Thu, Feb 06, 2025 at 09:38:58PM +0100 schrieb Marek Vasut: On 2/6/25 1:38 PM, Simon Glass wrote: Hi Marek, On Wed, 5 Feb 2025 at 07:37, Marek Vasut wrot

Re: [PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage

2025-02-08 Thread Marek Vasut
On 2/7/25 11:31 AM, Rasmus Villemoes wrote: On Wed, Feb 05 2025, Marek Vasut wrote: Add implementation of mkenvimage written purely in bourne shell. This is not a replacement for mkenvimage tool, but rather a simple implementation which can be used in environments where mkenvimage itself cann

Re: [PATCH 14/29] rockchip: Add SPL into the main FIT

2025-02-08 Thread Jonas Karlman
Hi Simon, On 2025-02-05 02:55, Simon Glass wrote: > VBE may want to load the SPL image from the same FIT as contains U-Boot, > if there is enough memory, so add it. > > Signed-off-by: Simon Glass > --- > > arch/arm/dts/rockchip-u-boot.dtsi | 23 +++ > 1 file changed, 23 ins

Re: [PATCH 19/29] rockchip: Add TPL alternatives

2025-02-08 Thread Jonas Karlman
Hi Simon, On 2025-02-05 02:55, Simon Glass wrote: > The TPL image must be built for each board we need to support. It is the > only part of the image which is board-specific. Is this building for multiple targets required for A, B or recovery?, the main topic for this series? If not it should be

[PATCH v3 0/4] Enable bloblist support on Vexpress64

2025-02-08 Thread Harrison Mutai
This series of patches enhances the vexpress64 platform by enabling bloblist support. It also introduces support for CONFIG_BLOBLIST_PASSAGE. This is necessary to boot vexpress64 and other boards without manually specifying a fixed address and size for the bloblist. After this change, all the blob

Re: Help needed: How to Specify MTD Partitions on NAND in a Device Tree

2025-02-08 Thread Mauri Sandberg
On 7.2.2025 22.33, Mauri Sandberg wrote: > Hi Weijie > > On 2/7/25 21:53, Weijie Gao wrote: >> Here's an example: >> https://github.com/openwrt/openwrt/blob/main/package/boot/uboot- >> mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch#L316 > > Sorry, I should have been more sp

Re: [PATCH 2/6] riscv: dts: starfive: DeepComputing FML13V01 binman config

2025-02-08 Thread E Shattow
On Fri, Feb 7, 2025, 10:33 Heinrich Schuchardt < heinrich.schucha...@canonical.com> wrote: > > > E Shattow schrieb am Fr., 7. Feb. 2025, 19:12: > >> Is this use of filename preferable compared to a cherry-pick commit >> of/from dt-rebasing? >> > The upstream device-tree is already meged into U-Bo

[PATCH] CI: Use different git-directory for each runner

2025-02-08 Thread Simon Glass
It seems that the new approach doesn't go far enough, since when there are multiple independent runners on a machine, they end up sharing the same git directory. Add $CI_RUNNER_ID as well, so they are kept separate. Signed-off-by: Simon Glass --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insert

[PATCH v2] configs: clearfog,helios4: disable sdhci sdma

2025-02-08 Thread Josua Mayer
r now as a workaround. Signed-off-by: Josua Mayer --- Changes in v2: - changed *all* a388 clearfog_* defconfig files - Link to v1: https://lore.kernel.org/r/20250208-a388-kerneladdr-v1-1-1ed91f642...@solid-run.com --- configs/clearfog_defconfig | 1 - configs/clearfog_sata_defconfig | 1

Re: [PATCH 2/6] riscv: dts: starfive: DeepComputing FML13V01 binman config

2025-02-08 Thread Heinrich Schuchardt
Simon Glass schrieb am Sa., 8. Feb. 2025, 18:16: > Hi Heinrich, > > On Fri, 7 Feb 2025 at 10:23, Heinrich Schuchardt > wrote: > > > > Add the DeepComputing Framework motherboard (FML13V01) to the binman > > include for the starfive_visionfive2_defconfig. > > > > Signed-off-by: Heinrich Schuchard

Re: [PATCH] CI: Use different git-directory for each runner

2025-02-08 Thread Tom Rini
On Sat, Feb 08, 2025 at 06:34:24AM -0700, Simon Glass wrote: > It seems that the new approach doesn't go far enough, since when there > are multiple independent runners on a machine, they end up sharing the > same git directory. > > Add $CI_RUNNER_ID as well, so they are kept separate. > > Signe

Re: [PATCH 29/29] bloblist: Allow relocation at the end of the SPL phase

2025-02-08 Thread Simon Glass
Hi Tom, On Wed, 5 Feb 2025 at 06:52, Tom Rini wrote: > > On Tue, Feb 04, 2025 at 06:55:19PM -0700, Simon Glass wrote: > > > Where the bloblist is located in internal memory and TF-A's BL31 blob > > removes access to this memory, the best option seems to be to relocate > > the bloblist just before

Re: [PATCH v2 00/29] arm: Support building as an EFI app

2025-02-08 Thread Simon Glass
Hi Tom, On Sat, 8 Feb 2025 at 14:29, Tom Rini wrote: > > On Sat, Feb 08, 2025 at 10:11:20AM -0700, Simon Glass wrote: > > [snip] > > Changes in v2: > > - Depend on CONFIG_EFI_APP instead > > - Drop change to u-boot-elf rule > > - Mention '64-bit ARM' here, rather than just 'ARM' > > - Drop the wo

Re: [PATCH v2 00/29] arm: Support building as an EFI app

2025-02-08 Thread Tom Rini
On Sat, Feb 08, 2025 at 03:40:07PM -0700, Simon Glass wrote: > Hi Tom, > > On Sat, 8 Feb 2025 at 14:29, Tom Rini wrote: > > > > On Sat, Feb 08, 2025 at 10:11:20AM -0700, Simon Glass wrote: > > > > [snip] > > > Changes in v2: > > > - Depend on CONFIG_EFI_APP instead > > > - Drop change to u-boot-e

[PATCH v3 21/29] efi: arm: Disable --gc-sections for the app

2025-02-08 Thread Simon Glass
This option cannot be used with a shared library, since it results in everything being removed. Disable it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/config.mk b/arch/arm/config.

[PATCH v3 20/29] efi: arm: x86: Allow use of the EFI table in the app

2025-02-08 Thread Simon Glass
It isn't worth the hassle of omitting this field for the app, since code is shared between the payload and the app. Adjust the condition to avoid a build error in the 'efi' command with the app on 64-bit ARM. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Document the x86

[PATCH v3 12/29] efi: Rename ImageBase to image_base

2025-02-08 Thread Simon Glass
It is confusing to have a camel-case indentifier in the these files. Rename them to fit with U-Boot's snake-case style. The image_base symbol is already used in the x86 link-scripts. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Rework the commit message to clarify the

[PATCH v3 05/29] efi: Rename app and payload to include x86

2025-02-08 Thread Simon Glass
Since we plan to support the EFI app and payload on 64-bit ARM too, rename the x86 target. Adjust the Kconfig rules to allow non-x86 builds to be added. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Mention '64-bit ARM' here, rather than just 'ARM

[PATCH v3 18/29] efi: arm: Omit the ARM start-up code in the EFI app

2025-02-08 Thread Simon Glass
This code is not used with the EFI app, since it enters through a call to efi_main(). Remove start.S and crt files from the build. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/Makefile | 2 ++ arch/arm/lib/Makefile | 6 -- 2 files changed, 6 inse

[PATCH v3 19/29] efi: arm: Drop exception-level code when running as EFI app

2025-02-08 Thread Simon Glass
The switch_to_non_secure_mode() function cannot be used since EFI is in charge of managing exception-levels. Build just the exceptions.S file. Modify the existing SPL rule to cater to the EFI app too. Signed-off-by: Simon Glass --- Changes in v3: - Rewrite the commit message arch/arm/cpu/arm

[PATCH v3 07/29] efi: x86: Move EFI SDRAM-handling into a common file

2025-02-08 Thread Simon Glass
This code is not actually x86-specific, so move it into the lib/efi dir where other archs can use it. Drop inclusion of the unnecessary x86-specific header. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/x86/cpu/efi/Makefile | 1 - lib/efi/Makefile

[PATCH v3 22/29] efi: arm: Drop startup code from the app

2025-02-08 Thread Simon Glass
The EFI app uses different startup and relocation code and the existing code uses symbols not present in the app. Drop it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/cpu/armv8/Makefile | 2 ++ arch/arm/lib/Makefile | 4 +++- 2 files changed, 5 in

[PATCH v3 16/29] efi: arm: Avoid enabling caches when running under EFI

2025-02-08 Thread Simon Glass
The previous bootloader has already set up the cache, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- (no changes since v1) common/board_r.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/board_r.c

[PATCH v3 02/29] video: Move vesa_setup_video_priv() into its own file

2025-02-08 Thread Simon Glass
This helper is used by the EFI driver and we would like to use that on ARM. Move the helper function into its own file, separate from PCI ROMs, which are an x86 thing. Add a forward declaration for struct udevice so that the header can be included directly. Signed-off-by: Simon Glass --- Change

[PATCH v3 03/29] video: Use a local mode_info struct in the EFI driver

2025-02-08 Thread Simon Glass
There is no need to use the global struct provided by PCI. Declare a local structure instead, so this can be used on ARM without including support for PCI ROMs. Signed-off-by: Simon Glass --- (no changes since v1) drivers/video/efi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/

[PATCH v3 08/29] treewide: Rename VENDOR_EFI to ARCH_EFI

2025-02-08 Thread Simon Glass
The 'vendor' concept comes from arch/x86. Rather than letting this spread around the tree, rename it to ARCH_EFI. While EFI is not quite an architecture in the strict sense, it is similar to sandbox in that it sits somewhat above the CPU architecture. Signed-off-by: Simon Glass --- Ideas for a b

[PATCH v3 04/29] lib: Provide fdtdec_get_pci_bar32() only with PCI enabled

2025-02-08 Thread Simon Glass
This function calls dm_pci_read_bar32() which is only available if PCI is enabled. Add this condition here too, so that the EFI app can build without needing --gc-sections Signed-off-by: Simon Glass Reviewed-by: Matthias Brugger Reviewed-by: Tom Rini --- (no changes since v1) lib/fdtdec.c |

[PATCH v3 09/29] efi: x86: Rework VENDOR_EFI option to permit other archs

2025-02-08 Thread Simon Glass
At present only x86 supports the EFI app and (apart from Qualcomm) the payload. In preparation for supporting 64-bit ARM more generally, rename the existing ARCH_EFI option to ARCH_EFI_X86, using that to define a generic ARCH_EFI which will be enabled for all architectures. Signed-off-by: Simon Gl

[PATCH v3 10/29] efi: x86: Allow setting the global_data pointer with EFI

2025-02-08 Thread Simon Glass
Provide a function which sets this pointer, for use in the EFI app. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/global_data.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index

[PATCH v3 15/29] efi: arm: Avoid allocating page tables when running under EFI

2025-02-08 Thread Simon Glass
The previous bootloader has already set up the page tables, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/cache.c b/ar

[PATCH v3 13/29] efi: lmb: Avoid access to _start

2025-02-08 Thread Simon Glass
The app does not have this symbol. Also the memory where the app is loaded is not under U-Boot's control. There is no sense in relocating from one alloced region to another. U-Boot is not able to relocate to the top of memory, nor decide what other parts of memory are used for. For these reasons,

[PATCH v3 11/29] efi: Tidy up setup of global_data

2025-02-08 Thread Simon Glass
Use the available functions for setting and getting the global_data pointer so that EFI-startup can operate on 64-bit ARM as well as x86. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Mention '64-bit ARM' here, rather than just 'ARM' lib/efi/efi_app.c | 13

[PATCH v3 17/29] efi: arm: Implement access to global_data for EFI

2025-02-08 Thread Simon Glass
The EFI app likes to use a simple variable for global data. Implement this for ARM (for use only with 64-bit ARM at present). Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Mention '64-bit ARM' here, rather than just 'ARM' arch/arm/include/asm/global_data.h | 14 +++

[PATCH v3 14/29] efi: arm: Don't do the EL2 switch when running under EFI

2025-02-08 Thread Simon Glass
The previous bootloader has likely done this already, so avoid trying to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/bootm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/

[PATCH v3 25/29] efi: Generate the app as a shared library

2025-02-08 Thread Simon Glass
The app should be built as a shared library, with position-independent code and the -shared flags. Update the Makefile to handle this. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index f989c31073f..b3

[PATCH v3 23/29] efi: arm: Adjust how the monitor length is calculated

2025-02-08 Thread Simon Glass
Adjust the conditions to support the EFI app when running on ARM. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Put the EFI-app case first in setup_mon_len(), for clarity common/board_f.c | 6 +++--- common/board_r.c | 4 +++- 2 files changed, 6 insertions(+), 4 deleti

Re: [PATCH v2 00/29] arm: Support building as an EFI app

2025-02-08 Thread Simon Glass
Hi Tom, On Sat, 8 Feb 2025 at 17:03, Tom Rini wrote: > > On Sat, Feb 08, 2025 at 03:40:07PM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Sat, 8 Feb 2025 at 14:29, Tom Rini wrote: > > > > > > On Sat, Feb 08, 2025 at 10:11:20AM -0700, Simon Glass wrote: > > > > > > [snip] > > > > Changes in v2

[PATCH v3 06/29] efi: Allow board/efi Kconfig to be used outside x86

2025-02-08 Thread Simon Glass
So far only x86 supports the EFI app. ARM is going the same way, so allow these options to be enabled for 64-bit ARM too. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Drop the word 'Sadly' - Mention '64-bit ARM' here, rather than just 'ARM' arch

[PATCH v3 24/29] efi: arm: Provide startup and relocation code

2025-02-08 Thread Simon Glass
Build in the EFI-app startup code as well as the code to relocate U-Boot to the loaded position, since this is under the control of the previous firmware. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) arch/arm/lib/Makefile | 2 ++ 1 file changed, 2 insertions(+)

[PATCH v3 26/29] efi: arm: Disable STATIC_RELA for the EFI app

2025-02-08 Thread Simon Glass
This feature should not be used with the app, since we don't know where U-Boot will be loaded. Disable it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a55ba6b

[PATCH v3 00/29] arm: Support building as an EFI app

2025-02-08 Thread Simon Glass
The original x86 EFI-app was written back in 2015, about a year before the EFI-loader was introduced. At that point, ARM mostly used U-Boot and FIT (Flat Image Tree). Today, sadly, there are a few efforts to re-invent FIT poorly, to cater to more primitive boot-environments than U-Boot. One justif

Re: [PATCH v2 00/29] arm: Support building as an EFI app

2025-02-08 Thread Simon Glass
Hi Tom, On Sat, 8 Feb 2025 at 18:43, Simon Glass wrote: > > Hi Tom, > > On Sat, 8 Feb 2025 at 17:03, Tom Rini wrote: > > > > On Sat, Feb 08, 2025 at 03:40:07PM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Sat, 8 Feb 2025 at 14:29, Tom Rini wrote: > > > > > > > > On Sat, Feb 08, 2025 a

[PATCH v3 01/29] Makefile: Avoid using TEXT_BASE if not present

2025-02-08 Thread Simon Glass
This value is only available if CONFIG_HAVE_TEXT_BASE is enabled. Add conditions to avoid introducing errors in link scripts when it is not. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Depend on CONFIG_EFI_APP instead - Drop change to u-boot-elf rule Makefile | 2 ++

Re: [PATCH 25/29] rockchip: Add a generic rk3399 board

2025-02-08 Thread Jonas Karlman
Hi Simon, On 2025-02-05 02:55, Simon Glass wrote: > This build-target is used to build an image which can run on multiple > rk3399 boards, using VBE to boot. Since this target is intended to be used with VBE on LPDDR4 boards, can you use a different target name, maybe rk3399-vbe-lpddr4 or similar