plic_init() now takes boot_info->dtb (threaded through apic_init()) and tries fdt_find_node_by_compatible(dtb, "sifive,plic-1.0.0") -> fdt_find_prop_in_node(..., "reg", ...) before falling back to the QEMU-virt-specific constant it previously hardcoded unconditionally. Reuses the node-scoped DTB lookup primitive built for the aarch64 GIC base fix unchanged. s_plic_base is now a runtime uintptr_t, same shape as apic.c's s_gicd_base/s_gicc_base. This system's QEMU/UEFI riscv64 firmware does not forward a DTB to the guest (timer.c's own timebase-frequency read falls back too, confirmed in this boot's own log), so only the no-DTB fallback branch is exercised here -- the success branch (a real DTB with a matching PLIC node) stays unverified until real Milk-V Mars hardware. FABRIC-3.md's first-drafted claim that the success branch would run (based on a stale comment in plic.c's own pre-fix header) was checked against the actual log and corrected before this commit. 3-arch acceptance: amd64/aarch64 don't compile these files, so their runs are non-regression on untouched files only. riscv64's own boot log confirms the fallback path prints exactly as designed and boot reaches zuse)ok> unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YcT3H2PQeyujrzjqS3Var
src/starkernel/
LithosAnanke — the bare-metal UEFI kernel that boots StarForth directly on
hardware (amd64/aarch64/riscv64). Built only via Makefile.starkernel; the
only valid acceptance test is the three-arch QEMU boot (see
.claude/CLAUDE.md), never make test.
kernel_main.c— kernel entry point, driving the boot milestones (console init, PMM, VMM, interrupts, timers, kmalloc heap, VM bootstrap).repl.c— kernel REPL.doe_log.c— kernel-side DoE (Design of Experiments) metrics logging.
Subdirectories:
arch/{amd64,aarch64,riscv64}/— per-architecture support (APIC/GIC/ PLIC interrupt controller, timers, boot/ISR assembly).boot/— UEFI loader, ELF loading, kernel command-line parsing.capsule/— capsule birth/run/load/validate pipeline.hal/— hardware-abstraction-layer implementation (console, framebuffer, VT100, memory, host services).hash/— XXHash64 content-addressing implementation.math/— kernel-build Q48.16 fixed-point arithmetic.memory/— physical/virtual memory managers and the kernel heap.pci/— PCI bus enumeration.virtio/— VirtIO block device driver.vm/— kernel VM subsystem (bootstrap, core interpreter, parity logging, capsule arena).
See include/starkernel/README.md for the corresponding headers.