diff options
| author | Anders Roxell <[email protected]> | 2025-11-25 11:23:58 +0100 |
|---|---|---|
| committer | Peter Robinson <[email protected]> | 2025-11-28 13:50:51 +0000 |
| commit | 5b702cf4d09f84f6cfe2989038b67feafe9945ed (patch) | |
| tree | eda33e06027f10df8c61fdaadc7ab4c36e3ff03f /drivers | |
| parent | 15c719174cf30c4ef1c5a3638156db8c318fbd18 (diff) | |
rpi: Fix DRAM size reporting to show total RAM
The VideoCore mailbox GET_ARM_MEMORY only reports the size of the
first accessible memory region (~947 MiB on RPi4 with 8GB), not the
total RAM. This causes U-Boot to display "DRAM: 947 MiB (total 7.9 GiB)"
instead of "DRAM: 7.9 GiB".
On Raspberry Pi 4 with 8GB RAM, the memory is split across multiple
non-contiguous banks. The dram_init() function only sets gd->ram_size
to the first bank size reported by the VideoCore firmware, while
fdtdec_setup_memory_banksize() correctly populates all memory banks
from the device tree.
Fix this by updating gd->ram_size after dram_init_banksize() has
populated all memory banks, so it reflects the actual total RAM
across all banks.
Signed-off-by: Anders Roxell <[email protected]>
Reviewed-by: Peter Robinson <[email protected]>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions
