SonicWave
Posts: 22
Joined: Mon Mar 19, 2018 1:10 pm

[Solved] Physical Memory Address Range - Pi B+

Wed Mar 28, 2018 8:46 pm

Hi,

I am wondering what the physical address range of the memory on the Pi B+ is?
The document only says that "Software accessing RAM directly must use physical addresses (based at 0x00000000)", but how far does it range?
Last edited by SonicWave on Thu Mar 29, 2018 12:26 pm, edited 1 time in total.

User avatar
Ultibo
Posts: 135
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia
Contact: Website

Re: Physical Memory Address Range - Pi B+

Thu Mar 29, 2018 10:04 am

SonicWave wrote:
Wed Mar 28, 2018 8:46 pm
The document only says that "Software accessing RAM directly must use physical addresses (based at 0x00000000)", but how far does it range?
Raspberry Pi A+/B+/Zero/ZeroW - 512MB from 0x00000000 to 0x1FFFFFFF
Raspberry Pi 2B/3B/3B+ - 1024MB from 0x00000000 to 0x3FFFFFFF

If you are accessing it in bare metal then the memory is one contiguous block from start to finish, if you are using Linux then none of that is true because it virtualizes the address space.

BUT there are two things you also need to allow for:

1. GPU memory is somewhere in the upper part of the range, you can ask the GPU for the exact start and size via the mailbox interface.
2. The peripherals (GPIO, DMA, I2C, SPI etc) are at the top of the address range, 0x20000000 on PI A+/B+/Zero/Zero and 0x3F000000 on the PI 2B/3B/3B+ so in one case they don't matter in the other case they do.

Hope that helps.
Ultibo.org | Make something amazing
https://ultibo.org

Threads, multi-core, OpenGL, Camera, FAT, NTFS, TCP/IP, USB and more in 3MB with 2 second boot!

Return to “Bare metal, Assembly language”

Who is online

Users browsing this forum: No registered users and 4 guests