Re: [PATCH 1/2] arm: mach-k3: j722s: Initialize MCU & MAIN Domain ESMs

2025-02-24 Thread Kumar, Udit
On 2/17/2025 4:27 PM, Keerthy wrote: Initialize MCU & MAIN Domain ESMs as a prerequisite to enable watchdog reset functionality. The ESM aka error signalling module is primarily responsible for sensing the watchdog reset event. Signed-off-by: Keerthy --- arch/arm/mach-k3/j722s/j722s_init.c

Re: Fwd: New Defects reported by Coverity Scan for Das U-Boot

2025-02-24 Thread Heiko Schocher
Hello Tom, On 25.02.25 03:39, Tom Rini wrote: Here's the latest report. Getting closer with the led change. I do wish it was easier to test fixes here. Yes... -- Forwarded message - From: Date: Mon, Feb 24, 2025, 5:05 PM Subject: New Defects reported by Coverity Scan for Das

[PATCH v5 6/7] mmc: msm_sdhci: Reset clocks before reconfiguration

2025-02-24 Thread Varadarajan Narayanan
U-Boot has to reconfigure the clocks that were set in the boot loaders. However, in IPQ9574, the clocks have to be reset before they can be reconfigured. Hence add code to do the relevant resets. Reviewed-by: Caleb Connolly Signed-off-by: Varadarajan Narayanan --- drivers/mmc/msm_sdhci.c | 10 +

RE: [UBOOT PATCH] spi: spi-uclass: Fix reduced read speed when parallel config is enabled

2025-02-24 Thread Kummari, Prasad
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Marek Vasut > Sent: Friday, February 21, 2025 11:28 PM > To: Abbarapu, Venkatesh ; u- > b...@lists.denx.de; tudor.amba...@linaro.org; j-humphr...@ti.com > Cc: Simek, Michal ; ja...@amarulasolutions.com;

[PATCH v5 7/7] configs: add qcom_ipq9574_mmc_defconfig

2025-02-24 Thread Varadarajan Narayanan
Introduce a defconfig for the Qualcomm IPQ9574 SoC based RDPs. Presently supports eMMC. Per the flash memory layout, U-Boot size cannot exceed 756KB. With this defconfig, u-boot.mbn size is ~480KB. Reviewed-by: Sumit Garg Reviewed-by: Caleb Connolly Signed-off-by: Varadarajan Narayanan --- v5:

[PATCH v5 3/7] clk/qcom: add initial clock driver for ipq9574

2025-02-24 Thread Varadarajan Narayanan
Add initial set of clocks and resets for enabling U-Boot on ipq9574 based RDP platforms. Reviewed-by: Caleb Connolly Signed-off-by: Varadarajan Narayanan --- v3: Use gate clk framework v2: Combined driver file and makefile/kconfig changes into one patch --- drivers/clk/qcom/Kconfig |

[PATCH v5 5/7] pinctrl: qcom: Add ipq9574 pinctrl driver

2025-02-24 Thread Varadarajan Narayanan
Add pinctrl driver for the TLMM block found in the ipq9574 SoC. Reviewed-by: Caleb Connolly Signed-off-by: Varadarajan Narayanan --- v5: Add 'Reviewed-by: Caleb Connolly' Remove 'special_pins_start' struct msm_pinctrl_data ipq9574_data drivers/pinctrl/qcom/Kconfig | 7 + drivers

[PATCH v5 4/7] pinctrl: qcom: Handle get_function_mux failure

2025-02-24 Thread Varadarajan Narayanan
Presently, get_function_mux returns an unsigned int and cannot differentiate between failure and correct function value. Change its return type to int and check for failure in the caller. Additionally, updated drivers/pinctrl/qcom/pinctrl-*.c to accommodate the above return type change. Only compi

[PATCH v5 1/7] doc: board/qualcomm: document RDP building/flashing

2025-02-24 Thread Varadarajan Narayanan
Introducing basic support for Qualcomm IPQxxx based RDPs. Document the build and flashing steps. Reviewed-by: Caleb Connolly Signed-off-by: Varadarajan Narayanan --- v5: Add 'Reviewed-by: Caleb Connolly' --- doc/board/qualcomm/rdp.rst | 55 ++ 1 file changed,

[PATCH v5 0/7] Add initial support for IPQ9574 based boards

2025-02-24 Thread Varadarajan Narayanan
These patches introduce the initial support code needed for the QTI IPQ9574 SoC and RDP433 board. SoC : Qualcomm IPQ9574 RAM : 2GB DDR4 Flash : eMMC 8GB WiFi: 1 x 2.4GHz, 1 x 5GHz, 1 x 6GHz Thanks Varada v4: * Squash up the missed patch w.r.t. docume

[PATCH v5 2/7] dts: ipq9574-rdp433-u-boot: add override dtsi

2025-02-24 Thread Varadarajan Narayanan
Add initial support for the IPQ9574 MMC based RDP platforms. Define memory layout statically. Reviewed-by: Caleb Connolly Signed-off-by: Varadarajan Narayanan --- v5: Add 'Reviewed-by: Caleb Connolly' v3: Fix comments and give additional details No code change v2: Use upstream and override

[PATCH v2 6/6] binman: Authenticate the image when testing the preload signature

2025-02-24 Thread Paul HENRYS
Use preload_check_sign to authenticate the generated image when testing the preload signature in testPreLoad(). Signed-off-by: Paul HENRYS --- tools/binman/ftest.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index a553ca9e56

Re: [PATCH 0/6] Add preload_check_sign tool

2025-02-24 Thread Paul HENRYS
Hi Tom, On 24/02/2025 17:31, Tom Rini wrote: On Fri, Feb 21, 2025 at 11:38:18AM -0600, Tom Rini wrote: On Wed, 12 Feb 2025 10:31:20 +0100, Paul HENRYS wrote: This serie of patches adds a new tool to authenticate files signed with a preload header. This tool is also used in the tests to actua

Re: [PATCH 0/6] Add preload_check_sign tool

2025-02-24 Thread Tom Rini
On Mon, Feb 24, 2025 at 09:07:28PM +0100, Paul HENRYS wrote: > Hi Tom, > > On 24/02/2025 17:31, Tom Rini wrote: > > On Fri, Feb 21, 2025 at 11:38:18AM -0600, Tom Rini wrote: > > > > > On Wed, 12 Feb 2025 10:31:20 +0100, Paul HENRYS wrote: > > > > > > > This serie of patches adds a new tool to au

[PATCH v2 3/6] boot: Add support of the pre-load signature for host tools

2025-02-24 Thread Paul HENRYS
Signed-off-by: Paul HENRYS --- boot/image-pre-load.c | 57 +-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c index cc19017404c..adf3b341a20 100644 --- a/boot/image-pre-load.c +++ b/boot/image-pr

[PATCH v2 5/6] configs: Enable the pre-load signature in tools-only_defconfig

2025-02-24 Thread Paul HENRYS
pre-load related config options are enabled to have support of it in host tools. 'CONFIG_FIT_SIGNATURE=y' is being automatically removed since it is selected by CONFIG_IMAGE_PRE_LOAD_SIG. Signed-off-by: Paul HENRYS --- configs/tools-only_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 del

[PATCH v2 1/6] rsa: Add rsa_verify_openssl() to use openssl for host builds

2025-02-24 Thread Paul HENRYS
rsa_verify_openssl() is used in lib/rsa/rsa-verify.c to authenticate data when building host tools. Signed-off-by: Paul HENRYS --- include/image.h | 18 ++ lib/rsa/rsa-verify.c | 5 ++ tools/image-host.c | 141 +++ 3 files changed, 164 insert

[PATCH v2 2/6] image: Add an inline declaration of unmap_sysmem()

2025-02-24 Thread Paul HENRYS
Add an empty inline declaration when compiling tools for a host where unmap_sysmem() is not defined. Signed-off-by: Paul HENRYS --- tools/mkimage.h | 4 1 file changed, 4 insertions(+) diff --git a/tools/mkimage.h b/tools/mkimage.h index 15741f250fd..5d6bcc9301a 100644 --- a/tools/mkimage.

[PATCH v2 1/3] ARM: dts: stm32: drop "st,button1" compatible

2025-02-24 Thread Dario Binacchi
It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management. Signed-off-by: Dario Binacchi --- Changes in v2: - Drop gpio-keys node from stm32f746-disco-u-b

Re: [PATCH v3 2/2] env: mmc: Clean up env_mmc_load() ifdeffery

2025-02-24 Thread Marek Vasut
On 2/24/25 10:48 AM, Quentin Schulz wrote: Hi Marek, Hi, On 2/21/25 7:47 PM, Marek Vasut wrote: Rename the variants of env_mmc_load() for redundant and non-redundant environment to env_mmc_load_redundant() and env_mmc_load_singular() respectively and convert the env_mmc_load() implementation

Re: [PATCH v3 1/2] env: mmc: Make redundant env in both eMMC boot partitions consider DT properties

2025-02-24 Thread Marek Vasut
On 2/24/25 11:01 AM, Quentin Schulz wrote: Hi Marek, Hi, On 2/21/25 7:47 PM, Marek Vasut wrote: Introduce a new function mmc_env_is_redundant_in_both_boot_hwparts() which replaces IS_ENABLED(ENV_MMC_HWPART_REDUND) and internally does almost the same check as the macro which assigned ENV_MMC_

PowerPC MPC83XX timer issues (Re: [PATCH] common: board_r: Initialize interrupts before watchdog)

2025-02-24 Thread J . Neuschäfer
On Mon, Feb 24, 2025 at 10:54:05AM -0700, Simon Glass wrote: > Hi J, > > On Sat, 22 Feb 2025 at 11:58, J. Neuschäfer wrote: > > > > (CC'ing Mario Six regarding MPC83xx timer driver in U-Boot) > > > > On Thu, Feb 20, 2025 at 06:49:58AM -0700, Simon Glass wrote: > > > Hi J, > > > > > > On Tue, 18 F

Re: [PATCH v2] board: odroid-n2: Update docs for signing

2025-02-24 Thread Neil Armstrong
Hi, On Fri, 10 Jan 2025 12:11:24 +0100, Baltazár Radics wrote: > The previous instructions resulted in a bootloader that wouldn't fit in > an MBR gap. I have updated the docs based on upstream's build process. > > Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-bo

Re: [PATCH 0/3] arm: meson: extend sm calls to support Amlogic chip_id v1, v2

2025-02-24 Thread neil . armstrong
From: Neil Armstrong Hi, On Mon, 10 Feb 2025 20:50:13 +0300, Evgeny Bachinin wrote: > The Amlogic Meson SoC secure monitor (TF-A) handles a call (0x8244) > to retrieve a chip_id from eFuse OTP data [1]. > > Previously, this sm call (0x8244) was used to retrieve just unique > SoC number

Re: [PATCH 0/2] tools: mkimage: Add Amlogic Boot Image type

2025-02-24 Thread Neil Armstrong
Jonas, f_, On 03/01/2025 22:58, Jonas Karlman wrote: Add support for creating an Amlogic Boot Image that pass CHK in BL1 on Amlogic AArch64 SoCs. The first patch add the new amlimage type. The second patch add a eMMC relocation workaround that can be used to generate a boot image that can be bo

[PATCH v2 3/3] board: stm32f746-disco: drop board_late_init()

2025-02-24 Thread Dario Binacchi
The removal of the "st,button1" and "st,led1" compatibles has emptied the board_late_init(), so let's remove it along with the configuration that allows its invocation. Signed-off-by: Dario Binacchi Reviewed-by: Patrice Chotard --- Changes in v2: - Add Reviewed-by of Patrice Chotard board/st

[PATCH v2 2/3] ARM: dts: stm32: drop "st,led1" compatible

2025-02-24 Thread Dario Binacchi
It is pointless to use the custom compatible "st,led1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management. Signed-off-by: Dario Binacchi --- Changes in v2: - Drop leds node from stm32f746-disco-u-boot.d

Re: [PATCH] fs/squashfs: fix potential integer overflows

2025-02-24 Thread Tom Rini
On Wed, 19 Feb 2025 11:16:33 +0100, joaomarcos.co...@bootlin.com wrote: > The length of buffers used to read inode tables, directory tables, and > reading a file are calculated as: number of blocks * block size, and > such plain multiplication is prone to overflowing (thus unsafe). > > Replace it

Re: [PATCH] mmc: Fix size calculation for sector addressed MMC version 4

2025-02-24 Thread Tom Rini
On Wed, 29 Jan 2025 12:15:54 +0100, Marek Vasut wrote: > For eMMC v4 and newer that is smaller than 2 GiB, the JEDEC JESD84-B51 > section 6.2.4 Configure partitions indicates that EXT_CSD SEC_COUNT > should not be used to determine device size, and instead device size > should be calculated from C

Re: [PATCH 0/2] tools: mkimage: Add Amlogic Boot Image type

2025-02-24 Thread Ferass El Hafidi
Hi Neil, On Mon Feb 24, 2025 at 7:56 PM UTC, Neil Armstrong via groups.io wrote: > Jonas, f_, > > On 03/01/2025 22:58, Jonas Karlman wrote: > > Add support for creating an Amlogic Boot Image that pass CHK in BL1 on > > Amlogic AArch64 SoCs. > > > > The first patch add the new amlimage type. The s

[PATCH v3 39/44] sandbox: acpi: Correct mapping in FADT

2025-02-24 Thread Simon Glass
The values in the FADT are pointers so should not go through sandbox's normal addr<->pointer mapping. Fix this. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to correct mapping in FADT cmd/acpi.c| 2 +- lib/acpi/acpi_table.c | 4 ++-- 2 files changed, 3 insertions(+

Re: [PATCH v3 36/44] boot: Consider non-bootable partitions

2025-02-24 Thread Heinrich Schuchardt
Am 25. Februar 2025 00:06:25 MEZ schrieb Simon Glass : >The 'bootable' flag in the DOS partition is deprecated so we should not >rely on it by default. The logic which skips non-bootable partitions can >miss extlinux.conf files on the root disk. It is unclear why you assume that this flag is depre

Re: xPL Proposal

2025-02-24 Thread Simon Glass
Hi Tom, On Mon, 24 Feb 2025 at 09:00, Tom Rini wrote: > > On Fri, Feb 21, 2025 at 07:07:06PM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Fri, 21 Feb 2025 at 18:06, Tom Rini wrote: > > > > > > On Fri, Feb 21, 2025 at 05:24:35PM -0700, Simon Glass wrote: > > > > Hi Tom, > > > > > > > > On Fri

[PATCH v3 19/44] x86: Support CPU functions in long mode

2025-02-24 Thread Simon Glass
At present it is not possible to find out the physical-address size in long mode, so a predefined value is used. Update the macros to support this properly, since it is important when programming MTRRs. Signed-off-by: Simon Glass --- Changes in v3: - Always return true from flag_is_changeable_p

[PATCH v3 16/44] x86: Use the same GDT when jumping to long mode

2025-02-24 Thread Simon Glass
Make use the existing GDT which now includes entries for 64-bit code. Leave the interrupt descriptors alone. They can be tidied up once U-Boot starts up. With this, kvm mode works with QEMU. Signed-off-by: Simon Glass Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/31 --- (no

[PATCH v3 31/44] x86: Add a new API for e820

2025-02-24 Thread Simon Glass
The existing mechanism is pretty painful as it requires manual calculations for anything but a trivial setup. Add a new API for adding e820 entries. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch with an API for e820 arch/x86/include/asm/e820.h | 87

[PATCH v3 29/44] test/py: Allow tests to be filtered by role

2025-02-24 Thread Simon Glass
Some test can only be run by a particular board in a lab, e.g. because they are loaded with an OS image used by the test. Add a way to specify this in tests. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to allow tests to be filtered by role test/py/conft

[PATCH v3 24/44] x86: Allow adding non-aligned size for MTRR

2025-02-24 Thread Simon Glass
At present mtrr_add_request() requires that the size is a power of two. This is too limiting for machines with 4GB (or more) of RAM, since they often must take account of a memory hole at 3GB. Update the function to automatically deal with an unaligned size, using more MTRRs as required. The algo

[PATCH v3 27/44] test/py: Correct sizing of created disks

2025-02-24 Thread Simon Glass
At present the disks end up being 1MB shorter than they should be, since dd truncates by default. Move the code into a function and update it to avoid truncation. This resolves various warnings when running sandbox tests, of the form: mmc_bread() MMC: block number 0x9801 exceeds max(0x9800)

[PATCH v3 26/44] x86: qemu: Support environment and cat command

2025-02-24 Thread Simon Glass
Add support for an environment stored in the first partition of the disk, which is assumed to hold a FAT filesystem. Support the 'cat' command as it is useful for looking at extlinux.conf files. Signed-off-by: Simon Glass --- (no changes since v1) configs/qemu-x86_64_defconfig | 6 -- con

[PATCH v3 23/44] x86: Correct msr operation on amd64

2025-02-24 Thread Simon Glass
The CONFIG option is no-longer correct since we can have SPL and PPL with different bitness. Fix this and sync up with Linux 6.13 in this area, since this is where the code came from many years ago. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to correct msr operation on amd64

[PATCH v3 22/44] x86: Update cpuid_eax et al to work on amd64

2025-02-24 Thread Simon Glass
The existing functions work but the register clobbers are wrong, so strange bugs results. The original functions were taken from a very old version of Linux. Update them from Linux 6.13 Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to update cpuid_eax et al to work on amd64 ar

[PATCH v3 25/44] x86: emulation: Set an MTRR for the RAM

2025-02-24 Thread Simon Glass
QEMU likes to have an MTRR set up, just like real machines. Add an MTRR which covers the total RAM size. This does nothing on machines without MTRRs. Signed-off-by: Simon Glass --- Changes in v3: - Support memory sizes above 3GB properly Changes in v2: - Add new patch to set an MTRR for the RA

[PATCH v3 33/44] x86: emulation: Support BLOBLIST_TABLES properly

2025-02-24 Thread Simon Glass
The existing QEMU implementation mostly ignored BLOBLIST_TABLES and allocates the bulk of the tables with malloc(). Update it to place all tables in the bloblist. Since QEMU declares a size of 128KB regardless of the size of its tables, this requires a larger bloblist. Fix up the e820 table to han

[PATCH v3 34/44] x86: Support a 64-bit ramdisk address

2025-02-24 Thread Simon Glass
Add some missing pieces to bootparams so that a 64-bit ramdisk address can be used. Tidy up the logging while we are here. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to support a 64-bit ramdisk address arch/x86/include/asm/bootparam.h | 15 ++- arch/x86/lib/zimag

[PATCH v3 36/44] boot: Consider non-bootable partitions

2025-02-24 Thread Simon Glass
The 'bootable' flag in the DOS partition is deprecated so we should not rely on it by default. The logic which skips non-bootable partitions can miss extlinux.conf files on the root disk. Put this logic behind a flag and update the documentation. Signed-off-by: Simon Glass --- Changes in v3: -

[PATCH v3 28/44] test/py: Add a helper to send characters

2025-02-24 Thread Simon Glass
The existing run_command() method is not great for sending things other than U-Boot commands. Add a helper for sending arbitrary strings as well as control characters. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch with a helper to send characters test/py/

[PATCH v3 30/44] x86: e820: Add a function to dump the e820 table

2025-02-24 Thread Simon Glass
There is already code for this in zimage. Move it to the e820 file so it can be used elsewhere. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch with a function to dump the e820 table arch/x86/include/asm/e820.h | 8 arch/x86/lib/e820.c | 23 +

[PATCH v3 32/44] x86: qemu: Use the new e820 API

2025-02-24 Thread Simon Glass
Move over to use this API before making the code even more complicated. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to use the new e820 API arch/x86/cpu/qemu/e820.c | 48 ++-- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/

[PATCH v3 37/44] boot: Handle running out of labels

2025-02-24 Thread Simon Glass
If only a single label is provided in the list, bootdev_next_label() does not operate correctly and reads beyond the end of the pointer list. Fix this by adding a new check. Also add a note to convert this array to an alist Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to handle

[PATCH v3 38/44] boot: Support IO UARTs for earlycon and console

2025-02-24 Thread Simon Glass
Update the string to take account of UARTs which are connected on I/O ports, as on x86. Fix a typo in an error message in the same command, while we are here. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to support IO UARTs for earlycon and console boot/bootflow.c | 7 ---

[PATCH v3 42/44] acpi: Support checking checksums

2025-02-24 Thread Simon Glass
When the ACPI tables come from an earlier bootloader it is helpful to see whether the checksums are correct or not. Add a -c flag to the 'acpi list' command to support that. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to support checking checksums with ACPI command cmd/acpi.c

[PATCH v3 40/44] acpi: Add a checksum to the DMAR table

2025-02-24 Thread Simon Glass
This table lacks a correct checksum at present, so fix it. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to add a checksum to the DMAR table lib/acpi/acpi_table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c index 3805b61159e

[PATCH v3 44/44] test: Add a test for booting Ubuntu 24.04

2025-02-24 Thread Simon Glass
Now that U-Boot can boot this quickly, using kvm, add a test that the installer starts up correctly. Use the qemu-x86_64 board in the SJG lab. Signed-off-by: Simon Glass --- Changes in v3: - Significantly expanded to correct e820 and other issues Changes in v2: - Add more patches to support bo

[PATCH v3 41/44] test: acpi: Correct memory leaks

2025-02-24 Thread Simon Glass
Free the memory used in tests to avoid a leak. Also unmap the addresses for sandbox. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to correct memory leaks in the ACPI test test/dm/acpi.c | 13 + 1 file changed, 13 insertions(+) diff --git a/test/dm/acpi.c b/test/dm

[PATCH v3 43/44] RFC: test/py: Deal with timeouts

2025-02-24 Thread Simon Glass
The distro test takes a little longer to shut down and restart, so add more time to this operation. Disable the sleep command for now, as it seems to be unreliable on QEMU with '-cpu host'. More thought will be needed for both of these problems. Signed-off-by: Simon Glass --- (no changes since

[PATCH v3 35/44] acpi: Mark struct acpi_rsdp as packed

2025-02-24 Thread Simon Glass
At present the size of this struct is too large on 64-bit machines. Annotate it with __packed to fix this. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to mark struct acpi_rsdp as packed include/acpi/acpi_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [PATCH] spl: return kernel image header size in os boot

2025-02-24 Thread Sean Anderson
On 2/21/25 10:17, Anshul Dalal wrote: During kernel build process the header size is computed including the BSS whereas it's removed when creating the uncompressed image. Therefore the size of the uncompressed image on filesystem will be smaller than the size specifiedin the header. Therefore it

[PATCH v2 4/6] tools: Add preload_check_sign to authenticate images with a pre-load

2025-02-24 Thread Paul HENRYS
preload_check_sign is added so that it can be used to authenticate images signed with the pre-load signature supported by binman and U-Boot. It could also be used to test the signature in binman tests signing images with the pre-load. Signed-off-by: Paul HENRYS --- Changes for v2: - Replace the c

Re: [PATCH 09/17] spl: riscv: opensbi: Error on misaligned FDT

2025-02-24 Thread Sam Edwards
On Mon, Feb 24, 2025 at 6:54 AM Tom Rini wrote: > > On Mon, Feb 24, 2025 at 09:54:56AM +0100, Heinrich Schuchardt wrote: > > On 2/24/25 06:55, Sam Edwards wrote: > > > libfdt 1.6.1+ requires the FDT to be 8-byte aligned and returns an error > > > if not. OpenSBI 1.0+ includes this version of libfd

Fwd: New Defects reported by Coverity Scan for Das U-Boot

2025-02-24 Thread Tom Rini
Here's the latest report. Getting closer with the led change. I do wish it was easier to test fixes here. -- Forwarded message - From: Date: Mon, Feb 24, 2025, 5:05 PM Subject: New Defects reported by Coverity Scan for Das U-Boot To: Hi, Please find the latest report on new de

Re: [PATCH 10/17] spl: Align FDT load address

2025-02-24 Thread Sam Edwards
On Mon, Feb 24, 2025 at 8:03 AM Tom Rini wrote: > > On Mon, Feb 24, 2025 at 04:54:09PM +0100, Heinrich Schuchardt wrote: > > On 24.02.25 15:56, Tom Rini wrote: > > > On Mon, Feb 24, 2025 at 09:59:42AM +0100, Heinrich Schuchardt wrote: > > > > On 2/24/25 06:55, Sam Edwards wrote: > > > > > While th

[PATCH v3 20/44] x86: Add functions to convert between mtrr size and mask

2025-02-24 Thread Simon Glass
Rather than repeating the same code in several places, add some functions which can do the conversion. Use the cpu_phys_address_size() function to obtain the physical-address size, since it is more reliable with kvm, where the host CPU may have a different value from the emulation CPU. Signed-off

[PATCH v3 17/44] x86: Use a simple jump into long mode

2025-02-24 Thread Simon Glass
With the 64-bit descriptor we can use a jump instruction, rather than pushing things on the stack. Since the processor is in 64-bit mode by this point, pop a 64-bit value from the stack, containing the target address. This simplifies the code slightly, in particular its use of the stack. Signed-

[PATCH v3 18/44] x86: Rename the _D dirty flag

2025-02-24 Thread Simon Glass
This value happens to be used by ctype.h so chose a different name. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to rename the _D dirty flag arch/x86/cpu/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/i386

[PATCH v3 21/44] x86: Update mtrr command to support 64-bit values

2025-02-24 Thread Simon Glass
The MTRR registers have 64-bit values. Update the command to use 64-bit values so that memory larger than 4GB can be handled. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to update mtrr command to support 64-bit values cmd/x86/mtrr.c | 6 +++--- 1 file changed, 3 insertions(+)

[PATCH v3 12/44] x86: Drop the message about features missing in 64-bit

2025-02-24 Thread Simon Glass
This functions normally and has done for a while, so drop this scary message. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 47cf9c862b5..0a6a761987e 10064

[PATCH v3 14/44] x86: Tidy up the GDT size in start/16.S

2025-02-24 Thread Simon Glass
Use a symbol to select the size of the GDT, rather than hard-coding a value. This matches how it is done in start64 Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/start.S | 4 +++- arch/x86/cpu/start16.S | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v3 39/44] sandbox: acpi: Correct mapping in FADT

2025-02-24 Thread Heinrich Schuchardt
Am 25. Februar 2025 00:06:28 MEZ schrieb Simon Glass : >The values in the FADT are pointers so should not go through sandbox's >normal addr<->pointer mapping. Fix this. > >Signed-off-by: Simon Glass >--- > >Changes in v3: >- Add new patch to correct mapping in FADT > > cmd/acpi.c| 2 +-

Re: [PATCH 15/17] efi_loader: Remove ENTRY(_start) from linker script

2025-02-24 Thread Sam Edwards
On Mon, Feb 24, 2025 at 1:37 AM Heinrich Schuchardt wrote: > > On 2/24/25 06:55, Sam Edwards wrote: > > The EFI apps are built using ELF only as an intermediate "linker output" > > format, with the final PE header crafted within the ELF to take effect > > after the objcopy conversion to raw binary

Re: [PATCH 07/17] arm: Replace 'adrl' in EFI crt0

2025-02-24 Thread Sam Edwards
On Mon, Feb 24, 2025 at 12:42 AM Heinrich Schuchardt wrote: > > On 2/24/25 06:55, Sam Edwards wrote: > > LLVM's IAS does not (and cannot easily) support the 'adrl' > > pseudoinstruction, and ARM developers generally do not consider it > > portable across assembler implementations either. > > > > I

[PATCH v3 15/44] x86: Disable paging before changing to long mode

2025-02-24 Thread Simon Glass
This is required as part of the procedure. The existing code works because it changes the GDT at the same time, but this makes kvm unhappy. Update the algorithm to disable and then re-enable paging. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/i386/call64.S | 8 +++-

[PATCH v3 10/44] x86: Use defines for the cache flags

2025-02-24 Thread Simon Glass
Use some named flags when setting up the cache, so it is easier to see what is going on. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/i386/cpu.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386

[PATCH v3 07/44] x86: Drop use of CONFIG_REALMODE_DEBUG

2025-02-24 Thread Simon Glass
This option is not actually defined in Kconfig anymore. Use a normal debug print instead, which has a similar effect. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/bios.c| 18 -- arch/x86/lib/bios_interrupts.c | 6 ++ 2 files changed, 10 ins

[PATCH v3 08/44] x86: Avoid clearing the VESA display

2025-02-24 Thread Simon Glass
U-Boot clears the display when it starts up, so there is no need to ask the VESA driver to do this. Fix this and add a comment explaining the flags. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/bios.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a

[PATCH v3 11/44] x86: spl: Drop duplicate CPU init

2025-02-24 Thread Simon Glass
x86_cpu_init_f() is called by arch_cpu_init() a few lines below this code. Drop the duplicate call. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/spl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 7a033505101..47cf9c862b

[PATCH v3 13/44] x86: Include stdbool.h in interrupt header

2025-02-24 Thread Simon Glass
This makes use of a 'bool' type, so include the required header. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/interrupt.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/interrupt.h b/arch/x86/include/asm/interrupt.h index e23fb2c8e72..c689

Re: Rate of change in the project (Was: Re: xPL Proposal)

2025-02-24 Thread Tom Rini
On Sat, Feb 22, 2025 at 05:00:59PM -0700, Simon Glass wrote: > Hi Tom, > > (I think you chopped off too much context, so I've added it below) That's fine. But I omitted it because it's also true for any other DM migration, and bootstd more fully and adding more classes of devices for bootmeths an

[PATCH v3 09/44] x86: Add 64-bit entries to the GDT

2025-02-24 Thread Simon Glass
At present it is not possible to execution 64-bit code without installing an entire new Global Descriptor Table. This is inconvenient since kvm does not seem to like switching into long mode with a new table. It isn't actually necessary, since we can just extend the existing table. Add some new en

[PATCH v3 05/44] x86: Drop mpspec from the SPL build

2025-02-24 Thread Simon Glass
This is not needed in SPL, so drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 43e6a1de77d..a908356e8a6 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86

[PATCH v3 01/44] x86: Expand x86_64 early memory

2025-02-24 Thread Simon Glass
The SPL and pre-reloc malloc()-space is not large enough to start up with a display. Expand it. Switch the order of SPL_SYS_MALLOC_F_LEN and SPL_TEXT_BASE since this matches what 'savedefconfig' gives us. Signed-off-by: Simon Glass --- (no changes since v1) configs/qemu-x86_64_defconfig | 4 +

[PATCH v3 00/44] x86: Improve operation under QEMU

2025-02-24 Thread Simon Glass
U-Boot can start and boot an OS in both qemu-x86 and qemu-x86_64 but it is not perfect. With both builds, executing the VESA ROM causes an intermittent hang, at least on some AMD CPUs. With qemu-x86_64 kvm cannot be used since the move to long mode (64-bit) is done in a way that works on real har

[PATCH v3 04/44] x86: qemu: Avoid accessing BSS too early

2025-02-24 Thread Simon Glass
BSS is placed in DRAM which is actually available early with QEMU. But it is cleared by the init sequence, so values stored there are lost. Move the system-type flag into a function, instead. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/qemu/qemu.c | 20 ++

[PATCH v3 06/44] x86: Add some log categories

2025-02-24 Thread Simon Glass
Add categories for i8259 and bios files, so that log statements have the right category. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/bios.c| 3 +++ arch/x86/lib/bios_interrupts.c | 2 ++ arch/x86/lib/i8259.c | 2 ++ 3 files changed, 7 insertions(+)

[PATCH v3 02/44] x86: qemu: Switch to bochs display

2025-02-24 Thread Simon Glass
The vesa display is widely used on hardware, but it is a bit of a pain with QEMU. It requires executing option ROMs, which either doesn't work with kvm, or is difficult to do in a kvm/QEMU-friendly way. THe bochs display is probably better anyway, so switch to that. It works fine with kvm as it do

[PATCH v3 03/44] x86: qemu: Enable dhrystone

2025-02-24 Thread Simon Glass
Provide the 'dhry' command, which helps to check that kvm is being used properly with QEMU. Signed-off-by: Simon Glass --- (no changes since v1) configs/qemu-x86_64_defconfig | 1 + configs/qemu-x86_defconfig| 1 + 2 files changed, 2 insertions(+) diff --git a/configs/qemu-x86_64_defconfi

Re: [PATCH v3 1/2] CI: Move default image under global defaults

2025-02-24 Thread Tom Rini
On Sat, Feb 22, 2025 at 05:24:05PM -0700, Simon Glass wrote: > Hi Tom, > > On Sat, 22 Feb 2025 at 14:37, Tom Rini wrote: > > > > On Sat, Feb 22, 2025 at 10:23:59AM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Fri, 21 Feb 2025 at 17:08, Tom Rini wrote: > > > > > > > > On Fri, Feb 21, 20

[PATCH v1] arm: dts: npcm7xx: correct the timer node

2025-02-24 Thread Jim Liu
Correct the timer node of dts Signed-off-by: Jim Liu --- arch/arm/dts/nuvoton-common-npcm7xx.dtsi | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/nuvoton-common-npcm7xx.dtsi b/arch/arm/dts/nuvoton-common-npcm7xx.dtsi index feb88872fc7..093d5427e30 1

[PATCH v2] amd: versal2: Add the UFS boot mode support

2025-02-24 Thread Venkatesh Yadav Abbarapu
Add the UFS boot mode support and update the boot_targets with ufs mode. If the UFS device is not accessible from APU and running this is detected as a warning, as the device is not accessible. Signed-off-by: Venkatesh Yadav Abbarapu --- Changes in v2: - Use uclass_get_device() with index 0, as w

Re: [PATCH] amd: versal2: Add the UFS boot mode support

2025-02-24 Thread neil . armstrong
On 24/02/2025 04:01, Venkatesh Yadav Abbarapu wrote: Add the UFS boot mode support and update the boot_targets with ufs mode. If the UFS device is not accessible from APU and running this is detected as a warning, as the device is not accessible. Signed-off-by: Venkatesh Yadav Abbarapu --- ar

Re: [PATCH 06/17] arm: Use -mstrict-align when the MMU is off

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: On ARM, enabling the MMU is a prerequisite to enabling caching, which allows unaligned memory accesses by consolidating them into aligned accesses. When the MMU is disabled, however, all accesses must strictly adhere to the alignment rules. Some compilers (e.

Re: [PATCH 07/17] arm: Replace 'adrl' in EFI crt0

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: LLVM's IAS does not (and cannot easily) support the 'adrl' pseudoinstruction, and ARM developers generally do not consider it portable across assembler implementations either. Instead, expand it into the two subtract instructions it would emit anyway. An expl

Re: [PATCH 09/17] spl: riscv: opensbi: Error on misaligned FDT

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: libfdt 1.6.1+ requires the FDT to be 8-byte aligned and returns an error if not. OpenSBI 1.0+ includes this version of libfdt and will also reject misaligned FDTs. However, OpenSBI cannot indicate the error to the user: since it cannot access the serial conso

Re: [PATCH 10/17] spl: Align FDT load address

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: While the image size is generally a multiple of 8 bytes, this is not actually guaranteed; some linkers (like LLD) may shave a few bytes off of the end of output sections if there are no content bytes there. Since libfdt imposes a hard rule of 8-byte alignment,

Re: [PATCH 11/17] makefile: Fix symbol typo in binary_size_check

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: The start-of-image marker symbol is `__image_copy_start`; by searching for `_image_copy_start` instead, this check can accidentally match `_image_copy_start_ofs`. _image_copy_start_ofs seems to be the only match for git grep -n '[^_]_image_copy_start'. Can

Re: [PATCH 14/17] makefile: Add READELF command variable

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: This allows setting READELF=llvm-readelf in order to use the LLVM version of the readelf utility. It also aligns with the practice of not using $(CROSS_COMPILE) in any build recipes directly, reducing the number of places where $(CROSS_COMPILE) is used. Signe

Re: [PATCH 15/17] efi_loader: Remove ENTRY(_start) from linker script

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: The EFI apps are built using ELF only as an intermediate "linker output" format, with the final PE header crafted within the ELF to take effect after the objcopy conversion to raw binary. As such, we really don't care what the ELF header indicates as the entry

Re: [PATCH 17/17] scripts/Makefile.lib: efi: Preserve the .dynstr section as well

2025-02-24 Thread Heinrich Schuchardt
On 2/24/25 06:55, Sam Edwards wrote: This section is required by .dynamic and llvm-objcopy will exit with a fatal error if it is not also preserved in the output. Signed-off-by: Sam Edwards --- scripts/Makefile.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrip

Re: [PATCH v3 2/2] env: mmc: Clean up env_mmc_load() ifdeffery

2025-02-24 Thread Quentin Schulz
Hi Marek, On 2/21/25 7:47 PM, Marek Vasut wrote: Rename the variants of env_mmc_load() for redundant and non-redundant environment to env_mmc_load_redundant() and env_mmc_load_singular() respectively and convert the env_mmc_load() implementation to use of if (IS_ENABLED(...)). As a result, drop

Need help with booting from SPI Flash

2025-02-24 Thread Matwey V. Kornilov
Hi, I have an Allwinner based board with manually soldered 16MB SPI Flash. I am trying to place u-boot into the flash and need some help so far. I have already updated the board DTS file and checked that the Linux kernel provides me with a /dev/mtd0 device which is writable and readable. I enable

  1   2   >