[PATCH] rpi: bcm2712: Extend DRAM mapping to 16 GiB

Simon Glass sjg at chromium.org
Sat May 9 01:32:42 CEST 2026


The bcm2712 memory map only covers the first 1 GiB of DRAM, but Pi 5
models ship with up to 16 GiB. Accesses above 1 GiB fault because the
range is not present in the MMU page tables.

Allocations above 1 GiB used to be blocked at the lmb layer because
memory above ram_top was reserved as no-overwrite. Commit 0efb6bc3e36d
("lmb: Reinstate access to memory above ram_top") removed that
reservation, so callers like tftp now route allocations into the
unmapped range and trigger a fault.

Extend the first DRAM entry to 16 GiB to cover the largest addressable
range for any production Pi 5 model. Smaller models are unaffected
because aarch64 only faults on actual access of unbacked memory, and
no peripheral region lies between 1 GiB and 64 GiB on this SoC
(peripherals start at 0x1000000000).

Fixes: 0efb6bc3e36d ("lmb: Reinstate access to memory above ram_top")
Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/arm/mach-bcm283x/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 7a1de22e0ae..3d11c9e5c3b 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -69,10 +69,10 @@ static struct mm_region bcm2711_mem_map[MEM_MAP_MAX_ENTRIES] = {
 
 static struct mm_region bcm2712_mem_map[MEM_MAP_MAX_ENTRIES] = {
 	{
-		/* First 1GB of DRAM */
+		/* DRAM, up to the 16 GiB maximum supported by Pi 5 models */
 		.virt = 0x00000000UL,
 		.phys = 0x00000000UL,
-		.size = 0x40000000UL,
+		.size = 0x400000000UL,
 		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
 			 PTE_BLOCK_INNER_SHARE
 	}, {
---
base-commit: 3cdd19089f1b1b7cd08530f33ff4708abcfd426c
branch: rpi-us

-- 
2.43.0



More information about the U-Boot mailing list