Skip to content

Instantly share code, notes, and snippets.

@leiradel
Last active November 4, 2024 16:31
Show Gist options
  • Save leiradel/67059c4aceea8fa564a5bc33b505f887 to your computer and use it in GitHub Desktop.
Save leiradel/67059c4aceea8fa564a5bc33b505f887 to your computer and use it in GitHub Desktop.
Memory Layout for Raspberry Pi
  • User/Kernel split
    • 3 GB user, 1 GB kernel
  • User split
    • 1 MB unmapped for illegal access exceptions
    • .text, .rodata, .data, heap and stack
    • Heap is right after .data
    • Stack is at the end of the available user RAM
    • Heap and stack grow towards each other
  • Kernel split
    • 512 MB VideoCore RAM (reserved address space, actual RAM may be less)
    • 64 MB memory-mapped devices
    • 447 MB Kernel code (reserved address space, actual RAM may be less)
    • 1 MB TLB, mailbox RAM, kernel RAM, interrupt vectors, kernel stacks
Begin Size Flags Description
0x00000000 1 MB --- ---
0x00100000 .text R-X User .text
0x00100000 + .text .rodata R-- User .rodata
0x00100000 + .text + .rodata .data RW- User .data
0x00100000 + .text + .rodata + .data All available RW- User heap and stack
0x00100000 + .text + .rodata +.data + heap + stack --- ---
0xc0000000 512 MB RW- VideoCore IV (max)
0xe0000000 32 MB RW- BCM Peripherals, device, non-cacheable
0xe2000000 32 MB RW- Local peripherals, device, non-cacheable
0xe4000000 447 MB R-X Kernel code (max)
0xfff00000 64 KB RW- TLB
0xfff10000 64 KB RW- Mailbox RAM, non-cacheable
0xfff20000 832 KB RW- Kernel RAM
0xffff0000 64 B RW- Interrupt vectors
0xffff0040 65472 B RW- Abort, undefined, IRQ, and FIQ stacks
@Kreijstal
Copy link

for which raspberry pi is this, not all of them have the same memory layout

@leiradel
Copy link
Author

leiradel commented Nov 4, 2024

It's for a 3B+, but I've unfortunately I had to abandon the project because of lack of time. Thanks for the interest though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment