With commit a3075db94d49 ("lmb: Reinstate access to memory above
ram_top"), the memory region beyond 0x100000000 is now accessible for
allocation. This breaks booting in devices like at least in some
variants of the Samsung Galaxy J6, where only CPU0 is able to appear
online.Similar to some other boards, limit the memory to the DDR low region. This also appears to re-implement the logic which was reverted. The lmb_arch_add_memory() takes over the lmb initialization for the board. Signed-off-by: Kaustabh Chakraborty <[email protected]> --- This one's a critical fix, would be nice to have it pulled in by v2026.07. --- Changes in v2: - enable CONFIG_LMB_ARCH_MEM_MAP from target - Link to v1: https://patch.msgid.link/[email protected] To: [email protected] Cc: Minkyu Kang <[email protected]> Cc: Tom Rini <[email protected]> Cc: Kaustabh Chakraborty <[email protected]> Cc: Henrik Grimler <[email protected]> --- arch/arm/mach-exynos/Kconfig | 1 + board/samsung/exynos-mobile/exynos-mobile.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index b084b7284aa..8251599332a 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -258,6 +258,7 @@ config TARGET_EXYNOS_MOBILE select BOARD_EARLY_INIT_F select CLK_EXYNOS select LINUX_KERNEL_IMAGE_HEADER + select LMB_ARCH_MEM_MAP select OF_CONTROL config SYS_SOC diff --git a/board/samsung/exynos-mobile/exynos-mobile.c b/board/samsung/exynos-mobile/exynos-mobile.c index 6b2b1523663..f1f6cf683dd 100644 --- a/board/samsung/exynos-mobile/exynos-mobile.c +++ b/board/samsung/exynos-mobile/exynos-mobile.c @@ -353,6 +353,31 @@ int dram_init_banksize(void) return 0; } +void lmb_arch_add_memory(void) +{ + u64 ddr_low_top = 1ULL << 32; + unsigned int i; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + u64 start = gd->bd->bi_dram[i].start; + u64 size = gd->bd->bi_dram[i].size; + + if (!size) + continue; + + lmb_add(start, size); + + /* Limit memory used by U-Boot to the DDR low region */ + if (start >= ddr_low_top) + lmb_alloc_mem(LMB_MEM_ALLOC_ADDR, 0, &start, size, + LMB_NOOVERWRITE); + else if (start + size > ddr_low_top) + lmb_alloc_mem(LMB_MEM_ALLOC_ADDR, 0, &ddr_low_top, + start + size - ddr_low_top, + LMB_NOOVERWRITE); + } +} + int board_init(void) { return 0; --- base-commit: 7e47c37adf53f3010a6bf151df32df04a3c9ab91 change-id: 20260613-j6lte-lmb-a9f7a49c8ba1 Best regards, -- Kaustabh Chakraborty <[email protected]>

