Device memory map

Default xemu machine layout, QEMU-virt-compatible in shape with documented deltas.

DeviceBaseSizeIRQ
Test finisher (test-only)0x0010_00000x10
ACLINT0x0200_00000x1_0000
PLIC0x0C00_00000x400_0000
UART0 (NS16550)0x1000_00000x10010
VirtIO MMIO (Debian target)0x1000_10000x10001
RAM0x8000_0000128 MiB (tests) / 1 GiB (Linux)

Intentional deltas from QEMU virt

  • ACLINT replaces CLINT. Wire-compatible MMIO layout; offers clean MSWI / MTIMER / SSWI split.
  • Test finisher is test-only. Not wired into the default machine used by Linux / Debian.
  • timebase-frequency = 10_000_000 (10 MHz), matching the host wall-clock sampling rate.

PLIC source assignments

SourceOwner
0"no interrupt" (reserved)
1VirtIO-blk
10UART0

Higher source numbers are reserved for future devices.

IrqState bitmap

Arc<AtomicU64> where:

Bitmip nameWriter
1SSIPACLINT SSWI
3MSIPACLINT MSWI
7MTIPACLINT MTIMER
9SEIPPLIC context 1
11MEIPPLIC context 0

sync_interrupts() on CPU step merges this into mip.

Boot layout (where the ELF lands)

  • Bare-metal tests — entry at 0x8000_0000.
  • xv6 — entry at 0x8000_0000 (M-mode).
  • Linux / Debian — OpenSBI lands at 0x8000_0000 (M-mode), then jumps to the kernel at 0x8020_0000 (S-mode).
  • FDTBootLayout::fdt_addr persists the DTB address so the kernel can find it at a1 on entry.