Skip to content

Commit 5b93c3e

Browse files
committed
Merge tag 'u-boot-stm32-20250930' of https://source.denx.de/u-boot/custodians/u-boot-stm
CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/27776 - stm32mp1: Fix env_get_location() - stm32mp2: Update register used by BL31 for boot parameter
2 parents 8dee93c + 8a2e75e commit 5b93c3e

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

arch/arm/mach-stm32mp/stm32mp2/cpu.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,21 @@ uintptr_t get_stm32mp_bl2_dtb(void)
9292
}
9393

9494
/*
95-
* Save the FDT address provided by TF-A in r2 at boot time
95+
* Save the FDT address provided by TF-A at boot time
9696
* This function is called from start.S
9797
*/
98-
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
99-
unsigned long r3)
98+
void save_boot_params(unsigned long x0, unsigned long x1, unsigned long x2,
99+
unsigned long x3)
100100
{
101-
nt_fw_dtb = r2;
101+
/* use the ARM64 kernel booting register settings:
102+
* x0 = physical address of device tree blob (dtb) in system RAM.
103+
* so kernel can replace U-Boot in FIP wihtout BL31 modification
104+
* else falback to x2 used in previous TF-A version
105+
*/
106+
if (x0)
107+
nt_fw_dtb = x0;
108+
else
109+
nt_fw_dtb = x2;
102110

103111
save_boot_params_ret();
104112
}

board/st/stm32mp1/stm32mp1.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,8 @@ enum env_location env_get_location(enum env_operation op, int prio)
751751
case BOOT_FLASH_EMMC:
752752
if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
753753
return ENVL_MMC;
754+
else if (CONFIG_IS_ENABLED(ENV_IS_IN_EXT4))
755+
return ENVL_EXT4;
754756
else
755757
return ENVL_NOWHERE;
756758

0 commit comments

Comments
 (0)