# Memory map All DOC from YAPSPD chapter 7 (2006) unless marked; addresses as programs use them. ## Segments (the Allegrex's, allegrex-python start-here.md) | Virtual | Segment | Cached | Modes | | --- | --- | --- | --- | | 0x00000000-0x3FFFFFFF | KU0 | yes | user, supervisor, kernel | | 0x40000000-0x7FFFFFFF | KU1 | **no** (same physical memory as KU0) | user, supervisor, kernel | | 0x80000000-0x9FFFFFFF | K0 | yes | kernel | | 0xA0000000-0xBFFFFFFF | K1 | no | kernel | | 0xC0000000-0xDFFFFFFF | K2 / KS | yes | supervisor, kernel ("seem to be unused") | | 0xE0000000-0xFFFFFFFF | K3 | yes | kernel ("seem to be unused") | Physical = virtual & 0x1FFFFFFF (YAPSPD's table maps every segment to physical 0x0.......). Whether KU0 really spans 1 GB or the high mirrors fault is U1. ## Physical | Range | Size | What | | --- | --- | --- | | 0x00010000-0x00013FFF | 16 KB | scratchpad | | 0x04000000-0x041FFFFF | 2 MB | GE eDRAM ("VRAM"); mirrors at +2, +4, +6 MB give the depth buffer swizzled, linear, and linearised (YAPSPD 10.2; writes to the mirrors "seem to have no effect", reads work for every reader) | | 0x08000000-0x09FFFFFF | 32 MB | DDR main memory (64 MB to 0x0BFFFFFF on PSP-2000 and later: Copetti; the address of the second 32 MB is U2) | | 0x1C000000-0x1FBFFFFF | | I/O | | 0x1FC00000-0x1FCFFFFF | 1 MB | "Hardware Exception Vectors (RAM)"; the Pre-IPL ROM is mapped at the reset vector until the IPL hides it (Copetti, "Kernel/IPL") | | 0x1FD00000-0x1FFFFFFF | | I/O (NAND DMA buffers at 0x1FF00000) | ## How the kernel uses it (YAPSPD 7.3; HLE's layout must match it) - 0x88000000-0x887FFFFF: kernel (8 MB); 0x08800000-0x09FFFFFF: user (24 MB); games load at 0x08804000 (ghidra-allegrex README's recommended image base: "the usual address where games are loaded"; YAPSPD: "user main program start address" 0x08900000 for old firmware). The HLE memory partition layout is the firmware's, and pspautotests `sysmem/*` (10 outputs) judges what games can observe of it. ## I/O blocks, with what we know (YAPSPD 7.4 names the kernel modules that touch each) The HLE board needs only the GE, display, audio output, interrupts and timers among these; the rest matter only for an LLE row (hle-vs-lle.md, P5). | Base (K1) | Block | YAPSPD detail | Needed by HLE board | | --- | --- | --- | --- | | 0xBC000000 | memory protection (per 256 KB of DDR, kernel/user read/write bits) | 8.1, bit tables | no (the HLE kernel sets it once) | | 0xBC100000 | system control ("sysreg": clocks, resets, bus enables) | 8.2 | no | | 0xBC200000, 0xBC300000 | interrupt controller(s) | names only | its effect only | | 0xBC400000 | hardware profiler | 8.4 | no | | 0xBC500000, 0xBC600000 | timers (systimer) | names only | effect only (HLE timers) | | 0xBC800000, 0xBC900000, 0xBCA00000 | DMA controllers (dmacplus, dmacman) | names only | yes for `sceDmac` (pspautotests `dmac`: 1 output) | | 0xBCC00000 | ME control | 8.5 | no (ME not run under HLE) | | 0xBD000000 | memory/SRAM/watchdog controller | names only | no | | 0xBD100000 | NAND controller | 8.6 with command set | no | | 0xBD200000 | Memory Stick | names only | no | | 0xBD300000 | WLAN | names only | no (late) | | 0xBD400000-0xBD5000x0 | **GE** registers | addresses only; GE commands in 11 | **yes** (ge.md) | | 0xBD600000, 0xBD700000 | ATAPI / ATA to the UMD drive | names only | no (HLE serves the ISO) | | 0xBD800000 | USB | names only | no | | 0xBDE00000 | KIRK | 8.7 (and 8.7.1 keys: **never copied**) | no | | 0xBDF00000 | UMD (umdman) | names only | no | | 0xBE000000 | audio | names only | its output stream | | 0xBE140000 | LCD controller | names only | scan-out timing | | 0xBE200000 | I2C (clock generator, WM8750 codec) | names only | no | | 0xBE240000 | GPIO | 8.8 | no | | 0xBE300000 | PWM / power | names only | no | | 0xBE4C0000-0xBE580000 | UARTs: debug (UART4), headphone remote, IrDA, syscon link | 8.9, 8.10 | no | | 0xBE740000 | display controller | names only | scan-out format | "names only" means YAPSPD gives the base and the module that uses it, no registers.