imx9: scmi: Move u-boot early MMU table to top 2MB of first 64MB DDR
Subsystems (3)
PATCH 1/2 imx9: scmi: Move u-boot early MMU table to top 2MB of first 64MB DDR
From: Ye Li <[email protected]>
The default u-boot early MMU table address is at CFG_SYS_SDRAM_BASE. The same address is used as alias target on Toradex's iMX95 boards in RAM-size probe. When a probe address aliases that location, the test temporarily overwrites an entry in the active page tables.
To avoid such overlap, move u-boot early MMU table to top 2MB of first 64MB DDR.
--- arch/arm/mach-imx/imx9/scmi/soc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-imx/imx9/scmi/soc.c +4 -1
@@ -613,9 +613,12 @@ __weak unsigned long board_spl_mmu_tlb_base(void)#endif } +/* Uboot early MMU only map first 64MB DDR before DM init. +* Set default early MMU table at top 2MB of first 64MB DDR +*/ __weak unsigned long board_early_mmu_tlb_base (void ) { -return CFG_SYS_SDRAM_BASE ; +return CFG_SYS_SDRAM_BASE +SZ_64M -SZ_2M ; }/*
Signature · 1 line
2.50.1
PATCH 2/2 toradex: {aquila, smarc, verdin}-imx95: Enable caches in SPL
From: Ye Li <[email protected]>
To enable icache and dcache in SPL, add the definition of secure DDR space which could be accessed by SPL and move arch_cpu_init before spl_early_init.
--- board/toradex/aquila-imx95/spl.c | 4 ++-- board/toradex/smarc-imx95/spl.c | 4 ++-- board/toradex/verdin-imx95/spl.c | 4 ++-- include/configs/aquila-imx95.h | 2 +- include/configs/toradex-smarc-imx95.h | 3 +++ include/configs/verdin-imx95.h | 3 +++ 6 files changed, 13 insertions(+), 7 deletions(-)
board/toradex/aquila-imx95/spl.c +2 -2
@@ -58,6 +58,8 @@ void board_init_f(ulong dummy)timer_init (); +arch_cpu_init (); +/* Need dm_init() to run before any SCMI calls */ spl_early_init ();
@@ -66,8 +68,6 @@ void board_init_f(ulong dummy)if (ret)hang ();/* MU not probed, nothing can be outputed, hang */ -arch_cpu_init (); -preloader_console_init ();debug ("SOC: 0x%x\n" , gd->arch.soc_rev);
board/toradex/smarc-imx95/spl.c +2 -2
@@ -99,6 +99,8 @@ void board_init_f(ulong dummy)timer_init (); +arch_cpu_init (); +/* Need dm_init() to run before any SCMI calls */ spl_early_init ();
@@ -107,8 +109,6 @@ void board_init_f(ulong dummy)if (ret)hang ();/* MU not probed, nothing can be outputed, hang */ -arch_cpu_init (); -preloader_console_init ();debug ("SOC: 0x%x\n" , gd->arch.soc_rev);
board/toradex/verdin-imx95/spl.c +2 -2
@@ -58,6 +58,8 @@ void board_init_f(ulong dummy)timer_init (); +arch_cpu_init (); +/* Need dm_init() to run before any SCMI calls */ spl_early_init ();
@@ -66,8 +68,6 @@ void board_init_f(ulong dummy)if (ret)hang ();/* MU not probed, nothing can be outputed, hang */ -arch_cpu_init (); -preloader_console_init ();debug ("SOC: 0x%x\n" , gd->arch.soc_rev);
include/configs/aquila-imx95.h +1 -1
@@ -26,6 +26,6 @@#define PHYS_SDRAM_2_SIZE SZ_6G#define CFG_SYS_SECURE_SDRAM_BASE 0x8A000000/* Secure DDR region for A55, SPL could use first 2MB */ -#define CFG_SYS_SECURE_SDRAM_SIZE 0x06000000 +#define CFG_SYS_SECURE_SDRAM_SIZE SZ_64M#endif
include/configs/toradex-smarc-imx95.h +3 -0
@@ -22,4 +22,7 @@#define PHYS_SDRAM_SIZE (SZ_2G - PHYS_SDRAM_FW_RSVD)#define PHYS_SDRAM_2_SIZE SZ_6G +#define CFG_SYS_SECURE_SDRAM_BASE 0x8A000000/* Secure DDR region for A55 */ +#define CFG_SYS_SECURE_SDRAM_SIZE SZ_64M +#endif
include/configs/verdin-imx95.h +3 -0
@@ -22,4 +22,7 @@#define PHYS_SDRAM_SIZE (SZ_2G - PHYS_SDRAM_FW_RSVD)#define PHYS_SDRAM_2_SIZE SZ_30G +#define CFG_SYS_SECURE_SDRAM_BASE 0x8A000000/* Secure DDR region for A55 */ +#define CFG_SYS_SECURE_SDRAM_SIZE SZ_64M +#endif
Signature · 1 line
2.50.1
Re: [PATCH 2/2] toradex: {aquila, smarc, verdin}-imx95: Enable caches in SPL
Quoted 7 lines · On Sat, Oct 10, 2026 at 03:59:51PM +0800, [email protected] wrote:
From: Ye Li <[email protected]>
To enable icache and dcache in SPL, add the definition of secure DDR space which could be accessed by SPL and move
arch_cpu_initbeforespl_early_init.Signed-off-by Ye Li <[email protected]>
Re: [PATCH 2/2] toradex: {aquila, smarc, verdin}-imx95: Enable caches in SPL
In reply to [email protected]Quoted 17 lines · On 10/10/26 09:59, [email protected] wrote:
From: Ye Li <[email protected]>
To enable icache and dcache in SPL, add the definition of secure DDR space which could be accessed by SPL and move
arch_cpu_initbeforespl_early_init.Signed-off-by Ye Li <[email protected]>--- board/toradex/aquila-imx95/spl.c | 4 ++-- board/toradex/smarc-imx95/spl.c | 4 ++-- board/toradex/verdin-imx95/spl.c | 4 ++-- include/configs/aquila-imx95.h | 2 +- include/configs/toradex-smarc-imx95.h | 3 +++ include/configs/verdin-imx95.h | 3 +++ 6 files changed, 13 insertions(+), 7 deletions(-)
board/toradex/aquila-imx95/spl.c
Quoted 1 line
board/toradex/aquila-imx95/spl.c +0
-0
Hello Ye,
Nit: spaces instead of tabs after the added #defines in toradex-smarc-imx95.h and verdin-imx95.h.
Hello Ye,
thanks for the patch, appreciated.
Quoted 11 lines · On Sat, Oct 10, 2026 at 03:59:50PM +0800, [email protected] wrote:
From: Ye Li <[email protected]>
The default u-boot early MMU table address is at
CFG_SYS_SDRAM_BASE. The same address is used as alias target on Toradex's iMX95 boards in RAM-size probe. When a probe address aliases that location, the test temporarily overwrites an entry in the active page tables.To avoid such overlap, move u-boot early MMU table to top 2MB of first 64MB DDR.
Signed-off-by Ye Li <[email protected]>
Emanuele, can you please review this and the following one?
Francesco
Quoted 23 lines · On 10/10/26 09:59, [email protected] wrote:
From: Ye Li <[email protected]>
The default u-boot early MMU table address is at
CFG_SYS_SDRAM_BASE. The same address is used as alias target on Toradex's iMX95 boards in RAM-size probe. When a probe address aliases that location, the test temporarily overwrites an entry in the active page tables.To avoid such overlap, move u-boot early MMU table to top 2MB of first 64MB DDR.
Signed-off-by Ye Li <[email protected]>--- arch/arm/mach-imx/imx9/scmi/soc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)arch/arm/mach-imx/imx9/scmi/soc.c +0
-0@@ -613,9 +613,12 @@ __weak unsigned long board_spl_mmu_tlb_base(void)#endif }
arch/arm/mach-imx/imx9/scmi/soc.c __weak unsigned long board_spl_mmu_tlb_base(void) · line 624
Quoted 10 lines
arch/arm/mach-imx/imx9/scmi/soc.c +4
-1+/* Uboot early MMU only map first 64MB DDR before DM init. +* Set default early MMU table at top 2MB of first 64MB DDR +*/ __weak unsigned long board_early_mmu_tlb_base (void ) { -return CFG_SYS_SDRAM_BASE ; +return CFG_SYS_SDRAM_BASE +SZ_64M -SZ_2M ; }/*
Hello Ye,
thanks for the patch.