]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
3 days agodocker: add OP-TEE and TF-A build for testing Firmware Handoff
Raymond Mao [Tue, 21 Oct 2025 18:16:54 +0000 (11:16 -0700)] 
docker: add OP-TEE and TF-A build for testing Firmware Handoff

Fetch OP-TEE (4.7.0), TF-A (v2.13.0), MbedTLS (v3.6) and build
bl1 and fip with both Firmware Handoff and Measured Boot enabled.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
2 weeks agospl: Restore args file being default in falcon mode
Tom Rini [Mon, 20 Oct 2025 19:55:08 +0000 (13:55 -0600)] 
spl: Restore args file being default in falcon mode

When falcon mode is enabled and SPL_OS_BOOT_SECURE is not enabled,
restore the previous default behavior of having an args file be
expected. Platforms which are using a FIT image here and do not need
this can update at their convenience to disable this option now.

Fixes: b1a3ed068869 ("spl: make args file optional in falcon mode")
Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoMerge patch series "Add support for secure falcon mode: disable args file"
Tom Rini [Mon, 20 Oct 2025 17:54:43 +0000 (11:54 -0600)] 
Merge patch series "Add support for secure falcon mode: disable args file"

Anshul Dalal <anshuld@ti.com> says:

Continuing from the last series[1], this patch series addresses the requirement
to disable the args file in falcon mode.

The args file is used in falcon mode for loading the device-tree for the kernel.
However in secure falcon mode, the expected payload is a FIT containing a signed
device-tree and kernel image. Thus removing the need to load the extra args
file in the first place. Also, loading the extra file without any authentication
mechanism exposes an attack vector and should therefore be disabled to keep the
boot secure.

This patch set builds on the last few to first optionally allow for loading the
args file in non-secure falcon boot flow [1/3] and then disable them altogether
in the next patch [2/3] for secure falcon mode.

[1]: https://lore.kernel.org/u-boot/20251006101057.4172248-1-anshuld@ti.com/
Link: https://lore.kernel.org/r/20251009115846.897186-1-anshuld@ti.com
2 weeks agospl: set fdt address as spl_image arg in falcon mode
Anshul Dalal [Thu, 9 Oct 2025 11:58:45 +0000 (17:28 +0530)] 
spl: set fdt address as spl_image arg in falcon mode

The arg field of `struct spl_image_info` is used by jump_to_image_linux
as the argument for the kernel in falcon mode.

Since commit 601cebc29d2a ("cmd: spl: Remove ATAG support from this
command"), fdt is the only valid argument for kernel in falcon mode.

However fdt was only being set as the argument in nor and xip boot
modes, this patch fixes it for all boot modes and removes the now
redundant code from spl_nor and spl_xip.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: prevent loading args file in secure falcon mode
Anshul Dalal [Thu, 9 Oct 2025 11:58:44 +0000 (17:28 +0530)] 
spl: prevent loading args file in secure falcon mode

The expected payload for the SPL in secure falcon mode is a fitImage
that contains the kernel image and the DT. This removes the need to load
an additional args file, which exposes an additional attack vector since
it can not be verified.

Therefore this patch disables loading of the arg file when
SPL_OS_BOOT_SECURE is set.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: make args file optional in falcon mode
Anshul Dalal [Thu, 9 Oct 2025 11:58:43 +0000 (17:28 +0530)] 
spl: make args file optional in falcon mode

Falcon mode loads a kernel file and an args file which is the
device-tree. However in the case of kernel file being a FIT that
contains the device-tree within it, loading the args file is not
required.

Therefore, this patch introduces a new SPL_OS_BOOT_ARGS config options
that allows us to enable or disable loading of the args file in falcon
mode.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agoMerge patch series "Add support for secure falcon mode: disable fallback"
Tom Rini [Mon, 20 Oct 2025 16:17:54 +0000 (10:17 -0600)] 
Merge patch series "Add support for secure falcon mode: disable fallback"

Anshul Dalal <anshuld@ti.com> says:

Continuing from the last series[1], this patch series addresses the requirement of
allowing no fallbacks in secure falcon mode.

To do this in a clean way, all the falcon mode logic for each boot media was
refactored to a corresponding *_load_image_os function whereas the regular
boot is implemented in *_load_image, this allows us to easily return early in
case the *_load_image_os function fails with secure mode enabled.

The series also introduces the new SPL_OS_BOOT_SECURE config symbol which
enables secure falcon boot flow.

The generic flow after the patch series looks as follows:

static int spl_<bootmedia>_load_image(...) {
if (CONFIG_IS_ENABLED(OS_BOOT)) {

ret = spl_<bootmedia>_load_image_os(...);

puts("Failcon mode failed\n");
if (CONFIG_IS_ENABLED(OS_BOOT_SECURE)) {
puts("no fallback allowed!\n");
return ret;
}

puts("Falling back to U-Boot\n");
}

/* Regular boot flow */
}

[1]: https://lore.kernel.org/u-boot/20250923124639.667718-1-anshuld@ti.com/
Link: https://lore.kernel.org/r/20251017193318.4124997-1-anshuld@ti.com
2 weeks agospl: falcon: disable fallback to U-Boot on failure
Anshul Dalal [Fri, 17 Oct 2025 19:33:12 +0000 (01:03 +0530)] 
spl: falcon: disable fallback to U-Boot on failure

Instead of falling back to the standard U-Boot boot flow, we should just
halt boot if the expected boot flow in falcon mode fails.

This prevents a malicious actor from accessing U-Boot proper if they can
cause a boot failure on falcon mode.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: nand: refactor spl_nand_load_image for falcon mode
Anshul Dalal [Fri, 17 Oct 2025 19:33:11 +0000 (01:03 +0530)] 
spl: nand: refactor spl_nand_load_image for falcon mode

This patch moves the falcon mode handling logic out of
spl_ubi_load_image to spl_ubi_load_image_os, this allows for cleaner
handling for fallback to U-Boot in case falcon mode fails.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: nor: refactor spl_nor_load_image for falcon mode
Anshul Dalal [Fri, 17 Oct 2025 19:33:10 +0000 (01:03 +0530)] 
spl: nor: refactor spl_nor_load_image for falcon mode

This patch moves the falcon mode handling logic out of
spl_nor_load_image to spl_nor_load_image_os, this allows for cleaner
handling for fallback to U-Boot in case falcon mode fails.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: spi: refactor spl_spi_load_image for falcon mode
Anshul Dalal [Fri, 17 Oct 2025 19:33:09 +0000 (01:03 +0530)] 
spl: spi: refactor spl_spi_load_image for falcon mode

This patch moves the falcon mode handling logic out of
spl_spi_load_image to spl_spi_load_image_os, this allows for cleaner
handling for fallback to U-Boot in case falcon mode fails.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: ubi: refactor spl_ubi_load_image for falcon mode
Anshul Dalal [Fri, 17 Oct 2025 19:33:08 +0000 (01:03 +0530)] 
spl: ubi: refactor spl_ubi_load_image for falcon mode

This patch moves the falcon mode handling logic out of
spl_ubi_load_image to spl_ubi_load_image_os, this allows for cleaner
handling for fallback to U-Boot in case falcon mode fails.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: mmc: split spl_mmc_do_fs_boot into regular/os_boot
Anshul Dalal [Fri, 17 Oct 2025 19:33:07 +0000 (01:03 +0530)] 
spl: mmc: split spl_mmc_do_fs_boot into regular/os_boot

Currently the logic to handle falcon mode as well as the regular boot is
inside spl_mmc_do_fs_boot, this prevents us from cleanly extending
falcon mode functionality like toggleable fallback to U-Boot proper.

Therefore this patch splits the logic into spl_mmc_fs_load and
spl_mmc_fs_load_os to handle the regular boot and falcon mode use case.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agospl: Kconfig: add SPL_OS_BOOT_SECURE config symbol
Anshul Dalal [Fri, 17 Oct 2025 19:33:06 +0000 (01:03 +0530)] 
spl: Kconfig: add SPL_OS_BOOT_SECURE config symbol

This patch adds the new SPL_OS_BOOT_SECURE symbol that enables secure
boot flow in falcon mode. This symbol can be used to disable certain
inherently insecure options during falcon boot.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
2 weeks agoRevert "spi: cadence-qspi: Remove cdns, is-dma property handling"
Michal Simek [Mon, 20 Oct 2025 13:13:42 +0000 (15:13 +0200)] 
Revert "spi: cadence-qspi: Remove cdns, is-dma property handling"

This reverts commit a040578d8270ed8788d7663808ea63ce5ffd7840.

Based on feedback other SOCs (for example Star64) are using driver in non
DMA mode which is causing issues that's why revert this patch.
cdns,is-dma should be removed differently.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reported-by: E Shattow <e@freeshell.de>
2 weeks agoMerge tag 'efi-2026-01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 20 Oct 2025 14:27:19 +0000 (08:27 -0600)] 
Merge tag 'efi-2026-01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2026-01-rc1

CI:

  * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/27944

Documentation:

 * samsung: Extend E850-96 documentation to be comprehensive
 * environment: fix links to Linux kernel documentation
 * sandbox: fix typos
 * document dmareset command
 * ti: j722s_evm: drop outdated boot note

UEFI:

 * Prevent leak of memory from tmp_files
 * Correctly check if the HTTP protocol is found
 * Use ESRT_FW_TYPE_SYSTEMFIRMWARE instead of ESRT_FW_TYPE_UNKNOWN
 * dbginfodump: use guid definition

Others:

 * lib/uuid: add support for efi debug image info table guid

2 weeks agodoc: ti: j722s_evm: drop outdated boot note
Peter Robinson [Fri, 17 Oct 2025 11:20:24 +0000 (12:20 +0100)] 
doc: ti: j722s_evm: drop outdated boot note

The j722s_evm support is now largely complete and is certainly
not limited to UART boot so drop the confusing note from the docs.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2 weeks agolib: uuid: add efi debug image info table guid
Vincent Stehlé [Mon, 13 Oct 2025 14:21:09 +0000 (16:21 +0200)] 
lib: uuid: add efi debug image info table guid

Add the EFI Debug Image Info Table GUID to the translation table used by
uuid_guid_get_str().

This allows to print a human readable table name with `efidebug tables'
instead of "(unknown)".

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agoefi_loader: dbginfodump: use guid definition
Vincent Stehlé [Mon, 13 Oct 2025 14:21:08 +0000 (16:21 +0200)] 
efi_loader: dbginfodump: use guid definition

Use the Debug Image Info Table GUID definition from efi_api.h instead or
redefining it locally.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agodoc: environment: fix links to Linux kernel documentation
Mattia Narducci [Fri, 10 Oct 2025 19:31:45 +0000 (21:31 +0200)] 
doc: environment: fix links to Linux kernel documentation

Architecture-specific documentation in the Linux kernel was moved to
the arch/ subdirectory.

Signed-off-by: Mattia Narducci <mattianarducci1@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agoefi_loader: Use ESRT_FW_TYPE_SYSTEMFIRMWARE instead of ESRT_FW_TYPE_UNKNOWN
Ilias Apalodimas [Fri, 10 Oct 2025 10:59:31 +0000 (13:59 +0300)] 
efi_loader: Use ESRT_FW_TYPE_SYSTEMFIRMWARE instead of ESRT_FW_TYPE_UNKNOWN

We currently set the firmware image type to ESRT_FW_TYPE_UNKNOWN.

The spec defines the following:
ESRT_FW_TYPE_UNKNOWN 0x00000000
ESRT_FW_TYPE_SYSTEMFIRMWARE 0x00000001
ESRT_FW_TYPE_DEVICEFIRMWARE 0x00000002
ESRT_FW_TYPE_UEFIDRIVER 0x00000003

Since we don't support updating DEVICEFIRMWARE or UEFIDRIVER types,
let's switch over to SYSTEMFIRMWARE which seems more appropriate.

Suggested-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 weeks agodoc: sandbox: fix typos
Lukas Zirpel [Thu, 9 Oct 2025 10:18:02 +0000 (12:18 +0200)] 
doc: sandbox: fix typos

Fix two typos in the sandbox docs.

Signed-off-by: Lukas Zirpel <lukas@zirpel.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agocmd/dma: documentation
Brian Sune [Wed, 8 Oct 2025 20:41:03 +0000 (04:41 +0800)] 
cmd/dma: documentation

This explains how
to use the new U-Boot command 'dmareset'.

Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 weeks agoefi_loader: correctly check if the HTTP protocol is found
Heinrich Schuchardt [Mon, 6 Oct 2025 13:39:03 +0000 (15:39 +0200)] 
efi_loader: correctly check if the HTTP protocol is found

In function efi_http_service_binding_destroy_child() phandler is created as
as a local variable. If efi_search_protocol() fails, phandler will hold a
random value from the stack. Even it is not zero, we must not use it.

If efi_search_protocol() succeeds, the pointer has already be dereferenced,
so checking against NULL makes not sense here.

If ChildHandle is not a valid UEFI handle, we must return
EFI_INVALID_PARAMETER.

Use a single location for EFI_EXIT().

Addresses-Coverity-ID: CID 531974 (Unchecked return value)
Fixes: 5753dc3f6572 ("efi_loader: Prevent dereference of uninitialised variable")
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agoefi_loader: Prevent leak of memory from tmp_files
Andrew Goodbody [Fri, 3 Oct 2025 14:54:34 +0000 (15:54 +0100)] 
efi_loader: Prevent leak of memory from tmp_files

After the malloc of tmp_files and before its value is recorded an early
exit will need to free tmp_files to prevent leaking that memory.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 weeks agodoc: samsung: Extend E850-96 documentation to be comprehensive
Sam Protsenko [Mon, 6 Oct 2025 23:25:38 +0000 (18:25 -0500)] 
doc: samsung: Extend E850-96 documentation to be comprehensive

Add more bootloading details for E850-96 board. New sections cover next
topics:

  - Hardware configuration of the boot device
  - Flashing and updating the software (multiple methods)
  - Booting with Standard Boot (multiple methods)
  - EFI System Partition structure for E850-96
  - Loadable firmware (LDFW) note
  - Ethernet and USB Host Support

That documents all recently enabled U-Boot features for E850-96, which
can hopefully make U-Boot more useful for the users and developers of
this platform.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2 weeks agofs: semihosting: Use correct variable for error check
Andrew Goodbody [Thu, 2 Oct 2025 09:39:58 +0000 (10:39 +0100)] 
fs: semihosting: Use correct variable for error check

After calling a function that can return an error, the test to detect
that error should use the return value not a different variable. Fix it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Fixes: f676b45151c3 ("fs: Add semihosting filesystem")
2 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sat, 18 Oct 2025 00:07:06 +0000 (18:07 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

SH HSCIF FIFO fixes, R-Car V4H/V4M DT corrections, R-Car V4H Sparrow
Hawk PCIe shutdown support before booting Linux.

2 weeks agoARM: dts: renesas: Disable RPC driver on R8A779H0 V4M Gray Hawk board
Nguyen Tran [Fri, 17 Oct 2025 22:09:09 +0000 (00:09 +0200)] 
ARM: dts: renesas: Disable RPC driver on R8A779H0 V4M Gray Hawk board

As requirement of CR side, QSPI Flash usage via RPC driver shall
be disabled and leaving the control of this module to CR side.
Perform DT modification to disable the RPC SPI.

Signed-off-by: Nguyen Tran <nguyen.tran.pz@bp.renesas.com>
Reviewed-by: Khanh Le <khanh.le.xr@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Do not modify defconfig, modify the DT instead, this way
        the RPC SPI can be enabled without recompiling the U-Boot
        itself. Update commit message accordingly.]

2 weeks agoARM: dts: renesas: Reinstate R8A779H0 V4M U-Boot DTs
Marek Vasut [Fri, 17 Oct 2025 22:06:33 +0000 (00:06 +0200)] 
ARM: dts: renesas: Reinstate R8A779H0 V4M U-Boot DTs

Commit 63da3a795e86 ("ARM: dts: renesas: Drop R8A779H0 V4M DTs with OF_UPSTREAM counterparts")
removed unnecessary V4H DTs from arch/arm/dts , but in the process
also incorrectly dropped the -u-boot.dtsi U-Boot extras. Reinstate
those extras.

Due to DT file name change for the R8A779H0 V4M Gray Hawk, update
the r8a779h0-gray-hawk-u-boot.dtsi filename to newly matching
r8a779h0-gray-hawk-single-u-boot.dtsi .

Align r8a779h0-u-boot.dtsi with clean up commits
1487c34efa7b ("arm64: dts: renesas: Deduplicate extalr_clk bootph-all")
dd8f57ed2f0b ("ARM: dts: renesas: Drop most of bootph-* tags")

Fixes: 63da3a795e86 ("ARM: dts: renesas: Drop R8A779H0 V4M DTs with OF_UPSTREAM counterparts")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoARM: dts: renesas: Disable R8A779G0 V4H White Hawk RPC SPI DT node again
Marek Vasut [Fri, 17 Oct 2025 22:04:07 +0000 (00:04 +0200)] 
ARM: dts: renesas: Disable R8A779G0 V4H White Hawk RPC SPI DT node again

Commit 3faeb78378ea ("ARM: dts: renesas: Minimize R8A779G0 V4H RPC SPI DT node")
incorrectly re-enabled the RPC SPI DT node, which was disabled in commit
13bdb6a26910 ("ARM: dts: renesas: Disable RPC driver on R8A779G0 V4H White Hawk board")
Reinstate the disablement.

Fixes: 3faeb78378ea ("ARM: dts: renesas: Minimize R8A779G0 V4H RPC SPI DT node")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoserial: sh: Handle HSCIF RX FIFO overflow
Marek Vasut [Sun, 7 Sep 2025 19:16:27 +0000 (21:16 +0200)] 
serial: sh: Handle HSCIF RX FIFO overflow

The HSCIF RX FIFO may overflow when data are streaming from remote end
into the HSCIF while U-Boot is still starting up. In that case, HSFSR
bit RDF is set, but HSFDR field R is zero. This confuses .tstc callback
into considering RX FIFO to be empty, which leads to .getc to be never
invoked, even when user attempts to pass more input onto the command
line.

Fix this by considering the RDF flag in serial_rx_fifo_level(), which
is called from .tstc in case of no errors. If RDF flag is set, trigger
the .getc callback and let it clear the RX FIFO.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agoarm64: renesas: r8a779g3: Reset PCIe before next stage on Retronix R-Car V4H Sparrow...
Marek Vasut [Thu, 18 Sep 2025 16:36:01 +0000 (18:36 +0200)] 
arm64: renesas: r8a779g3: Reset PCIe before next stage on Retronix R-Car V4H Sparrow Hawk

Fully reset both PCIe controllers before booting the next stage on
Retronix R-Car V4H Sparrow Hawk board. This is necessary especially
in case U-Boot brought up the PCIe controllers, at which point the
next stage might be confused by the state of the PCIe controller.
The reset has to happen this late and not in the PCIe controller
driver, because the SRCR11 bits seem to affect both controllers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks agopci: pcie-rcar-gen4: Shut down controller on link down and remove
Marek Vasut [Thu, 18 Sep 2025 16:36:00 +0000 (18:36 +0200)] 
pci: pcie-rcar-gen4: Shut down controller on link down and remove

In case the link is down, or the controller driver is removed before
booting the next stage, shut down the PCIe link, put both the remote
PCIe device and the controller into reset, and disable clock. This
way, the hardware is not left active when not in use.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 weeks ago.gitignore: ignore more image files
Yegor Yefremov [Tue, 14 Oct 2025 09:17:17 +0000 (11:17 +0200)] 
.gitignore: ignore more image files

This expression covers various images files like, for example:

mkimage-out.spl-stm32.mkimage
mkimage.spl-stm32.mkimage

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 weeks agoMerge patch series "led: fixes"
Tom Rini [Fri, 17 Oct 2025 14:58:10 +0000 (08:58 -0600)] 
Merge patch series "led: fixes"

Patrice Chotard <patrice.chotard@foss.st.com> says:

  - Update led_get_by_label()
  - Fix led Kconfig

Link: https://lore.kernel.org/r/20251009130844.11703-1-patrice.chotard@foss.st.com
3 weeks agoled: Add LED dependency for LED_ACTIVITY and LED_BOOT
Patrice Chotard [Thu, 9 Oct 2025 13:08:34 +0000 (15:08 +0200)] 
led: Add LED dependency for LED_ACTIVITY and LED_BOOT

Add LED dependency for LED_ACTIVITY and LED_BOOT.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
3 weeks agoled: Update led_get_by_label()
Patrice Chotard [Thu, 9 Oct 2025 13:08:33 +0000 (15:08 +0200)] 
led: Update led_get_by_label()

During led_init() execution, led_get_label() returns either the label
property (which is an obsolete property [1]) or the LED's node name.
It can't be the function name as dev parameter is NULL.

Later, during led_post_bind() execution, for the same LED, the attributed
label by led_get_label() can be the function name, as led_get_label()
dev's parameter is set.

During call sequence led_boot_on() => led_boot_get() => led_get_by_label()
with label given in parameter (priv->boot_led_label which is either the
label or node's name set previously in led_init()) can be different to
to uc_plat->label and returns -ENODEV.

Update led_get_by_label() to allow to retrieve LED also by its node name.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/common.yaml

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
3 weeks agotest/py: Update to a newer pytest release
Tom Rini [Fri, 10 Oct 2025 22:09:00 +0000 (16:09 -0600)] 
test/py: Update to a newer pytest release

Our pytest package was pinned to a release from 2021. The minimum
compatible with labgrid v25.0.x is pytest 7.0.0. Update to the current
relase which is currently 8.4.2

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agotest: uninstall PK after secboot tests
Heinrich Schuchardt [Fri, 10 Oct 2025 20:29:26 +0000 (22:29 +0200)] 
test: uninstall PK after secboot tests

The EFI secure boot tests install a security data base.
Other EFI tests assume that secure boot is not enabled.
Add the missing tear-down at the end of each secboot test sequence.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Tom Rini <trini@konsulko.com>
3 weeks agovirito: blk: fix logic to determine block sizes
Heinrich Schuchardt [Thu, 9 Oct 2025 16:44:35 +0000 (18:44 +0200)] 
virito: blk: fix logic to determine block sizes

With commit c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512
bytes") logic was added to detect the VIRTIO_BLK_F_BLK_SIZE capability and
to copy the block size reported by QEMU to the block device descriptor.

The logical block size can be set when invoking QEMU:

    -drive if=none,file=4096.img,format=raw,id=vda \
    -device virtio-blk-device,drive=vda,physical_block_size=4096,logical_block_size=4096

In U-Boot the logical block size is shown by command `virtio info`:

    => virtio info
    Device 0: QEMU VirtIO Block Device
                Type: Hard Disk
                Capacity: 1024.0 MB = 1.0 GB (262144 x 4096)

There where two flaws which together hid that the logic was incorrect:

* VIRTIO_BLK_F_BLK_SIZE was missing in the driver capabilities and the bit
  was filtered out.
* The result of the call to virtio_has_feature() was negated.

The problem became apparent when using ARM FVP as emulator which does not set
VIRTIO_BLK_F_BLK_SIZE.

Fixes: c85b8071e7d3 ("virtio: blk: support block sizes exceeding 512 bytes")
Reported-by: Debbie Horsfall <debbie.horsfall@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 weeks agoci: rename conf.qemu_arm64_na to conf.qemu_arm64
Raymond Mao [Wed, 15 Oct 2025 14:18:49 +0000 (07:18 -0700)] 
ci: rename conf.qemu_arm64_na to conf.qemu_arm64

The test-hooks config file has been renamed by [1], thus update the
name where it is used by the script.

[1] https://lore.kernel.org/u-boot/20251003191918.767698-2-raymond.mao@linaro.org/

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
3 weeks agoenv: Kconfig: disable external env in secure os boot
Anshul Dalal [Thu, 9 Oct 2025 12:34:34 +0000 (18:04 +0530)] 
env: Kconfig: disable external env in secure os boot

Falcon mode uses falcon_image_file from the env during mmc fs boot, but
external env can be compromised. Therefore disable access to external
env by setting SPL_ENV_IS_NOWHERE when SPL_OS_BOOT_SECURE is set.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agoMerge patch series "ti_sci: Address some issues found by Smatch"
Tom Rini [Thu, 16 Oct 2025 19:27:22 +0000 (13:27 -0600)] 
Merge patch series "ti_sci: Address some issues found by Smatch"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Prevent a memory leak from a non-freed malloc.
Return an error code on an error path.
Assign a value to a pointer before it is dereferenced.

Link: https://lore.kernel.org/r/20251008-ti_sci-v3-0-5866bf84adc6@linaro.org
3 weeks agoti_sci: Pointer is never assigned to valid value
Andrew Goodbody [Wed, 8 Oct 2025 09:23:37 +0000 (10:23 +0100)] 
ti_sci: Pointer is never assigned to valid value

The pointer resp is declared but never assigned a value but is then
dereferenced. Fix this by assigning the pointer to the message buffer.

This issue was found by Smatch.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Anshul Dalal <anshuld@ti.com>
3 weeks agoti_sci: Provide error code on error exit
Andrew Goodbody [Wed, 8 Oct 2025 09:23:36 +0000 (10:23 +0100)] 
ti_sci: Provide error code on error exit

In ti_sci_get_response the check for message sequence will return ret
on a fail but ret will be 0 at that point. Instead return -EINVAL.
Also change dev_dbg call to dev_err to be consistent with other error
detection code in the same function.

This issue was found by Smatch.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Anshul Dalal <anshuld@ti.com>
3 weeks agoti_sci: Prevent memory leak
Andrew Goodbody [Wed, 8 Oct 2025 09:23:35 +0000 (10:23 +0100)] 
ti_sci: Prevent memory leak

temp is assigned the pointer returned by malloc which is used without a
NULL check and then never freed. Add a NULL check and ensure temp is
freed on all return paths.

This issue was found by Smatch.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: Anshul Dalal <anshuld@ti.com>
3 weeks agoMerge tag 'u-boot-watchdog-20251016' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 16 Oct 2025 15:59:24 +0000 (09:59 -0600)] 
Merge tag 'u-boot-watchdog-20251016' of https://source.denx.de/u-boot/custodians/u-boot-watchdog

CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=400&view=results

- watchdog: Tighten some driver dependencies in Kconfig (Tom)

3 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 16 Oct 2025 15:52:14 +0000 (09:52 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/27926

- Revert "riscv: Add a Zalrsc-only alternative for synchronization in
  start.S" to fix regression
- clk: sophgo: Fix a warning about void returns value

3 weeks agoclk: sophgo: Fix a warning about void returns value
Tom Rini [Wed, 1 Oct 2025 20:30:57 +0000 (14:30 -0600)] 
clk: sophgo: Fix a warning about void returns value

The cv1800b_clk_setfield function returns void, but was doing "return
writel(...);" and while seemingly having a void function return a void
function is not a warning, when readl is a macro this problem is shown.
Correct the code to instead simply call writel.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Yao Zi <ziyao@disroot.org>
3 weeks agoRevert "riscv: Add a Zalrsc-only alternative for synchronization in start.S"
Yao Zi [Thu, 25 Sep 2025 16:01:48 +0000 (16:01 +0000)] 
Revert "riscv: Add a Zalrsc-only alternative for synchronization in start.S"

This reverts commit a681cfecb4346107212f377e2075f6eb1bdc6a2b.

It has been reported that the commit causes boot regression for SPL on
StarFive VisionFive 2 or compatible boards. Inspecting the code, I did
spot one logic error for deciding whether Zaamo or Zalrsc is used, and
it's still unclear what exactly causes the regression, let's revert it
for now.

Reported-by: E Shattow <e@freeshell.de>
Link: https://lore.kernel.org/u-boot/1871663e-b918-4351-9e9e-97f9a4c73733@freeshell.de/
Signed-off-by: Yao Zi <ziyao@disroot.org>
Acked-by: E Shattow <e@freeshell.de>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 weeks agowatchdog: Tighten dependencies on WDT_DAVINCI
Tom Rini [Wed, 1 Oct 2025 20:30:39 +0000 (14:30 -0600)] 
watchdog: Tighten dependencies on WDT_DAVINCI

The WDT_DAVINCI driver is not safe to compile on 64bit platforms such as
allyesconfig on a 64bit host. Tighten the dependencies here to the
platforms which could use it today.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agowatchdog: Tighten some watchdog driver dependencies
Tom Rini [Wed, 6 Aug 2025 14:56:37 +0000 (08:56 -0600)] 
watchdog: Tighten some watchdog driver dependencies

A few watchdog drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
3 weeks agoMerge patch series "fix an7581 panic caused by attempt to support multiple RAM size"
Tom Rini [Wed, 15 Oct 2025 20:19:23 +0000 (14:19 -0600)] 
Merge patch series "fix an7581 panic caused by attempt to support multiple RAM size"

Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> says:

The commit 726404a66c773 ("airoha: rework RAM size handling to support
multiple RAM size") is not good enougth. It results in pacnic during
determining of memory size amount.

This patch series partly fix and partly revert the above commit.
Unfortunately for now we have no a good way to determine the an7581
memory size.

Link: https://lore.kernel.org/r/20251008070903.370974-1-mikhail.kshevetskiy@iopsys.eu
3 weeks ago.mailmap: update e-mail address for Abbarapu Venkatesh Yadav
Abbarapu Venkatesh Yadav [Thu, 9 Oct 2025 06:05:46 +0000 (11:35 +0530)] 
.mailmap: update e-mail address for Abbarapu Venkatesh Yadav

Update e-mail address.

Signed-off-by: Abbarapu Venkatesh Yadav <venkyada@qti.qualcomm.com>
3 weeks agoarm/airoha: partly revert support of multiple RAM size for an7581
Mikhail Kshevetskiy [Wed, 8 Oct 2025 07:09:03 +0000 (10:09 +0300)] 
arm/airoha: partly revert support of multiple RAM size for an7581

Partly revert commit 726404a66c773 ("airoha: rework RAM size handling
to support multiple RAM size").

The general idea is good, but the call of

  get_ram_size((void *)gd->ram_base, SZ_8G);

produces the following result on my an7581 board with only 1Gb of
memory:

  "Synchronous Abort" handler, esr 0x96000004
  elr: 0000000081e201c8 lr : 0000000081e20160 (reloc)
  elr: 00000000bff501c8 lr : 00000000bff50160
  x0 : 0000000180000000 x1 : 0000000100000000
  x2 : 000000000000002e x3 : 0000000000000002
  x4 : 000000001fbf0000 x5 : 0060000000000401
  x6 : 0000000000000000 x7 : 00000000bffdb268
  x8 : 0000000000000060 x9 : 00000000bffdb2c8
  x10: 0000000000000000 x11: 0000000000000060
  x12: 00000000bffdb268 x13: 00000000841c56d0
  x14: 00000000841c56d0 x15: 0000000000000000
  x16: 00000000841506e4 x17: dd7fe29aec3b07e8
  x18: 00000000bf710e00 x19: 0000000080000000
  x20: 0000000000000000 x21: 0000000020000000
  x22: 0000000200000000 x23: 0000000000000001
  x24: 0000000040000000 x25: 00000000bf708e78
  x26: 00000000bf7bdca0 x27: 0000000000000000
  x28: 0000000000000000 x29: 00000000bf708e20

  Code: 910943ff d65f03c0 d37df2a1 8b150e60 (f8616a62)
  Resetting CPU ...

So just not call get_ram_size() and use the value from dtb.

Fixes: 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agocmd: ti: Add DDRSS Inline ECC Error Injection command
Georgi Vlaev [Wed, 8 Oct 2025 11:34:35 +0000 (17:04 +0530)] 
cmd: ti: Add DDRSS Inline ECC Error Injection command

Introduce a new version of the Keystone-II "ddr" command for testing the
inline ECC support in the DDRSS bridge available on K3 devices. The ECC
hardware support in K3's DDRSS and the test method differ substantially
from what we support in the K2 variant of the command. This K3 DDRSS
command currently supports only single controller testing.

The ECC error injection procedure follows these steps:
1) Flush and disable the data cache.
2) Disable the protected ECC Rx range.
3) Flip a bit in the address.
4) Restore the range to original.
5) Read the modified value (corrected).
6) Re-enable the data cache.

This will cause the 1-bit ECC error count to increase while the read
will return the corrected value.

The K3 version of the command extends the syntax for the "ecc_err"
argument by also introducing an argument for range which specifies which
range (0, 1, 2) the address is located in.

Multi-bit ECC errors are uncorrectable and will lead to a synchronous
abort.

Signed-off-by: Georgi Vlaev <g-vlaev@ti.com>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
[n-francis@ti.com: Add J7 and multiple-region support, simplify logic]
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
3 weeks agoarm/airoha: an7581 ignores CFG_MAX_MEM_MAPPED value
Mikhail Kshevetskiy [Wed, 8 Oct 2025 07:09:02 +0000 (10:09 +0300)] 
arm/airoha: an7581 ignores CFG_MAX_MEM_MAPPED value

This partly fix commit 726404a66c773 ("airoha: rework RAM size handling
to support multiple RAM size")

The function get_effective_memsize() do not see non-global defines
of CFG_MAX_MEM_MAPPED, so the effective memory size will not be changed.

Fix the issue by putting definition of CFG_MAX_MEM_MAPPED to the proper
place.

Fixes: 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
3 weeks agotest: Do not build expo and cedit test if no SDL
Kory Maincent [Mon, 6 Oct 2025 16:45:04 +0000 (18:45 +0200)] 
test: Do not build expo and cedit test if no SDL

expo and cedit tests depend on the host having the SDL library.
Build these tests only if VIDEO_SANDBOX_SDL config is enabled.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 weeks agoarm: dts: k3-am62p-verdin: migrate to OF_UPSTREAM
Ernest Van Hoecke [Mon, 6 Oct 2025 15:48:20 +0000 (17:48 +0200)] 
arm: dts: k3-am62p-verdin: migrate to OF_UPSTREAM

Enable CONFIG_OF_UPSTREAM to receive automatic
device tree updates for the Verdin AM62P.

Remove the now-obsolete device tree files:
- k3-am62p-verdin.dtsi
- k3-am62p-verdin-dev.dtsi
- k3-am62p-verdin-wifi.dtsi
- k3-am62p5-verdin-wifi-dev.dts

Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
3 weeks agotest: Remove not needed null check
Andrew Goodbody [Mon, 6 Oct 2025 10:54:56 +0000 (11:54 +0100)] 
test: Remove not needed null check

In ut_report() there is a null check for stats but stats was already
dereferenced on the line before and is again dereferenced later in the
same function. Also the two places where ut_report() is called from will
have initialised the parameter so there is no chance that stats will be
null. So to prevent static analysis complaining of a use before check
just remove the check.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agoboot: Move preparing bootdev into a function
Simon Glass [Sun, 12 Oct 2025 06:43:56 +0000 (00:43 -0600)] 
boot: Move preparing bootdev into a function

We will want to use this same logic in another place within iter_inc(),
so split it out into its own function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
3 weeks agoboot: Improve comments related to global bootmeths
Simon Glass [Sun, 12 Oct 2025 06:43:53 +0000 (00:43 -0600)] 
boot: Improve comments related to global bootmeths

Add a few comments about global bootmeths and first_glob_method

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
3 weeks agoMerge tag 'xilinx-for-v2026.01-rc1-v2' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 14 Oct 2025 15:48:02 +0000 (09:48 -0600)] 
Merge tag 'xilinx-for-v2026.01-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx/FPGA changes for v2026.01-rc1 v2

zynqmp:
- DT updates
- Enable new commands

mbv:
- Simplify defconfigs

clk:
- Separate legacy handler and use SMC handler

misc:
- Tighten TTC Kconfig dependency

net:
- Add 10GBE support to Gem

pwm:
- cadence-ttc: Fix array sizes

fwu:
- Add platform hook support

spi:
- Remove undocumented cdns,is-dma property

video:
- Fix DPSUB RGB handling

3 weeks agoMerge tag 'mix-next-14102025' of https://source.denx.de/u-boot/custodians/u-boot-tpm
Tom Rini [Tue, 14 Oct 2025 14:27:01 +0000 (08:27 -0600)] 
Merge tag 'mix-next-14102025' of https://source.denx.de/u-boot/custodians/u-boot-tpm

TPM changes:
Make all drive names defined with U_BOOT_DRIVER unique

TEE changes:
Rework things such that sandbox will also traverse the optee directory
when SANDBOX_TEE is enabled, but only build one of the optee-specific
files when OPTEE is enabled.

EFI changes:
Up to now we were relying on the file extension to accept and load
an image over HTTP. We expected images to be either .iso or .img.

By wiring up internal existing functions we can try to mount any
file extension and reject it only if mounting fails.
part_driver_lookup_type

3 weeks agoMerge tag 'u-boot-marvell-20251014' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 14 Oct 2025 14:24:35 +0000 (08:24 -0600)] 
Merge tag 'u-boot-marvell-20251014' of https://source.denx.de/u-boot/custodians/u-boot-marvell

CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=398&view=results

- sata_mv / octeontx_hsmmc: Smatch fixes / patches (Andrew)
- dts: pxa1908: convert to OF_UPSTREAM (Duje)
- phy: marvell: Tighten MVEBU_COMPHY_SUPPORT dependencies (Tom)
- pci: mvebu: Unable to assign mbus windows for 2nd pcie controller (Tony)

3 weeks agocmd: sf: align erase and write on erase block boundary
Viorel Suman [Fri, 19 Sep 2025 07:01:56 +0000 (15:01 +0800)] 
cmd: sf: align erase and write on erase block boundary

Align erase and write on erase block boundary in line with how read was
aligned in commit 622b5d35613 ("cmd: sf: Handle unaligned 'update' start
offset").

Fixes: 622b5d35613 ("cmd: sf: Handle unaligned 'update' start offset")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # R-Car V4H
3 weeks agospi: cadence-qspi: Remove cdns,is-dma property handling
Michal Simek [Thu, 9 Oct 2025 10:34:48 +0000 (12:34 +0200)] 
spi: cadence-qspi: Remove cdns,is-dma property handling

Remove cdns,is-dma DT property handling. Property is not the part of DT
binding and it is also hardcoded to value 1 in all DTs that's why remove it
because none is also testing value 0.
If there is any use case when this configuration should be supported this
patch can be reverted.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/6205c6585589b423692b6ed063506b4c51c04c77.1760006086.git.michal.simek@amd.com
3 weeks agotpm: Make U_BOOT_DRIVER entries unique
Tom Rini [Thu, 25 Sep 2025 20:56:23 +0000 (14:56 -0600)] 
tpm: Make U_BOOT_DRIVER entries unique

All instances of the U_BOOT_DRIVER must use a unique name or they will
lead to link time failures due to name space conflicts when both are
present. In this case the driver was reusing the tpm_tis_i2c name.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agotee: Rework Makefile logic
Tom Rini [Fri, 26 Sep 2025 15:31:44 +0000 (09:31 -0600)] 
tee: Rework Makefile logic

The intention of how this Makefile was written was to allow for sandbox
to build and test drivers still while otherwise requiring OPTEE to be
enabled. This however didn't work quite right in practice as sandbox
could enable some drivers which would then fail to link. Rework things
such that sandbox will also traverse the optee directory when
SANDBOX_TEE is enabled, but only build one of the optee-specific files
when OPTEE is enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agoefi_loader: Improve disk image detection in efi_bootmgr
Javier Tia [Thu, 9 Oct 2025 13:17:47 +0000 (07:17 -0600)] 
efi_loader: Improve disk image detection in efi_bootmgr

Enhances the process for identifying disk images within the EFI boot
manager. Utilize part_driver_lookup_type() to verify the validity of a
downloaded file as a disk image, rather than depending on file
extensions.

part_driver_lookup_type() is now used in the prepare_loaded_image()
function in the EFI boot manager to detect partitions on a block device
created from a downloaded image. This allows the boot manager to boot
from any disk image that can be recognized by a partition driver, not
just ISO and IMG images.

Update prepare_loaded_image() to create the ramdisk block device
internally, obtain the blk_desc and use part_driver_lookup_type() to
detect a valid partition table.

In try_load_from_uri_path(), try prepare_loaded_image() first to detect
disk images, and fall back to PE-COFF detection only if that fails.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agopart: Export part_driver_lookup_type for external use
Javier Tia [Thu, 9 Oct 2025 13:17:46 +0000 (07:17 -0600)] 
part: Export part_driver_lookup_type for external use

Make part_driver_lookup_type non-static so it can be used outside
part.c. This allows external callers to determine the appropriate
partition driver for a block device, enabling more flexible handling of
partition types.

Add a prototype and kernel-doc comment in part.h to document the
function contract. Provide a stub inline implementation returning NULL
when partition support is disabled, ensuring build consistency across
configurations.

Signed-off-by: Javier Tia <javier.tia@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agobootstd: Fix bootflow info for efi_mgr
Sam Protsenko [Fri, 3 Oct 2025 22:27:14 +0000 (17:27 -0500)] 
bootstd: Fix bootflow info for efi_mgr

A "Synchronous Abort" CPU exception happens on an attempt to run the
"bootflow info" command for a global boot method (e.g. efi_mgr):

    => bootflow select 0
    => bootflow info

    "Synchronous Abort" handler, esr 0x96000006, far 0x8

It happens because do_bootflow_info() tries to dereference bflow->dev,
which is NULL in case of efi_mgr. Add the corresponding check to prevent
this NULL pointer dereference and make "bootflow info" command work
properly for global boot methods.

Fixes: 2d653f686b6d ("bootstd: Add a bootflow command")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
3 weeks agoglobal: Disable xPL phases when we have enabled COMPILE_TEST
Tom Rini [Fri, 3 Oct 2025 20:39:34 +0000 (14:39 -0600)] 
global: Disable xPL phases when we have enabled COMPILE_TEST

Due to how we implement the logic for selecting what should/shouldn't be
built in a given phase it becomes extremely cumbersome to make these
phases link when configured by "allyesconfig". As a starting point for
being able to enable "allyesconfig" and expand our static coverage,
disable all other phases in this case.

Future work can be done to enable other phases as time and interest
permit.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agosandbox: Make SANDBOX_xPL depend on !COMPILE_TEST
Tom Rini [Fri, 3 Oct 2025 20:39:32 +0000 (14:39 -0600)] 
sandbox: Make SANDBOX_xPL depend on !COMPILE_TEST

Given how these options are used in the code, it doesn't make sense to
enable them for COMPILE_TEST. Make them depend on !COMPILE_TEST.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoglobal: Make REMAKE_ELF depend on !COMPILE_TEST
Tom Rini [Fri, 3 Oct 2025 20:39:30 +0000 (14:39 -0600)] 
global: Make REMAKE_ELF depend on !COMPILE_TEST

The REMAKE_ELF flag is something that should be selected by the
platforms which need it, and not prompted for. Start by making this
depend on !COMPILE_TEST.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agospl: FIT: Make SPL_LOAD_FIT_FULL depend on SPL_LOAD_FIT
Tom Rini [Fri, 3 Oct 2025 20:39:20 +0000 (14:39 -0600)] 
spl: FIT: Make SPL_LOAD_FIT_FULL depend on SPL_LOAD_FIT

Today, only a few platforms enable SPL_LOAD_FIT_FULL, and all enable
SPL_LOAD_FIT. As can be seen in usage, the FULL symbol is a superset of
the first symbol, not an alternative. Update Kconfig entries based on
this and simplify the only code which checks for either being set.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoSPL: Make SPL_OS depend on supported architectures
Tom Rini [Fri, 3 Oct 2025 20:39:17 +0000 (14:39 -0600)] 
SPL: Make SPL_OS depend on supported architectures

We can only enable Falcon Mode (aka SPL_OS) on architectures which
implement certain hooks. Express these dependencies in Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoMerge patch series "bootstd: rauc: fix doc and info msg to reflect real flow"
Tom Rini [Mon, 13 Oct 2025 20:19:21 +0000 (14:19 -0600)] 
Merge patch series "bootstd: rauc: fix doc and info msg to reflect real flow"

Andreas Pretzsch <apr@cn-eng.de> says:

For the RAUC bootmethod, newly introduced in U-Boot 2025.10, both code
and documentation contain some incorrect (maybe outdated) statements,
so they do not reflect the real behaviour.
This series corrects both the docs and one log_info in the code, to now
reflect the real flow. Beside being visible in the code, all of it was
tested on a real machine.

Despite the very late time in RC cycle, I suggest inclusion before release
of U-Boot 2025.10, as the current statements are simply incorrect. Also I
do not see any risk in these non-functional changes.
Thanks to Martin Schwan for the review and esp. the initial code!

Link: https://lore.kernel.org/r/20251002162506.3908711-1-apr@cn-eng.de
3 weeks agobootstd: rauc: extend and fix doc to reflect real flow
Andreas Pretzsch [Thu, 2 Oct 2025 16:24:59 +0000 (18:24 +0200)] 
bootstd: rauc: extend and fix doc to reflect real flow

The documentation of bootmeth rauc in some aspects does not reflect the
real program flow. Specifically the reset of boot tries in case of "no
more slots found" is incorrect (it won't change BOOT_ORDER).
Also the search sequence for boot scripts was mixed and incomplete.
Fix these points in the documentation.

Explain the initial setup of any missing BOOT_ORDER and BOOT_x_LEFT
environment variables, and inform about BOOT_x_LEFT decrementing.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Reviewed-by: Martin Schwan <m.schwan@phytec.de>
3 weeks agobootstd: rauc: no valid slot fallback: fix info msg to reflect real flow
Andreas Pretzsch [Thu, 2 Oct 2025 16:24:58 +0000 (18:24 +0200)] 
bootstd: rauc: no valid slot fallback: fix info msg to reflect real flow

If there is no more active slot found in find_active_slot(), like when
all slots in BOOT_ORDER have a count of 0, the counters are reset to their
default value CONFIG_BOOTMETH_RAUC_DEFAULT_TRIES. The BOOT_ORDER is _not_
changed, which is logically correct (especially for the case when there is
only one (active) slot set, e.g. BOOT_ORDER only contains 'B', probably due
to RAUC option prevent-late-fallback being set). Resetting the counters of
inactive slots also does not harm here, and is fine as a generic solution.

But the log_info statement in this scenario
  INFO: Resetting boot order and all slot tries
is incorrect. Change this to
  INFO: Resetting all slot tries to 3
with the 3 being inserted by CONFIG_BOOTMETH_RAUC_DEFAULT_TRIES.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Reviewed-by: Martin Schwan <m.schwan@phytec.de>
3 weeks agopci: mvebu: Unable to assign mbus windows for 2nd pcie controller
Tony Dinh [Mon, 29 Sep 2025 21:49:12 +0000 (14:49 -0700)] 
pci: mvebu: Unable to assign mbus windows for 2nd pcie controller

Correct the memory and IO mbus windows size increments in mvebu_pcie_bind.

Currently, pcie1 controller resource_size(&mem) and resource_size(&io)
checks result in a failure. This is because mem.end and io.end must be
incremented at the end of pcie0 windows assignment.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
3 weeks agophy: marvell: Tighten MVEBU_COMPHY_SUPPORT dependencies
Tom Rini [Thu, 25 Sep 2025 20:56:14 +0000 (14:56 -0600)] 
phy: marvell: Tighten MVEBU_COMPHY_SUPPORT dependencies

This driver cannot link without access to functions that are defined in
files that are only build on some platforms.  Express those requirements
in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
3 weeks agoARM: dts: pxa1908: convert to OF_UPSTREAM
Duje Mihanović [Sat, 16 Aug 2025 19:35:19 +0000 (21:35 +0200)] 
ARM: dts: pxa1908: convert to OF_UPSTREAM

Convert the PXA1908 platform and its coreprimevelte board to OF_UPSTREAM
and enable the few drivers found in the upstream DTS.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
3 weeks agommc: octeontx_hsmmc: Remove impossible test
Andrew Goodbody [Thu, 31 Jul 2025 10:51:22 +0000 (11:51 +0100)] 
mmc: octeontx_hsmmc: Remove impossible test

In octeontx_mmc_io_drive_setup drive and slew are tested for being less
than 0 but they are declared as uint fields so this test must always
fail. Just remove the test.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agommc: octeontx_hsmmc: Need parens in expression
Andrew Goodbody [Thu, 31 Jul 2025 10:51:21 +0000 (11:51 +0100)] 
mmc: octeontx_hsmmc: Need parens in expression

The check for no response expected in octeontx_mmc_send_cmd needs parens
adding for proper interpretation.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
3 weeks agosata: sata_mv: Remove always true test
Andrew Goodbody [Tue, 22 Jul 2025 16:42:20 +0000 (17:42 +0100)] 
sata: sata_mv: Remove always true test

Smatch reported an issue with a test that was always true in that an
unsigned variable will always be >= to zero. This led to a closer look
at the code which showed that some static functions returned values that
were always discarded so make those functions return void. Also make
the passing of block counts in those functions always use lbaint_t.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
4 weeks agofs: jffs2: Remove always true test
Andrew Goodbody [Thu, 2 Oct 2025 09:29:14 +0000 (10:29 +0100)] 
fs: jffs2: Remove always true test

Testing an unsigned variable to be >= 0 will always be true so remove
this redundant test.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
4 weeks agofs/squashfs: Ensure memory is freed by using unwind goto
Andrew Goodbody [Thu, 2 Oct 2025 10:36:09 +0000 (11:36 +0100)] 
fs/squashfs: Ensure memory is freed by using unwind goto

Returning immediately from sqfs_read_nest is not consistent with other
error checks in this function and can lead to memory leaks. Instead use
the unwind goto used elsewhere to ensure that the memory is freed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
4 weeks agofs: Rework filesystem guards for xPL phases
Tom Rini [Wed, 1 Oct 2025 20:31:03 +0000 (14:31 -0600)] 
fs: Rework filesystem guards for xPL phases

When adding filesystems to the table in fs/fs.c we need to use
CONFIG_IS_ENABLED(FS_xxx) so that we only include references to a given
filesystem when CONFIG_FS_xxx or CONFIG_SPL_FS_xxx or similar are
enabled. Update the filesystems which weren't doing this to follow that
pattern.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agolz4: Do not disable LZ4_decompress_safe* for xPL
Tom Rini [Wed, 1 Oct 2025 20:31:01 +0000 (14:31 -0600)] 
lz4: Do not disable LZ4_decompress_safe* for xPL

We should compile the LZ4_decompress_safe and
LZ4_decompress_safe_partial functions in SPL and they will be discarded
if unused.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agoiotrace: Finish migrating this to Kconfig
Tom Rini [Wed, 1 Oct 2025 20:30:52 +0000 (14:30 -0600)] 
iotrace: Finish migrating this to Kconfig

When I migrated this to Kconfig in commit 68e54040ccc3 ("sandbox: Move
CONFIG_IO_TRACE to Kconfig") I didn't look hard enough for other
details. As explained in the README, this is valid for ARM too. So start
by making this be a prompted question and CMD_IOTRACE depend on IO_TRACE
being enabled.  Next, migrate the information out of README and in to
the appropriate help text for existing options in Kconfig. Finally, make
this option be default y on SANDBOX but not selected as it's valid to
build without it.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agosandbox: Rework readX/writeX macros to be more like ARM
Tom Rini [Wed, 1 Oct 2025 20:30:35 +0000 (14:30 -0600)] 
sandbox: Rework readX/writeX macros to be more like ARM

The way that the current readX/writeX macros are implemented on sandbox
means that when IO_TRACE is not enabled some code will throw up
incorrect warnings due to how sandbox_{read,write} is implemented. We
instead need to do the "uX __v; __v = sandbox..(..v); __v;" trick that
ARM does.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agoarm: v7m: Allow SYS_ARCH_TIMER here
Tom Rini [Wed, 13 Aug 2025 20:55:10 +0000 (14:55 -0600)] 
arm: v7m: Allow SYS_ARCH_TIMER here

We have had an implementation of the generic timer found in many v7m
chips since 2017, but as part of the Kconfig migration forgot to allow
it as it wasn't being used at the time. Allow it to be built.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agoMerge patch series "mkimage: fit: various fixes in fit_{import,extract}_data"
Tom Rini [Fri, 10 Oct 2025 19:28:42 +0000 (13:28 -0600)] 
Merge patch series "mkimage: fit: various fixes in fit_{import,extract}_data"

Quentin Schulz <foss+uboot@0leil.net> says:

I had to hunt down a difference between the FIT after running mkimage
once and after running it twice. The use-case is typically U-Boot
generating an unsigned FIT and then calling mkimage manually to sign it
outside any build system.

The issue can be reproduced with the following

make CROSS_COMPILE=aarch64-linux-gnu- BUILD_TAG= SOURCE_DATE_EPOCH=0 O=build/ringneck ringneck-px30_defconfig
make CROSS_COMPILE=aarch64-linux-gnu- BUILD_TAG= SOURCE_DATE_EPOCH=0 O=build/ringneck -j`nproc`
cd build/ringneck
cp ./simple-bin.fit.itb ./simple-bin.foo.fit
cp ./simple-bin.fit.itb ./simple-bin.foo2.fit
BUILD_TAG= SOURCE_DATE_EPOCH=0 ./tools/mkimage -E -t -B 200 -F ./simple-bin.foo.fit
BUILD_TAG= SOURCE_DATE_EPOCH=0 ./tools/mkimage -E -t -B 200 -F ./simple-bin.foo2.fit
BUILD_TAG= SOURCE_DATE_EPOCH=0 ./tools/mkimage -E -t -B 200 -F ./simple-bin.foo2.fit

then compare the output of

dtc -I dtb -O dts simple-bin.foo.fit
dtc -I dtb -O dts simple-bin.foo2.fit

data-size and data-offset properties are swapped.

While going through the code, I identified a few theoretical issues
possibly triggered by not checking the return code of fdt_setprop so
those are added. Not tested outside of building.

Link: https://lore.kernel.org/r/20250923-mkimage-2-runs-data-size-v1-0-ef3fa57e9645@cherry.de
4 weeks agomkimage: fit: erase data-size property when importing data
Quentin Schulz [Tue, 23 Sep 2025 10:27:22 +0000 (12:27 +0200)] 
mkimage: fit: erase data-size property when importing data

When importing data, the data-offset property is removed and the data
content is imported inside the data property of the node.

When mkimage is run twice on the same FIT, data-size property is already
set in the second run, from the first run (via the fit_export_data
function). If we don't remove the data-size property, nothing guarantees
it matches the actual size of data within the data property. To avoid
possible mistakes when handling the data property, let's simply remove
the data-size property as well.

This also fixes an ordering issue of the data-size and data-offset
properties in FIT when comparing the FIT after one run of mkimage and a
second run. This is due to fit_export_data setting data-offset property
first (it doesn't exist so it's added) and then data-size (it doesn't
exist so it's added) for the first run, while it sets data-offset
property first (removed in fit_import_data, so it doesn't exist so it's
added) and then data-size (it exists already from the first run, so it's
simply modified) for the second run.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
4 weeks agomkimage: fit: do not ignore fdt_setprop return code
Quentin Schulz [Tue, 23 Sep 2025 10:27:21 +0000 (12:27 +0200)] 
mkimage: fit: do not ignore fdt_setprop return code

All explicit calls to fdt_setprop* in tools/ are checked except those
three. Let's add a check for the return code of fdt_setprop_u32() calls.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
4 weeks agomkimage: fit: do not overwrite fdt_setprop return value
Quentin Schulz [Tue, 23 Sep 2025 10:27:20 +0000 (12:27 +0200)] 
mkimage: fit: do not overwrite fdt_setprop return value

The return code of fdt_setprop is overwritten by the one from
fdt_delprop meaning we could very well have an issue when setting the
property that would be ignored if the deletion of the property that
comes right after passes.

Let's add a separate check for each.

Fixes: 4860ee9b09e0 ("mkimage: allow internalization of data-position")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
4 weeks agoMerge patch series "configs: toradex: enable USB Gadget OS Descriptors"
Tom Rini [Fri, 10 Oct 2025 17:05:03 +0000 (11:05 -0600)] 
Merge patch series "configs: toradex: enable USB Gadget OS Descriptors"

Emanuele Ghidoli <emanuele.ghidoli@toradex.com> says:

USB OS Descriptors are used to install and configure the device without
requiring any user interaction on OS which support them (e.g. Windows).
Enable them in order to improve the user experience when fastboot is used.

Link: https://lore.kernel.org/r/20251001132111.1490516-1-ghidoliemanuele@gmail.com
4 weeks agoMerge patch series "configs: verdin-am*: enable USB Gadget OS Descriptors"
Tom Rini [Fri, 10 Oct 2025 17:03:58 +0000 (11:03 -0600)] 
Merge patch series "configs: verdin-am*: enable USB Gadget OS Descriptors"

Emanuele Ghidoli <ghidoliemanuele@gmail.com> says:

From: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>

USB OS Descriptors are used to install and configure the device without
requiring any user interaction on OS which support them (e.g. Windows).
Enable them in order to improve the user experience when fastboot is used.

Toradex Easy Installer takes advantage of USB OS Descriptors to load
itself via USB recovery.

Link: https://lore.kernel.org/r/20251001131839.1488633-1-ghidoliemanuele@gmail.com