102789 Commits

Author SHA1 Message Date
Heinrich Schuchardt
6bb374b1a1 efi_loader: typo 'mange' in efi_net.c
%s/mange/manage/

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
dbed053487 efi_driver: don't leak name in efi_bl_create_block_device()
blk_create_devicef() uses a copy of parameter name.
We can use a local variable.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
59f2c5a0fa efi_driver: typo 'to be write'
%s/to be write/to write/

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
35e510f2af efi_driver: correct formatting in efi_uc_stop()
Correct indentation.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
1a30ddeda9 efi_client: efi_store_memory_map() must return int
The type efi_status_t is not compatible with the return type int.

Let efi_store_memory_map() return -EFAULT instead of a truncated EFI error
code.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
d05190bd65 efi_loader: correct struct efi_priv description
Add a missing colon ':' to match Sphinx style.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Kory Maincent (TI.com)
81458bd113 doc: bootstd: Describe the optional extension_overlay_addr environment
Add extension_overlay_addr description to the list of environment
variables that can be useful during the standard boot.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-11-06 23:26:28 +01:00
Kory Maincent (TI.com)
811d41221b doc: bootstd: Remove extension support from TODO list
Now that extension support has been added to extlinux and efi bootmeths
we can remove this line from the TODO list.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-11-06 23:26:28 +01:00
Ben Wolsieffer
ad669eb796 efi: video: fix mode info in payload mode
Currently, the EFI framebuffer is non-functional in payload mode. It
always reports: "No video mode configured in EFI!"

This is caused by a copy-paste error that replaced
"struct efi_entry_gopmode" with "struct efi_gop_mode".

Fixes: 88753816cf54 ("efi: video: Move payload code into a function")
Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
411f8f5367 efi: Use struct efi_gop_mode_info in struct efi_entry_gopmode
Since C99 flexible array members are allowed at the end of structures.
We require C11.

Use struct efi_gop_mode_info in the definition of struct efi_entry_gopmode
to avoid code duplication and unnecessary conversions.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:28 +01:00
Heinrich Schuchardt
893871132e test: provide test for 'acpi list' command
Check that some mandatory ACPI tables exist:

  - RSDP
  - RSDT or XSDT
  - FADT

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:27 +01:00
Heinrich Schuchardt
33355013ff qfw/acpi: do not zero out XSDT address
On RISC-V QEMU provides an XSDT table. The RSDP table points to it.
We must not zero out this pointer because otherwise no ACPI table can be
found.

Fixes: 15ca25e31ed5 ("x86: emulation: Support BLOBLIST_TABLES properly")
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:27 +01:00
Simon Glass
74545d49c7 qfw: Add more fields and a heading to qfw list
Update the command to show the size and selected file, since this is
useful information at times. Add a heading so it is clear what each
field refers to.

Add a simple test as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-06 23:26:27 +01:00
Tom Rini
ddc916334a Gitlab CI: Rework our tag usage again
Now that we've had jobs running on both amd64 and arm64 hosts for a
while, we have enough data to look at usage and findings. For the world
build job, make use of the new DEFAULT_FAST_TAG and only build it once,
on either amd64 or arm64 as we don't run in to host specific results
there. For sandbox, continue to build on both arm64 and amd64 hosts as
we can find host specific breakage that way. Remove the mistaken
restriction on sandbox64_lwip.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-06 15:16:51 -06:00
Tom Rini
ad9240cb9d Merge patch series "ARM: bootm: Add support for starting Linux through OPTEE-OS on ARMv7a"
This series from Marek Vasut <marek.vasut@mailbox.org> brings some
enhancements to use cases using OPTEE-OS on ARMv7a platforms, some of
which already existed on ARMv8.

Link: https://lore.kernel.org/r/20251030212359.12824-1-marek.vasut@mailbox.org
2025-11-06 13:35:51 -06:00
Tom Rini
5451315bab Merge patch series "Fix AArch32 compilation with Clang"
Dmitrii Sharshakov <d3dx12.xx@gmail.com> says:

I faced some minor compatibility issues when choosing Clang as the
cross-compiler for my target.

Please review these two fixes, aiming at enabling Clang-based builds
(still using GNU binutils) for 32-bit ARM targets.

Tested to fix build with (also run-tested on qemu arm and arm64 with clang):

make ARCH=arm HOSTCC=clang CROSS_COMPILE=arm-none-eabi- CC=clang imx6ulz_smm_m2b_defconfig
make ARCH=arm HOSTCC=clang CROSS_COMPILE=arm-none-eabi- CC=clang -j20

Link: https://lore.kernel.org/r/20251101-clang-fixes-v1-0-a8398475226e@gmail.com
2025-11-06 13:35:51 -06:00
Marek Vasut
057b1f8df9 arm64: renesas: Clean up default boot command
The current default boot command does not respect the Linux kernel 2 MiB
alignment requirement, present on aarch64 [1]:

"
The Image must be placed text_offset bytes from a 2MB aligned base
address anywhere in usable system RAM and called there.
"

Adjust the boot command such, that it always places both Image and DT at
the nearest highest 2 MiB aligned offset. The DT is placed at lower 2 MiB
aligned address, the aarch64 Image is placed at the next higher 2 MiB
aligned address. Is is unlikely that a DT would be larger than 2 MiB on
these systems.

Replace use of hard-coded load addresses with generic ${loadaddr} aligned
using setexpr. This way, if user picks valid ${loadaddr}, their kernel and
DT address will be correctly set as well.

Fix up boot commands to use && instead of ; to exit the boot command early
in case of failure.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm64/booting.rst#n138

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:13:52 +01:00
Hai Pham
eb5ffe54ad arm64: renesas: Use reset macro from common header
Clean up to avoid more reset macro duplication.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:59 +01:00
Marek Vasut
7786458612 arm64: renesas: Use BIT() macro in R-Car Gen3 header
Use the BIT() macro consistently in R-Car Gen3 header.
Fix indent with spaces to tabs at the same time. No
functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:59 +01:00
Hai Pham
aed74eddf3 arm64: renesas: Make CONFIG_SYS_LOAD_ADDR family-specific
Make CONFIG_SYS_LOAD_ADDR family-specific to prepare for R-Car Gen5
support. R-Car Gen5 uses different memory map compared to the current
R-Car Gen3 and Gen4 and also different CONFIG_SYS_LOAD_ADDR. This is
a preparatory change for R-Car Gen5. No functional change.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Upport
2025-11-06 20:09:59 +01:00
Marek Vasut
d7e8fb915e arm64: renesas: Drop encoded file name from R-Car Gen3/Gen4 header
Checkpatch warns that it's generally not useful to have
the filename in the file. The warning is valid, drop the
encoded file name. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:59 +01:00
Huy Bui
1261a63073 pinctrl: renesas: Add initial R8A78000 R-Car X5H PFC tables
Add initial pin control tables for the Renesas R-Car X5H R8A78000 SoC.
This SoC is the first one which includes custom DRV register handling,
different from previous generations due to change in DRV register bit
layout.

Signed-off-by: Huy Bui <huy.bui.wm@renesas.com>
Signed-off-by: Khanh Le <khanh.le.xr@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:59 +01:00
Hai Pham
73bdd6a7dc pinctrl: renesas: Move drive strength configuration into sh_pfc_soc_operations
The upcoming Renesas R-Car Gen5 uses different mapping of bits in DRV
control register, which is incompatible with existing DRV register bit
mapping. Add .set_drive_strength callback into sh_pfc_soc_operations
and call it from sh_pfc_pinconf_set(), to allow each SoC specific PFC
driver to implement replacement .set_drive_strength. Make the current
sh_pfc_pinconf_set_drive_strength() non-static, rename it with rcar_
prefix, and pass it as .set_drive_strength for existing PFC drivers.
This is a preparatory patch for R-Car Gen5, no functional change.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Consistently use .set_drive_strength() and pass exisiting
        sh_pfc_pinconf_set_drive_strength() as its parameter for
	all PFC drivers. Rewrite commit message.]
2025-11-06 20:09:59 +01:00
Hai Pham
1306e10b50 pinctrl: renesas: Show bit position in config write
Show bit position in config write debug log, which is helpful for cases
where the p port setting is applied at the exact p bit position.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Unsplit the string
2025-11-06 20:09:59 +01:00
Marek Vasut
7db190def0 pinctrl: renesas: Align Kconfig entry indent
Fix Kconfig entry indent to be always consistently indented with
leading tabs, never with leading spaces. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:59 +01:00
Huy Bui
7ee86cab7b gpio: renesas: Add R-Car Gen5 support
Add support for the GPIO controller block in the R-Car Gen5 SoC family.
The GPIO controller has a General Input Enable Register (INEN), whose
reset state is to have all input disabled. The GPIO controller also has
updated offsets for its control registers. U-Boot uses three registers,
INDT, POSNEG, INEN, which have updated offsets, those are handled by the
driver.

Signed-off-by: Huy Bui <huy.bui.wm@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: - Access Gen5 specific registers via driver data offsets,
        - Update commit message]
2025-11-06 20:09:58 +01:00
Marek Vasut
d81ffc337d gpio: renesas: Access INDT, POSNEG, INEN registers via match data offsets
The Renesas R-Car Gen5 GPIO controller has INDT, POSNEG, INEN registers
at different offsets compared to previous generations. Introduce three
new entries in struct rcar_gpio_data {} match data to describe these
register offsets for each GPIO controller. Update the driver to access
these three registers through the match data offsets. No functional
change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:58 +01:00
Marek Vasut
01a15d7699 gpio: renesas: Wrap quirks in struct rcar_gpio_data
Wrap the RCAR_GPIO_HAS_INEN quirk in more flexible struct rcar_gpio_data {}
in preparation for addition of Renesas R-Car Gen5 GPIO controller support.
The Renesas R-Car Gen5 GPIO controller requires more than a single quirk
to properly describe it, therefore increase the flexibility and introduce
full match data structure, and use it throughout the driver. No functional
change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:58 +01:00
Marek Vasut
1fe3a731df gpio: renesas: Drop unused register macros
Remove register macros for registers which are not used by this driver.
This makes it easier to get an overview of which registers are really
used by the driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:58 +01:00
Marek Vasut
0a6b4b1c36 gpio: renesas: Drop pfc_offset parsing
The PFC offset is no longer used directly in the driver since commit
fbf26bea3964 ("gpio: renesas: Migrate to pinctrl GPIO accessors")
Drop the pfc_offset parsing.

Fixes: fbf26bea3964 ("gpio: renesas: Migrate to pinctrl GPIO accessors")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:09:58 +01:00
Thanh Quan
3d50dba3a3 phy: renesas: Add Multi-Protocol PHY driver for R-Car X5H
Add PHY driver for Multi-Protocol PHY present on Renesas R-Car X5H
R8A78000 SoC. Currently, the PHY driver only supports configuring
the MPPHY for ethernet operation.

Signed-off-by: Thanh Quan <thanh.quan.xn@renesas.com>
Signed-off-by: Phong Hoang <phong.hoang.wz@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> #Fix License-Identifier
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Clean up macros, indent, clock and reset handling in probe,
        rename the driver and add r8a78000- into compatible string,
	update commit message.]
2025-11-06 20:09:58 +01:00
Tam Nguyen
152ff5696b phy: renesas: Add PCS driver for Renesas R-Car X5H R8A78000
Add support for the Ethernet Physical Coding Sublayer (PCS) controller
on R-Car Gen5 SoCs, specifically the Renesas R-Car X5H R8A78000.

The controller is based on the SERDES infrastructure used in previous
R-Car generations, with updates for Gen5 register layout and features.

Because majority of this driver is SoC-specific register programming,
the majority of this driver is different enough from R8A779F0 SerDes
driver to justify its own driver. Deduplication of the remaining bits
of code does not yield any improvement.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Phong Hoang <phong.hoang.wz@renesas.com>
Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com>
Signed-off-by: Thanh Quan <thanh.quan.xn@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Add missing clk_bulk_disable() in fail path.
        Drop always-true aneg_on setting.
	Reduce poll delay from 100s to 100ms.
	Use bulk reset operations to finalize reset handling.]
2025-11-06 20:09:58 +01:00
Marek Vasut
eaef954844 net: rswitch: Add Renesas R-Car X5H Ethernet Switch3 support
Add support for the Renesas Ethernet Switch3 (RSW3) controller,
present in R-Car Gen5 SoCs such as R-Car X5H (R8A78000). The
hardware offset differences are handled via driver match data.

The driver newly detects whether the switch prot is connected
to xPCS or not, and if so, turns on MIOC bit 3. This is new on
R-Car X5H. GWCKSC register is also programmed only on X5H. The
rest of the operation is identical to RSwitch2.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com>
Signed-off-by: Phong Hoang <phong.hoang.wz@renesas.com>
Signed-off-by: Thanh Quan <thanh.quan.xn@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2025-11-06 20:08:37 +01:00
Marek Vasut
275408bfcf net: rswitch: Parametrize MPIC_MDC_CLK_SET clock setting
The MPIC_MDC_CLK clock setting value differs between R-Car S4
and R-Car X5H. Parametrize the value in preparation for R-Car
X5H addition into this driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
7419b682f3 net: rswitch: Parametrize GWDCBAC, FWPBFCSDC, CABPIRM register offsets
The GWDCBAC0, GWDCBAC1, FWPBFCSDC, CABPIRM register offsets changed
between R-Car S4 and R-Car X5H. Parametrize their offsets in preparation
for R-Car X5H addition into this driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
401bcde3c1 net: rswitch: Inline FWRO, CARO, GWRO, TARO, RMRO macros
Inline FWRO, CARO, GWRO, TARO, RMRO macros directly into the
follow up register macros. FWRO, CARO, GWRO, TARO are already
zero, drop them. RMRO is 0x1000, increment all registers which
add RMRO by 0x1000 directly. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
7f7cd08370 net: rswitch: Parametrize forwarding engine CSD register offset
The forwarding engine CSD register offset changed between the
R-Car S4 and R-Car X5H. Parametrize this offset in preparation
for R-Car X5H addition into this driver. Clean up the macro
parameter names and make them more obvious. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
a9d0819774 net: rswitch: Parametrize port count
The total port counts differ across variants of this IP in
R-Car S4 and R-Car X5H. Parametrize port count in preparation
for R-Car X5H addition into this driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
c75eb213f6 net: rswitch: Parametize COMA, ETHA, GWCA offsets
The COMA, ETHA, GWCA offsets differ across variants of this IP in
R-Car S4 and R-Car X5H. Parametrize these offsets in preparation
for R-Car X5H addition into this driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
af76474fd4 net: rswitch: Add support for split MII and SerDes
This IP does support operating MII and SerDes via different ports.
Currently, the driver assumes that MII and SerDes are always bound
together on the same port, but this may not be the case. Implement
support for controlling MII and SerDes separately.

While the change is extensive, the gist of the change is to pass
pointer to the selected port registers to MII or SerDes functions,
depending on which port and operations should be done on that port.
Each combined ETHA instance contains both MII and SerDes register
pointers, which may not point to the same port, and passes those
registers to MII and SerDes functions respectively to control the
MII or SerDes of each port.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
a8a97474fd net: rswitch: Use bulk clock operations
The new version of RSwitch3 in Renesas R-Car Gen5 uses multiple
clock to supply the IP. Convert the driver to bulk clock API to
cater for both single clock of R-Car S4 and multiple clock of
R-Car Gen5. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
e9e597bc73 net: rswitch: Initialize RX DMA descriptor .die_dt field to DT_FEMPTY
Empty RX DMA descriptor must contain .die_dt field set to DT_FEMPTY,
because hardware DMA overwrites this field to non-DT_FEMPTY when data
are received, and the .recv callback tests the content of RX descriptor
.die_dt field to determine whether hardware did receive any data and
updated the .die_dt field, and based on that information, receives a
packet or not. Fix the incorrect RX DMA descriptor initialization to
assure the .recv callback always works correctly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
482606d18c net: rswitch: Drop unused macros
Remove macros which are not used in the driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
1b738947e3 net: rswitch: Switch indent from spaces to tabs
Fix indent from multiple spaces to tabs, to be consistent with
coding style and the rest of the driver. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:08:37 +01:00
Marek Vasut
be0e9ac7c8 spl: fit: Add ability to jump to Linux via OPTEE-OS on ARMv7a
Add support for jumping to Linux kernel through OPTEE-OS on ARMv7a to SPL.
This is already supported on ARMv8a, this patch adds the ARMv7a support.
Extend the SPL fitImage loader to record OPTEE-OS load address and in case
the load address is non-zero, use the same bootm-optee.S code used by the
U-Boot fitImage jump code to start OPTEE-OS first and jump to Linux next.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-06 11:26:18 -06:00
Marek Vasut
20861863eb ARM: bootm: Add support for starting Linux through OPTEE-OS on ARMv7a
Add support for jumping to Linux kernel through OPTEE-OS on ARMv7a.
This is only supported if U-Boot runs in PL1 secure. This change adds
two components, one is fitImage OPTEE-OS loadable handler, which makes
a note of OPTEE-OS being loaded and stores the load address for later
jump to it. The second part is the actual jump to Linux through OPTEE-OS.
The jump through OPTEE-OS requires set up of multiple CPU registers, r1
and r2 are passed through, r0 and r3 have to be set to 0, lr is set to
Linux kernel entry point. This setup is done by new assembler function
boot_jump_linux_via_optee().

The boot_jump_linux_via_optee() also includes STM32MP13xx late TZC
configuration write, this cannot be moved easily, hence the ifdef.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-06 11:26:18 -06:00
Dmitrii Sharshakov
f7d177395d build: fix building u-boot.lds with Clang as a cross-compiler
Make sure to pass Clang flags to the KBUILD_CPPFLAGS as well, as this
variable is used for flags during compiling for target

Skipping this leads to Clang being invoked with args for target, but
without target indication, thus defaulting to host arch:

  LDS     u-boot.lds
clang: error: ... '-mabi=' for target 'x86_64-suse-linux'
clang: error: ... '-mno-thumb' for target 'x86_64-suse-linux'
clang: error: ... '-mno-unaligned-access' for target 'x86_64-suse-linux'
clang: error: ... '-ffixed-r9' for target 'x86_64-suse-linux'
clang: error: ... '-mno-movt' for target 'x86_64-suse-linux'
make: *** [Makefile:2345: u-boot.lds] Fehler 1

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-11-06 11:21:24 -06:00
Dmitrii Sharshakov
e8e3b38def arch: arm: build: only set -mgeneral-regs-only for AArch64
This option is not available for 32-bit ARM targets and causes an error
when building with Clang:

clang: error: unsupported option '-mgeneral-regs-only' for
target 'arm-none-eabi'

This fixes the following patch (also seems to only concern AArch64):

Link: https://lists.denx.de/pipermail/u-boot/2021-August/458067.html

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-11-06 11:21:24 -06:00
Prasad Kale
c488907f91 Invalidate cached FAT device upon boot error
When spl boot device list has multiple FAT devices, any previousely
registered FAT device should be deregistered before registering
next FAT boot device, otherwise the function may not attempt boot
from next FAT device.One of the situations where this issue can be
observed is when the boot device list has two FAT partitions of a
memory device and if booting fails on first partition (because of
file or partition related errors), boot from next partition actually
gets attempted on previous boot device only, as the previous device
has remained marked as registered. Call the function that invalidates
cached boot device in case of failure in booting from current FAT
boot device.

Signed-off-by: Prasad Kale <prasad.kale@live.com>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Sean Anderson <seanga2@gmail.com>
2025-11-06 08:31:34 -06:00
Jan Kiszka
77905c333e tools: key2dtsi: Write out modulus and r-squared with the correct length
Align the implementation to rsa_add_verify_data() by writing the modulus
and r-squared properties with the same length as the key itself. This
fixes signature verification issues when one of the parameters has
leading zeros.

Reported-by: Hans Gfirtner (Nokia) <hans.gfirtner@nokia.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2025-11-06 08:31:25 -06:00