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.
Firmware and headroom0x40000000–0x43FFFFFF · 64 MiB — Secure firmware lives in the first 64 MiB. No load slot starts below 0x04000000.scriptaddr0x44000000–0x440FFFFF · 1 MiB — boot.scr, kept mapped while it loads the fdt and the kernelpxefile_addr_r0x44100000–0x441FFFFF · 1 MiB — the PXE / extlinux configuration filefdtoverlay_addr_r0x44200000–0x442FFFFF · 1 MiB — one device-tree overlay, until it is appliedfdt_addr_r0x44300000–0x444FFFFF · 2 MiB — the device tree, grown by resize and overlaysspare0x44500000–0x445FFFFF · 1 MiB — spare, so the kernel slot starts on a 2 MiB boundarykernel_addr_r0x44600000–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 placeramdisk_addr_r0x4D600000–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 DRAMU-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.kernel_comp_addr_r0x48600000–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
| 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 | 184 (184 on this board) |
| Device tree with overlays | 2 |
| Boot script | 1 |
| Held by U-Boot at the top of DRAM | 114 (from the build configuration) |
Addresses
| Variable | Address | Size (MiB) | Holds |
|---|---|---|---|
scriptaddr | 0x44000000 | 1 | boot.scr, kept mapped while it loads the fdt and the kernel |
pxefile_addr_r | 0x44100000 | 1 | the PXE / extlinux configuration file |
fdtoverlay_addr_r | 0x44200000 | 1 | one device-tree overlay, until it is applied |
fdt_addr_r | 0x44300000 | 2 | the device tree, grown by resize and overlays |
kernel_addr_r = loadaddr | 0x44600000 | 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 | 0x4D600000 | 184+ | 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 | 0x48600000 | 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.