Skip to content
Libre Computer

Memory map: MediaTek (MT8183, MT8365, MT8188)

The whole map

MediaTek (MT8183, MT8365, MT8188), 512 MiB of DRAM starting at 0x40000000. Every address is an offset from the SoC's DRAM base. A slot's absolute address is base + offset.

  1. Firmware and headroom 0x40000000–0x43FFFFFF · 64 MiB — Secure firmware lives in the first 64 MiB. No load slot starts below 0x04000000.
  2. scriptaddr 0x44000000–0x440FFFFF · 1 MiB — boot.scr, kept mapped while it loads the fdt and the kernel
  3. pxefile_addr_r 0x44100000–0x441FFFFF · 1 MiB — the PXE / extlinux configuration file
  4. fdtoverlay_addr_r 0x44200000–0x442FFFFF · 1 MiB — one device-tree overlay, until it is applied
  5. fdt_addr_r 0x44300000–0x444FFFFF · 2 MiB — the device tree, grown by resize and overlays
  6. spare 0x44500000–0x445FFFFF · 1 MiB — spare, so the kernel slot starts on a 2 MiB boundary
  7. kernel_addr_r 0x44600000–0x4D5FFFFF · 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 0x4D600000–0x58DFFFFF · 184 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) 0x58E00000–0x5FFFFFFF · 114 MiB — MT8365, the largest of the three: a 32 MiB framebuffer sized for 4K, a 64 MiB heap, U-Boot itself, and 16 MiB kept below its stack. MT8183 and MT8188 have no framebuffer and hold about 22 MiB.
  10. kernel_comp_addr_r 0x48600000–0x4D5FFFFF · 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 512 MiB board184 (184 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
scriptaddr0x440000001boot.scr, kept mapped while it loads the fdt and the kernel
pxefile_addr_r0x441000001the PXE / extlinux configuration file
fdtoverlay_addr_r0x442000001one device-tree overlay, until it is applied
fdt_addr_r0x443000002the device tree, grown by resize and overlays
kernel_addr_r = loadaddr0x44600000144the 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_r0x4D600000184+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_r0x4860000080decompress 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