Login
Check-in [b5930375c8]
Login

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

Overview
Comment:Merge 4.1 and 4.6 (aarch64): vectors that resume, and backtraces

Reviewed against docs/tasks/4.1a.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: b5930375c811db17f98fa190212e8b0f94a968f60b72064e685a1e45b7cf3414
User & Date: x86-1-glint 2026-11-09 22:05:44.801
Context
2026-11-09
22:07
docs/boots: aarch64 traps that resume, and a backtrace (4.1, 4.6)

Claim: the boots page gains the aarch64 halves of 4.1 and 4.6: brk resumes through Glint's EL2 vectors, and a fault ends with a four-frame backtrace.

Passage: the maintainer's 'more ascii animations of glint as it progresses, please' (ocx-console 40c80385db).

Demonstration: the cast is the file bin/glint-run wrote on x86-1 at trunk b5930375c8, with BOOTAA64.EFI built inside BQ2's seed. Its log shows the trap lines and the backtrace frames quoted in the entry.

Size: one cast, one entry in boots.js.

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

22:05
Merge 4.1 and 4.6 (aarch64): vectors that resume, and backtraces

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

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

22:05
4.1 and 4.6 (aarch64): vectors that resume, and backtraces

Claim: on aarch64, at EL2 or EL1, every exception now reaches the shared Glint::Trap.dispatch through an ArmFrame view. The saved frame is x0-x30, SP_EL0, and ESR, ELR and SPSR read at the current EL. A handled trap restores the registers, SP_EL0, ELR and SPSR and returns with eret. BRK (EC 0x3c, QEMU 11.1.2 target/arm/syndrome.h) is the breakpoint, and resuming steps ELR past it. The breakpoint command executes brk #0 and prints the same lines as on x86_64. An unhandled trap reports as before and ends with the shared backtrace walker, fed ELR and x29 and bounded by Glint's SP_EL0 stack. Glint's aarch64 C code is built with -mno-omit-leaf-frame-pointer, so a fault in a leaf routine still records the shell's return address. One check-in for both halves, because they share boot/vectors_aarch64.cr.

Passage: xv6 §4.1 (the trap machinery saves registers so the code can resume) and §4.5 (kerneltrap panics on an unexpected trap), both paraphrased because the text isn't in the workspace.

Demonstration: built and run inside BQ2's seed (bq2 sysroot-namespace, LLVM with AArch64). breakpoint at EL2 and at EL1 printed 'Trap: breakpoint at 0x453a95b8' (glint_arm_breakpoint) and 'breakpoint: resumed', and the shell went on. llvm-nm names fault's backtrace #0 glint_fault_instruction and #1 Glint::Shell.run, and fault 'write''s #0 glint_fault_write_execute and #1 Glint::Shell.run. overflow's walk ends within 16 frames. In the seed, the trap, panic-vectors, phase 2, 3 and 4, backtrace and image-check specs give 48 examples, 0 failures, 1 pending (aarch64 guest calls, which need 4.3a). Outside it, the x86_64 phase 4, backtrace and UART boots give 11 examples, 0 failures. Codex wrote it from docs/tasks/4.1a.md; the reviewer made no changes.

Size: 4.1 half +126/-7, 4.6 half +29/-3 non-spec lines; largest changed function ArmVectors.report, 1,352 bytes; BOOTAA64.EFI 205,824 bytes, BOOTX64.EFI unchanged at 209,408.

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

21:41
Task 4.1 and 4.6 (aarch64): vectors that resume, and backtraces

Claim: docs/tasks/4.1a.md hands out the aarch64 halves of 4.1 and 4.6 as two check-ins. Exceptions reach the shared dispatcher, and a handled BRK (EC 0x3c, QEMU 11.1.2 target/arm/syndrome.h line 76) resumes with eret and SP_EL0 restored. Unhandled ones end with a backtrace through x29/x30 frame records, using the same walker as x86_64. It says how to build and run aarch64 specs inside BQ2's seed with bq2 sysroot-namespace.

Passage: docs/WORKFLOW.md, Handing out a slice, step 1; The One Place's route to ARM (glint fc3d2664d0).

Demonstration: the aarch64 vector layout it names was read in boot/vectors_aarch64.S (256-byte frame, x0-x30 and SP_EL0).

Size: one new task.

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

Changes
Unified Diff Side-by-Side Diff Patch
Changes to boot/trap.cr.
Changes to boot/vectors_aarch64.S.
Changes to boot/vectors_aarch64.cr.
Changes to spec/panic_vectors_spec.cr.
Changes to spec/run/backtrace_spec.cr.
Changes to spec/run/phase4_spec.cr.
Changes to spec/trap_spec.cr.
Changes to tools/glint_build.cr.
Changes to user/shell.cr.