Epic: #113 · Milestone: MC2 — Pi 5 bring-up
Why
No arm64 .s exists in this repo; build.sh borrows packages/kernel/src/arm64/boot.s from the compiler repo, which is written for Pi 3/4. kernel/src/arch/arm64/boot.home calls foundation.arm64_read_currentel(), arm64_write_hcr_el2, arm64_eret, get_pc — none of which exist in core/foundation.home. rpi5_main.home does not typecheck (Zig-style for (x) |y|, undefined property). The Pi 5 boots core 0 at EL2 at 0x80000 with the DTB address in x0; the EEPROM bootloader loads the image named by kernel= (default kernel_2712.img).
This issue also carries the rig smoke test: before the compiler can produce ARM code, an assembly-only banner (assembly is allowed for boot code) proves the SD/TFTP/UART/power loop end to end. That is a means, not an endpoint; the Home entry replaces it as soon as rung 1 of #51 exists.
Tasks
kernel/src/arch/arm64/boot.s: MPIDR check, park secondaries inwfeloop with a spin-table mailbox for later SMP; savex0(DTB); if EL2: setHCR_EL2.RW=1,SCTLR_EL1sane,SPSR_EL2,ELR_EL2→eretto EL1; zero.bss; 16-byte-aligned stack below_start;bl kernel_main(Home,export fn kernel_main(dtb: u64): never); on returnwfeforever. Vector table symbol exported for #61.- Temporary
uart_bannerin the same file for the rig smoke test (PL011 at the BCM2712 debug UART base, see #58), removed once Home prints the banner. - Rewrite
kernel/src/arch/arm64/boot.homeagainst real foundation intrinsics from #53; deleterpi5_main.homeor make it the Home entry that callsarch_init → drivers → shell. rpi5/config.txt:kernel=kernel_2712.img,arm_64bit=1,enable_uart=1,uart_2ndstage=1(bootloader messages on the debug UART),disable_splash=1,boot_delay=0; removedtoverlay=miniuart-bt(Pi 4 concept). Keephdmi_*lines commented until #74. Delete the stale "start.elf" prose.kernel/linker-rpi5.ld: entry_start, base 0x80000,.text.bootfirst, page-aligned.bss,__stack_top.
Acceptance
Serial capture on the rig shows the bootloader log followed by HomeOS rpi5: EL1 kernel_main reached printed by Home code. (Interim: the assembly banner alone proves the rig, recorded as a non-gate.)
Size: M · Depends on: #48, #51 (rung 1), #54 · Blocks: #58, #63