Memory map: Amlogic (S805X, S905X, S905D3, A311D)
The whole map
Amlogic (S805X, S905X, S905D3, A311D), 512 MiB of DRAM starting at 0x00000000. Every address is an offset from the SoC's DRAM base. A slot's absolute address is base + offset.
Firmware and headroom0x00000000–0x03FFFFFF · 64 MiB — Secure firmware lives in the first 64 MiB. No load slot starts below 0x04000000.scriptaddr0x04000000–0x040FFFFF · 1 MiB — boot.scr, kept mapped while it loads the fdt and the kernelpxefile_addr_r0x04100000–0x041FFFFF · 1 MiB — the PXE / extlinux configuration filefdtoverlay_addr_r0x04200000–0x042FFFFF · 1 MiB — one device-tree overlay, until it is appliedfdt_addr_r0x04300000–0x044FFFFF · 2 MiB — the device tree, grown by resize and overlaysspare0x04500000–0x045FFFFF · 1 MiB — spare, so the kernel slot starts on a 2 MiB boundarykernel_addr_r0x04600000–0x0D5FFFFF · 144 MiB — the kernel booti runs: a raw Image, or a compressed one decompressed back into this slot. 2 MiB-aligned, so an arm64 Image runs in placeramdisk_addr_r0x0D600000–0x14EF4FFF · 120.96 MiB — the initramfs, booted where it is loaded. Runs up to what U-Boot holds at the top of DRAM, so it grows with DRAMU-Boot (relocated)0x14EF5000–0x1FFFFFFF · 177.04 MiB — Read on a running board: a 32 MiB framebuffer sized for 4K, a 128 MiB heap, about 1 MiB of U-Boot itself, and 16 MiB kept below its stack.kernel_comp_addr_r0x08600000–0x0D5FFFFF · 80 MiB — decompress buffer: a compressed kernel (at most kernel_comp_size, 64 MiB) sits at the bottom of the kernel slot, decompresses here and is copied back down
Room for each file
The size of each load slot. The boot files are small next to the kernel and the initramfs, so they get their own scale here rather than a sliver of the map above.
Amlogic open firmware: the reserved block
The first 16 MiB, drawn on its own scale. Each region's line below says how Linux sees it.
ROM mirror0x00000000–0x000FFFFF · 1 MiB, no-map — on S805X / S905X a read-only mirror of the boot ROM; on S905D3 / A311D held so every family shares one mapSecure monitor (BL31)0x00100000–0x001FFFFF · 1 MiB, no-map — trusted firmware and its stagingSecure monitor mailboxes0x00200000–0x002FFFFF · 1 MiB, no-map — shared buffers between Linux and the secure monitorramoops0x00300000–0x003FFFFF · 1 MiB, mapped — pstore: the previous boot's console and crash records survive a rebootOP-TEE (optional)0x00400000–0x00FFFFFF · 12 MiB, no-map only when OP-TEE runs — reserved for OP-TEE only when the firmware includes it; otherwise ordinary memory for Linux
What fits
| Payload | Largest that fits (MiB) |
|---|---|
| Raw kernel (header image_size) | 144 |
| Compressed kernel file | 64 |
| Compressed kernel, decompressed | 80 |
| Initramfs, on a 512 MiB board | 120.96 (120.96 on this board) |
| Device tree with overlays | 2 |
| Boot script | 1 |
| Held by U-Boot at the top of DRAM | 177.04 (measured) |
Addresses
| Variable | Address | Size (MiB) | Holds |
|---|---|---|---|
scriptaddr | 0x04000000 | 1 | boot.scr, kept mapped while it loads the fdt and the kernel |
pxefile_addr_r | 0x04100000 | 1 | the PXE / extlinux configuration file |
fdtoverlay_addr_r | 0x04200000 | 1 | one device-tree overlay, until it is applied |
fdt_addr_r | 0x04300000 | 2 | the device tree, grown by resize and overlays |
kernel_addr_r = loadaddr | 0x04600000 | 144 | the kernel booti runs: a raw Image, or a compressed one decompressed back into this slot. 2 MiB-aligned, so an arm64 Image runs in place |
ramdisk_addr_r | 0x0D600000 | 120.96+ | the initramfs, booted where it is loaded. Runs up to what U-Boot holds at the top of DRAM, so it grows with DRAM |
kernel_comp_addr_r | 0x08600000 | 80 | decompress buffer: a compressed kernel (at most kernel_comp_size, 64 MiB) sits at the bottom of the kernel slot, decompresses here and is copied back down |
kernel_comp_size | 0x04000000 | — | the most compressed input booti reads |
Which boot path uses which address
| Boot path | Addresses it uses |
|---|---|
| PXE / extlinux | pxefile_addr_r, kernel_addr_r, ramdisk_addr_r, fdt_addr_r, fdtoverlay_addr_r |
| boot.scr | scriptaddr |
| EFI boot and HTTP boot | kernel_addr_r, fdt_addr_r |
| USB DFU into RAM (alternates script, fdt, kernel, ramdisk) | scriptaddr, fdt_addr_r, kernel_addr_r, ramdisk_addr_r |
| booti of a compressed Image | kernel_addr_r, kernel_comp_addr_r |
| Hand-off to Linux | U-Boot copies the device tree to the top of free memory below itself and hands the initramfs over where it was loaded |
A saved U-Boot environment replaces these defaults. A board that has one keeps the addresses it saved until the environment is reset.