Login
Check-in [4233216ded]
Login

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

Overview
Comment:Merge 4.1 (x86_64): Full exception vectors

Reviewed against docs/tasks/4.1.md; verdict merge.

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: 4233216deda9d4be74eae90af583ee37879cf05eff298d039fa94f723fee1dce
User & Date: x86-1-glint 2026-11-09 17:57:33.770
Context
2026-11-09
17:58
Task 4.2 (x86_64): A bare-metal test guest

Claim: docs/tasks/4.2.md has guest/test/ build a tiny PE32+ guest for x86_64 that writes text through a Glint call, asks PSCI for its version, and powers off. Its README fixes the guest ABI for both machines, for 4.3b and 4.4 to implement: entry state, HVC or VMMCALL with SMCCC numbering, PSCI VERSION and SYSTEM_OFF, and GLINT_CONSOLE_WRITE 0x86000001.

Passage: docs/WORKFLOW.md, Handing out a slice, step 1.

Demonstration: the PSCI IDs were read in U-Boot 2026.07 include/linux/psci.h (0x84000000, 0x84000008). SMCCC owner 6 for vendor hypervisor services is not in the workspace's headers, and the task marks it unverified.

Size: one new task.

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

17:57
Merge 4.1 (x86_64): Full exception vectors

Reviewed against docs/tasks/4.1.md; verdict merge.

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

17:57
4.1 (x86_64): Full exception vectors

Claim: every x86_64 exception now reaches one dispatcher, Glint::Trap.dispatch, through a Frame view over the registers the stubs saved, with no copy. When the dispatcher handles a trap, the common entry restores the registers and returns with iretq. Otherwise it reports and halts exactly as 2.7 did. #BP is the first handled cause: 'Trap: breakpoint at 0x<int3>', then the interrupted code resumes. The new breakpoint shell command shows it in native mode and refuses at a hosted prompt. The aarch64 half follows as its own check-in when x86-1's LLVM has AArch64.

Passage: xv6 ยง4.1, the trap machinery saves the interrupted code's registers so it can be resumed. Paraphrased, because the xv6 text isn't in the workspace.

Demonstration: on x86-1, bin/glint-run x86_64 --type breakpoint --type breakpoint --type 'cat "hello.txt"' printed 'Trap: breakpoint at 0x5b8e896' and 'breakpoint: resumed' twice, then 'Hello from the ESP!', so the shell kept running. The specs for trap, phase 4, phase 3, phase 2, shell, native table and image initialization give 34 examples and 3 failures. All 3 are aarch64 Phase 2 boots that x86-1 can't build. The x86_64 fault, fault 'write' and overflow lines are unchanged, and those specs pass unedited. Codex reports the full suite at 1707 examples, 13 failures and 2 errors, all aarch64 builds or glint-build all. The stub keeps the frame in callee-saved r12 and rounds RSP down to 16 before each call. Codex wrote it from docs/tasks/4.1.md; the reviewer made no changes. Review notes: overflow moved into its own shell function so the native loop doesn't grow (8,033 to 7,990 bytes). On aarch64, breakpoint would print nothing until the aarch64 half adds its vectors.

Size: +121/-17 non-spec lines; largest new function 151 bytes; BOOTX64.EFI unchanged at 184,832 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMXZyLk8eDgCjvQ9hX Leaf check-in: 57509a1de7 user: x86-1-glint tags: slice/4.1-x86_64

17:18
Phase 4 starts on x86_64: task 4.1 (x86_64), full exception vectors

Claim: docs/tasks/4.1.md is 4.1's x86_64 half and the shared dispatcher. The stubs return through iretq when the dispatcher handles a trap. #BP is the one handled cause, shown by a breakpoint command whose shell keeps running, and every other cause keeps 2.7's report line for line. docs/phases/04-traps.md records the order while x86-1 can't build aarch64: x86_64 halves first, aarch64 halves as their own check-ins, and 4.3b may precede 4.3a.

Passage: docs/WORKFLOW.md, Handing out a slice, step 1; the maintainer's 'Try to let Glint get through the book implementation' (ocx-console 363063f81e).

Demonstration: the stubs' layout and report path were read in boot/vectors_x86_64.S and .cr. The order change departs from the plan's aarch64-first rule only until the seed lands, and says so.

Size: one new task, 8 lines in the phase document.

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

Changes
Unified Diff Side-by-Side Diff Patch
Added boot/trap.cr.
Changes to boot/vectors_x86_64.S.
Changes to boot/vectors_x86_64.cr.
Changes to spec/native_table_spec.cr.
Added spec/run/phase4_spec.cr.
Changes to spec/shell_spec.cr.
Added spec/trap_spec.cr.
Changes to user/shell.cr.