Skip to content

Memory Map ​

Physical memory layout for JSOS on Raspberry Pi 3 / QEMU raspi3b.

Physical address space ​

RegionBase AddressNotes
Boot ROM0x00000000Read-only; contains GPU firmware boot code
Kernel image0x00080000kernel8.img loaded here by firmware/QEMU
Kernel stack0x00080000 ↓Grows downward from the kernel entry point
Kernel heap0x00400000Phase 5+; managed via mmap syscall
User space0x00800000+Phase 4+; per-process address spaces
Peripherals0x3F000000BCM2837 peripheral bus base
ARM local0x40000000Core-local timers and mailboxes

The first 512 KB (0x00000000–0x0007FFFF) is available to the kernel. The stack starts at 0x80000 and grows downward; the kernel image grows upward from the same address. For Phase 1 the image is under 1 KB, so there is no collision.

Peripheral registers ​

All peripherals are memory-mapped in the 0x3F000000 bus region.

PeripheralBase Address
System Timer0x3F003000
Interrupt Controller0x3F00B000
GPIO0x3F200000
UART0 (PL011)0x3F201000

UART0 (PL011) register map ​

Base: 0x3F201000

RegisterOffsetAddressDescription
DR0x000x3F201000Data Register — read/write characters
FR0x180x3F201018Flag Register
IBRD0x240x3F201024Integer Baud Rate Divisor
FBRD0x280x3F201028Fractional Baud Rate Divisor
LCRH0x2C0x3F20102CLine Control Register
CR0x300x3F201030Control Register

FR (Flag Register) bits ​

BitNameMeaning
5TXFFTX FIFO Full — do not write DR while set
4RXFERX FIFO Empty — no data available to read
3BUSYUART transmitting

uart_print polls TXFF before writing each character to DR.

CR (Control Register) bits ​

ValueEffect
0x000Disable UART (written first during uart_init)
0x301UARTEN (bit 0) + TXE (bit 8) + RXE (bit 9) — enable UART with TX and RX

LCRH (Line Control Register) bits ​

ValueEffect
0x000Reset / flush FIFOs
0x070WLEN=11 (8-bit) + FEN (FIFO enable)

Yog — union of JS syntax and silicon.