Login
Check-in [b9f1011561]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge 6.5a (ii) part 1: the guest firmware stands up

Reviewed against docs/tasks/6.5a-ii-split.md part 1; verdict merge. guest/efi is a freestanding EL1 image built exactly as the test guest is, from Phase 1's EFI definitions: a system table with CRC32'd headers, ConOut over the PL011 with 4.5's filter, ConIn not ready, the devicetree in the configuration table, every other boot service EFI_UNSUPPORTED. The first attempt's fault at 0x200 came from compiler-generated SIMD with EL1 FP/SIMD disabled; the entry now sets CPACR_EL1.FPEN, and the image has no relocations. 278 changed non-spec lines with prose: over the ~200 aim, under the 400 stop. After the merge, in BQ2's seed, the aarch64 boot suite gives 38 examples, 0 failures, and the firmware prints 'guest firmware: system table ok, devicetree in configuration table' then powers off; outside it the x86_64 boot suite passes and format passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX

Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b9f1011561ee174af97e47b49508754a5dc1b05368dd45f4b3ffd73e6b2130cc
User & Date: x86-1-glint 2026-11-11 05:02:43.895
Context
2026-11-11
05:03
docs/boots: the guest firmware standing up, recorded

Claim: the boots page gains 6.5a (ii) part 1: a UEFI firmware runs as Glint's guest and prints through its own console. Passage: the maintainer's request for a recording at each milestone (ocx-console 40c80385db). Demonstration: the cast is the file bin/glint-run wrote on x86-1 at the merge b9f1011561's tree, built inside BQ2's seed; it exited 0 with the lines the entry quotes. Size: one cast, one page entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX check-in: 89950edf77 user: x86-1-glint tags: trunk

05:02
Merge 6.5a (ii) part 1: the guest firmware stands up

Reviewed against docs/tasks/6.5a-ii-split.md part 1; verdict merge. guest/efi is a freestanding EL1 image built exactly as the test guest is, from Phase 1's EFI definitions: a system table with CRC32'd headers, ConOut over the PL011 with 4.5's filter, ConIn not ready, the devicetree in the configuration table, every other boot service EFI_UNSUPPORTED. The first attempt's fault at 0x200 came from compiler-generated SIMD with EL1 FP/SIMD disabled; the entry now sets CPACR_EL1.FPEN, and the image has no relocations. 278 changed non-spec lines with prose: over the ~200 aim, under the 400 stop. After the merge, in BQ2's seed, the aarch64 boot suite gives 38 examples, 0 failures, and the firmware prints 'guest firmware: system table ok, devicetree in configuration table' then powers off; outside it the x86_64 boot suite passes and format passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX check-in: b9f1011561 user: x86-1-glint tags: trunk

04:56
Specs: the guest devicetree is 1453 bytes since the PSCI fix

Claim: spec/run/virtio_console_spec.cr and spec/run/xhci_spec.cr expected 'test guest: devicetree 1445 bytes'; the reviewer's PSCI fix (cb450c2b1c) added 'arm,psci' to the psci node and the tree became 1453 bytes. The reviewer merged that fix after booting the guest but without rerunning these two boot specs, so trunk at b50aa7262e failed them. Codex found it while doing 6.5a (ii) part 1 and left the expectations alone. Passage: rule 2's demonstration: a merge is shown by its specs. Demonstration: inside BQ2's seed, crystal spec spec/run --example aarch64: 34 examples, 0 failures. Size: 2 lines in 2 specs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX check-in: bc9e11cfa8 user: x86-1-glint tags: trunk

04:46
Guest EFI firmware stands up at EL1 (6.5a-ii-1)

Claim: On aarch64, Glint loads a standalone guest firmware with the existing --guest path and passes its devicetree in x0. The firmware builds EFI-shaped system and boot tables from boot/efi.cr, exposes the tree by EFI_FDT_GUID, prints through its own PL011 ConOut, reports ConIn not ready, refuses all boot services, and powers off through PSCI. Only Part 1 is implemented.

Passage: MOS4/5 section 7.2, paraphrase (text absent from the workspace): a virtual machine should present the behavior software expects from hardware. UEFI 2.10 sections 4.2-4.4 and 12.3-12.4 supply the tables and console ABI; U-Boot 2026.07 include/efi_api.h supplies EFI_FDT_GUID. The firmware remains an ordinary EL1 guest: UART accesses trap as device accesses, and PSCI is its only hypercall. No Linux libstub call sequence is assumed or verified.

Demonstration: Every aarch64 command uses docs/tasks/4.1a.md's BQ2 seed namespace and environment, with cd /workspace/v54, through build/6.5a-ii-1-seed.sh. bin/glint-build guest-efi aarch64 and glint-build aarch64 pass. bin/glint-run aarch64 --mode hypervisor --guest build/aarch64/guest/efi.efi --expect "VM: guest powered off" prints "guest firmware: system table ok, devicetree in configuration table", then shutdown and 32 KiB backing. The build shares build_test_guest's header, Crystal flags and shared/Bsymbolic boot/efi.lds link. llvm-objdump shows _start at 0x1000 with a relative BL at 0x1018 to guest_efi_main at 0x118c; placement at 0x40200000 therefore calls 0x4020118c. Fixed caller-owned storage avoids module GOT relocations (llvm-readelf -r: none). Entry enables CPACR_EL1.FPEN before Crystal's SIMD struct zeroing; a relative entry alone still reproduced the 0x200 exception-vector fetch symptom before this.

In the seed: crystal spec spec/run --example aarch64: 38 examples, 2 failures, 0 errors/pending. Both failures are unchanged baseline 1445-byte FDT expectations in virtio_console_spec and xhci_spec; trunk's PSCI fix cb450c2b1c produces 1453 bytes, as merge b50aa7262e records. Guest code, tree and those expectations are unchanged. Final spec/run/guest_efi_spec.cr: 2 pass. spec/guest_efi_spec.cr: 3 pass. image_initialization_spec.cr filtered by aarch64: 1 pass; source initializer check: 1 pass. efi_image_spec.cr filtered by aarch64: 1 pass. small_target_spec.cr: 1 pass. No x86_64 target is built in the seed: architecture examples are selectable and the run harness builds only its selected architecture.

Outside the seed, ZEPHYR_SRC=/workspace/src/zephyr-src crystal spec: 1406 examples, 0 failures/errors, 62 expected pending; LD_LIBRARY_PATH points to a local symlink to BQ2 seed libxml2.so.2, missing on this host. With QEMU_SRC, UBOOT_SRC and GLINT_UBOOT_BUILD_DIR=build/uboot, crystal spec spec/run --example x86_64: 31 examples, 0 failures, 0 errors, 0 pending. Boot suites run serially. crystal tool format --check passes. No Python or new heap/startup initializer.

Size: 273 added, 5 removed non-spec lines, including prose (278 changed; above the approximately 200-line aim, below the 400-line stop). Glint EFI bytes before -> after: aarch64 275456 -> 275456; x86_64 258560 -> 258560. Firmware EFI: 20992 bytes, SizeOfImage 24576. Largest new function: GuestEFI.boot_services, 1488 bytes; build is 744. All firmware text functions are <= 2048 bytes. Existing Glint code is unchanged; its existing largest text functions, Shell::Matcher.result, remain 8404/11410 bytes on Arm/x86. The all-aarch64-boot-pass constraint remains unmet only for the two baseline FDT expectations above. Part 2 was not started. Full report: /tmp/claude-1000/-workspace-tree/a0ae0c06-f036-4a7e-a6d5-e2cc56695fb6/scratchpad/6.5a-ii-1-report.md Leaf check-in: 9a5dc2dd02 user: x86-1-glint tags: slice/6.5a-ii-1

Changes
Unified Diff Side-by-Side Diff Patch
Added guest/efi/README.md.
Added guest/efi/entry_aarch64.S.
Added guest/efi/main.cr.
Added guest/efi/table.cr.
Added spec/guest_efi_spec.cr.
Changes to spec/image_initialization_spec.cr.
Changes to spec/run/glint_run_spec.cr.
Added spec/run/guest_efi_spec.cr.
Changes to tools/glint_build.cr.