arm64: dts: amlogic: t7: khadas-vim4: fix memory layout for 8GB RAM
Subsystems (2)
PATCH 1/1 arm64: dts: amlogic: t7: khadas-vim4: fix memory layout for 8GB RAM
The Khadas VIM4 features 8GB of LPDDR4X RAM. The previous memory node mapped a single incorrect region. This caused the kernel to map MMIO and secure firmware (ATF/TrustZone) memory holes as standard RAM, leading to an Asynchronous SError Interrupt during early boot (paging_init) when the kernel attempted to clear those pages.
Fix this by splitting the 8GB memory layout into three separate regions to properly avoid the memory holes (e.g., 0xe0000000 - 0xffffffff):
- 3.5GB @ 0x000000000
- 3.5GB @ 0x100000000
- 1.0GB @ 0x200000000
--- arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts +3 -1
@@ -17,7 +17,9 @@ aliases { memory@0 { device_type = "memory"; - reg = <0x0 0x0 0x2 0x0>; /* 8 GB */ + reg = <0x00000000 0x00000000 0x00000000 0xE0000000 + 0x00000001 0x00000000 0x00000000 0xE0000000 + 0x00000002 0x00000000 0x00000000 0x40000000>; }; reserved-memory {
Signature · 1 line
2.34.1
Quoted 23 lines · Nick Xie
The Khadas VIM4 features 8GB of LPDDR4X RAM. The previous memory node mapped a single incorrect region. This caused the kernel to map MMIO and secure firmware (ATF/TrustZone) memory holes as standard RAM, leading to an Asynchronous SError Interrupt during early boot (
paging_init) when the kernel attempted to clear those pages.Fix this by splitting the 8GB memory layout into three separate regions to properly avoid the memory holes (e.g.,
0xe0000000-0xffffffff):
- 3.5GB @0x000000000
- 3.5GB @0x100000000
- 1.0GB @0x200000000Signed-off-by Nick Xie <[email protected]>--- arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts +0
-0
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts aliases { · line 24
Quoted 9 lines
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts +3
-1@@ -17,7 +17,9 @@ aliases { memory@0 { device_type = "memory"; - reg = <0x0 0x0 0x2 0x0>; /* 8 GB */ + reg = <0x00000000 0x00000000 0x00000000 0xE0000000 + 0x00000001 0x00000000 0x00000000 0xE0000000 + 0x00000002 0x00000000 0x00000000 0x40000000>; };
I suggest to remove the leading zeroes here.
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts aliases { · line 25
Quoted 1 line
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts +0
-0reserved-memory {
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic