Skip to content

Instantly share code, notes, and snippets.

@leiradel
Last active March 30, 2019 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment