smol-gilbraltar/doc/memory.md

61 lines
3.3 KiB
Markdown
Raw Permalink Normal View History

2024-12-20 22:45:12 +00:00
# How to make a simple unikernel on RBPi
File required on Raspberry Pi 5:
- bcm2712-rpi-5-b.dtb (https://github.com/raspberrypi/firmware/blob/master/boot/bcm2712-rpi-5-b.dtb)
- overlays/bcm2712d0.dtbo (https://github.com/raspberrypi/firmware/blob/master/boot/overlays/bcm2712d0.dtbo)
2024-12-20 22:45:12 +00:00
- config.txt
CPU used by Raspberry Pi 5: Cortex-A76
BCM2712 is the Broadcom chip used by Raspberry Pi 5
# Memory layout
2025-01-12 11:30:33 +00:00
Gilbraltar has a fairly precise memory layout. Here are the different zones
(heap, stacks, etc.).
2024-12-20 22:45:12 +00:00
| Base | Size | Contents | Remarks |
|------------|----------------------|----------------------------|---------|
| 00000000 | 32 KByte | ARM Trusted Firmware | BL31 |
| 0006F000 | 4 KByte | EL3 Stack |
| 00070000 | 2 KByte | Exception vector table EL3 |
| ...
| 00080000 | max. 6 MByte | Kernel image |
| | .init | startup code |
| | .text | |
| | .rodata | |
| | .data | |
| | .bss | |
| ...
| | Kernel stacks | |
| 00280000 | 128 KByte | for Core 0 |
| 002A0000 | 128 KByte | for Core 1 |
| 002C0000 | 128 KByte | for Core 2 |
| 002E0000 | 128 KByte | for Core 3 |
| 00300000 | | End of stacks |
| | Exception stacks | |
| 00300000 | 32 KByte | for Core 0 |
| 00308000 | 32 KByte | for Core 1 |
| 00310000 | 32 KByte | for Core 2 |
| 00318000 | 32 KByte | for Core 3 |
| 00320000 | | End of exception stacks |
| | IRQ stack | |
| 00320000 | 32 KByte | for Core 0 |
| 00328000 | 32 KByte | for Core 1 |
| 00330000 | 32 KByte | for Core 2 |
| 00338000 | 32 KByte | for Core 3 |
| 00340000 | | End of IRQ stacks |
| | FIQ stack | |
| 00340000 | 32 KByte | for Core 0 |
| 00348000 | 32 KByte | for Core 1 |
| 00350000 | 32 KByte | for Core 2 |
| 00358000 | 32 KByte | for Core 3 |
| 00360000 | | End of FIQ stacks |
| 00500000 | 4 MByte | Coherent region |
| 00900000 | | |
2024-12-23 22:44:47 +00:00
| 1b000000 | 16 MByte | Pager |
| 1c000000 | | |
2024-12-20 22:45:12 +00:00
| 40000000 | | Heap |
| ...
2024-12-23 22:44:47 +00:00
| 100000000 | 8192 MB | Heap |
2024-12-20 22:45:12 +00:00
| 1000000000 | 16 MByte | AXI peripherals |