From: Hari Nagalla <[email protected]>

AM62-SIP SK boards have only 512 MB SDRAM. u-boot relocates the kernel
DTB to upper SDRAM region before starting Linux kernel. This region is
overlapping with the Firmware IPC carveouts. To avoid the overlap, set
'fdt_high' environment variable in u-boot to prevent relocation of DT
blob.

without this patch:
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 000000009ce49000, end 000000009ce5b8f9 ... OK
Working FDT set to 9ce49000
...
and subsequently during Linux boot carveout reserve memory fails:

Starting kernel ...
...
[    0.000000] printk: legacy bootconsole [ns16550a0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: Reserved memory: failed to reserve
memory for node 'memory@9cc00000': base 0x000000009cc00000, size 14 MiB
[    0.000000] Reserved memory: created CMA memory pool at
0x0000000094600000, size 128 MiB

with the patch:
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
 Using Device Tree in place at 0000000088000000, end 0000000088013375
Working FDT set to 88000000
...
and subsequent Linux boot
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: Reserved memory: reserved region for
node 'memory@9cc00000': base 0x000000009cc00000, size 14 MiB

Signed-off-by: Hari Nagalla <[email protected]>
Signed-off-by: Anshul Dalal <[email protected]>
---
During linux boot on AM62x SIP board, U-Boot relocates the fdt to
reserved-memory regions for IPC. This causes the kernel to fail when
trying to reserve said memory regions.

I'm not sure on what's the correct fix here but this RFC addresses the
problem by disabling relocation to begin with.
---
 board/ti/am62x/am6254atl.env | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/ti/am62x/am6254atl.env b/board/ti/am62x/am6254atl.env
index a9187c2b1aa9..d2e263b6fd5d 100644
--- a/board/ti/am62x/am6254atl.env
+++ b/board/ti/am62x/am6254atl.env
@@ -8,6 +8,7 @@
 #endif
 
 rproc_fw_binaries= 0 /lib/firmware/am62-mcu-m4f0_0-fw
+fdt_high=0xffffffffffffffff
 
 name_kern=Image
 console=ttyS2,115200n8

---
base-commit: 616c3d79f01cf9204e38738857c4647a730dcb3b
change-id: 20260729-am62_sip_fdt_fix-c3a5f466371e

Best regards,
--  
Anshul Dalal <[email protected]>

Reply via email to