Memory map
The stock firmware needs a set of fixed DRAM reservations. These are for the firmware that operates on the modem, ADSP, WLAN, and video processors. One more reservation is for the framebuffer that the boot loader uses for the splash screen. A custom device tree must have the same reservations. If it does not, the applicable processor reads or writes incorrect memory.
Fixed reservations
| Region | Address | Size | Purpose |
|---|---|---|---|
| WLAN guard | 0x85600000 |
1 MiB | Guard region around the WLAN MSA |
| WLAN MSA | 0x85700000 |
1 MiB | WLAN memory-sharing area |
rmtfs |
0x85e00000 |
2 MiB | Shared memory for the rmtfs QMI service |
| Modem | 0x8ac00000 |
126 MiB | Modem Hexagon firmware/memory |
| ADSP | 0x92a00000 |
30 MiB | ADSP (audio/sensor) Hexagon memory |
| MBA | 0x94800000 |
2 MiB | Modem boot authenticator |
| Splash framebuffer | 0x9d400000 |
0x023ff000 (~36 MiB) |
1080p framebuffer that the boot loader sets up, no-map |
| Venus | Dynamic | 8 MiB | Video decoder pool |
All fixed reservations are between 0x85600000 and 0x9f800000.
DRAM banks
| Bank | Base | Size |
|---|---|---|
| 0 | 0x80000000 |
2 GiB |
| 1 | 0x100000000 |
~2 GiB (0x7e4c0000) |
High memory (bank 1) is usually where a boot loader puts the kernel, ramdisk, and device-tree buffers. For example, U-Boot on this class of device usually loads the kernel near 0x174a00000. It loads the ramdisk near 0x16ca00000 and the FDT near 0x161000000.
GPU zap-shader region
The stock a508_zap loader node does not have a fixed memory region. The stock firmware gives it memory dynamically. A usual workaround is to reserve ~56 KiB for the zap shader. On the reference unit, 0xfe49c000 (56 KiB) is ordinary RAM. It is not in a fixed stock reservation. It is larger than the single 5,204-byte loadable segment of the zap image. TrustZone accepts the image in that region.
Layout
flowchart TB
subgraph DRAM["Physical DRAM"]
direction TB
B0["Bank 0 @0x80000000 — 2 GiB"]
B1["Bank 1 @0x100000000 — ~2 GiB"]
end
subgraph FIXED["Fixed reservations (stock)"]
WLAN["0x85600000 WLAN guard 1 MiB"]
MSA["0x85700000 WLAN MSA 1 MiB"]
RMTFS["0x85e00000 rmtfs 2 MiB"]
MODEM["0x8ac00000 Modem 126 MiB"]
ADSP["0x92a00000 ADSP 30 MiB"]
MBA["0x94800000 MBA 2 MiB"]
SPLASH["0x9d400000 Splash framebuffer ~36 MiB"]
end
B0 --- FIXED
B1 -.->|boot loader buffers| BOOTBUF["kernel / ramdisk / FDT"]
B0 -.->|zap shader| ZAP["0xfe49c000 — 56 KiB (Sony-derived)"]
Why this matters for porting
- The
rmtfs, modem, ADSP, and MBA regions must be the same as the stock values. The Hypervisor and TrustZone firmware and the DSPs get these values from another source. If the values are incorrect, the firmware corrupts other memory. - The boot loader gives the splash framebuffer to Linux.
simpledrmcan operate it for console output before the native display controller operates. - The zap-shader reservation is necessary only when you start the Adreno GPU. Without it, the GPU cannot go out of TrustZone secure mode.