danos/library/runtime
Daniel Samson 69b018cc32
display: the compositor service — claim, double-buffer, present (D2)
Stand up /system/services/display: a ring-3 process that claims the framebuffer
D1 seeded, maps it write-combining as the front buffer, allocates a cacheable
back buffer, and presents composed frames. The GUI track's compositor, reached
by name over ServiceId.display (= 9).

- protocol.zig: the display wire protocol (info/create_layer/configure_layer/
  destroy_layer/fill_rect/blit_tile/damage/present). `info` and a whole-screen
  `present` are live; the layer ops fail-stub until D3.
- display.zig: enumerate -> claim -> mmio_map(WC) the LFB, mmap a cacheable back
  buffer, clear it and present it (proving the double-buffer path), then serve.
- runtime.display + barrel exports (display, display_protocol): a cached
  `.display` client with info()/present(), the runtime.block shape.
- init spawns "display" in boot_services; build.zig wires the protocol onto the
  runtime, builds the exe, packs it into the initial-ramdisk, installs it.

mmap fix the back buffer forced: systemMmap was capped at 256 pages (1 MiB) by a
fixed kernel-stack scratch array. Rewrote it to map page-by-page with rollback
(no array) and raised the cap to 8192 pages (32 MiB) — enough for a 4K back
buffer. A real limitation met.

Gate: `python3 test/qemu_test.py display-service` matches the service's own
serial heartbeats (display: online WxH / presented frame 0), printed only after
the full claim -> WC-map -> back-buffer -> present chain. Regression-checked
usermem, heap, init, and D1's display.
2026-07-14 01:26:25 +01:00
..
block.zig fat/usb-storage: flush the device cache on close so writes survive power-off 2026-07-13 23:29:15 +01:00
device.zig WIP: USB 2026-07-12 22:24:47 +01:00
display.zig display: the compositor service — claim, double-buffer, present (D2) 2026-07-14 01:26:25 +01:00
dma.zig M14b: DMA memory (dma_alloc / dma_free) 2026-07-10 19:43:59 +01:00
fs.zig Phase 2d (ii): filesystem modification time (mtime) 2026-07-13 20:43:40 +01:00
heap.zig Split the `system` contract into boot-handoff / abi / device-abi 2026-07-10 18:08:51 +01:00
input.zig fixing comments 2026-07-12 16:19:09 +01:00
ipc.zig Signals over IPC, one-shot timers, and the service harness (M17.4) 2026-07-12 23:53:38 +01:00
process.zig Signals over IPC, one-shot timers, and the service harness (M17.4) 2026-07-12 23:53:38 +01:00
runtime.zig display: the compositor service — claim, double-buffer, present (D2) 2026-07-14 01:26:25 +01:00
service.zig The application surface: enumerate, subscribe, and device-list (M18.3) 2026-07-13 00:49:03 +01:00
start.zig Pass arguments to main via runtime.process.Init, dispatched on signature 2026-07-11 14:22:48 +01:00
system-call.zig zig fmt 2026-07-12 16:04:58 +01:00
system.zig Phase 2d (i): a kernel wall-clock from the CMOS RTC 2026-07-13 20:35:03 +01:00
time.zig Add runtime.time, drop demo drivers, harden TSC timekeeping 2026-07-13 11:56:43 +01:00
usb.zig USB driver stack: xHCI transfers, HID keyboard/mouse, mass storage 2026-07-13 14:11:00 +01:00
user.ld Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00