Skip to content
Libre Computer

Memory map: Rockchip (RK3328, RK3399)

The whole map

Rockchip (RK3328, RK3399), 1 GiB of DRAM starting at 0x00000000. Every address is an offset from the SoC's DRAM base. A slot's absolute address is base + offset.

  1. Firmware and headroom 0x00000000–0x03FFFFFF · 64 MiB — Secure firmware lives in the first 64 MiB. No load slot starts below 0x04000000.
  2. scriptaddr 0x04000000–0x040FFFFF · 1 MiB — boot.scr, kept mapped while it loads the fdt and the kernel
  3. pxefile_addr_r 0x04100000–0x041FFFFF · 1 MiB — the PXE / extlinux configuration file
  4. fdtoverlay_addr_r 0x04200000–0x042FFFFF · 1 MiB — one device-tree overlay, until it is applied
  5. fdt_addr_r 0x04300000–0x044FFFFF · 2 MiB — the device tree, grown by resize and overlays
  6. spare 0x04500000–0x045FFFFF · 1 MiB — spare, so the kernel slot starts on a 2 MiB boundary
  7. kernel_addr_r 0x04600000–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 place
  8. ramdisk_addr_r 0x0D600000–0x38DFFFFF · 696 MiB — the initramfs, booted where it is loaded. Runs up to what U-Boot holds at the top of DRAM, so it grows with DRAM
  9. U-Boot (relocated) 0x38E00000–0x3FFFFFFF · 114 MiB — RK3399, the larger of the two: two 32 MiB framebuffers sized for 4K, a 32 MiB heap, U-Boot itself, and 16 MiB kept below its stack. RK3328 has one framebuffer, about 82 MiB in all.
  10. kernel_comp_addr_r 0x08600000–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.

What fits

PayloadLargest that fits (MiB)
Raw kernel (header image_size)144
Compressed kernel file64
Compressed kernel, decompressed80
Initramfs, on a 1024 MiB board696 (696 on this board)
Device tree with overlays2
Boot script1
Held by U-Boot at the top of DRAM114 (from the build configuration)

Addresses

VariableAddressSize (MiB)Holds
scriptaddr0x040000001boot.scr, kept mapped while it loads the fdt and the kernel
pxefile_addr_r0x041000001the PXE / extlinux configuration file
fdtoverlay_addr_r0x042000001one device-tree overlay, until it is applied
fdt_addr_r0x043000002the device tree, grown by resize and overlays
kernel_addr_r = loadaddr0x04600000144the 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_r0x0D600000696+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_r0x0860000080decompress 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_size0x04000000—the most compressed input booti reads

Which boot path uses which address

Boot pathAddresses it uses
PXE / extlinuxpxefile_addr_r, kernel_addr_r, ramdisk_addr_r, fdt_addr_r, fdtoverlay_addr_r
boot.scrscriptaddr
EFI boot and HTTP bootkernel_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 Imagekernel_addr_r, kernel_comp_addr_r
Hand-off to LinuxU-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.

U-Boot's load addresses on Libre Computer boards · Learn how it works: software in DRAM and the memory map