ReviewOS

home-lang/home-os

PL011 driver for the BCM2712 debug UART and serial console; consolidate the two serial implementations

#58
Open chris opened this 9 days ago ·
9 days ago

Epic: #113 · Milestone: MC2 — Pi 5 bring-up

Why

The Pi 5's 3-pin debug connector is a PL011 in the BCM2712 (Linux exposes it as ttyAMA10; the DTB node is serial@7d001000 under the 0x10_0000_0000 AXI window — verify the full 40-bit address from the DTB, do not hardcode from memory). arch/arm64/rpi/uart.home (937 lines) targets the Pi 3/4 mini-UART/PL011 at 0xFE201000; kernel/src/serial.home and kernel/src/drivers/serial.home are two x86 16550 implementations MASTER_PLAN already says must be consolidated.

Tasks

  • kernel/src/drivers/serial/pl011.home: init (baud from the 48 MHz UART clock — read the actual clock from DTB/firmware; the bootloader already configured 115200 so an "inherit" mode is the safe first step), FIFO enable, putc/getc polling, RX interrupt (GIC SPI number from DTB), line discipline hooks for the existing shell.
  • One serial interface (kernel/src/drivers/serial/serial.home) with x86 16550 and PL011 backends selected by arch/platform; delete the duplicate.
  • Boot-log ring buffer replay to the UART and later to the framebuffer console (already exists for x86 — make it arch-neutral).
  • uart_2ndstage bootloader output and our banner share the port; document the expected transcript in docs/testing/PI5_E2E.md.

Acceptance

boot-milestones-aarch64.txt gains [UART] PL011 ready and [Shell] ready; typing on the Debug Probe echoes back on real hardware.

Size: S · Depends on: #57, #60 · Blocks: #63

Sign in to comment on this issue.