Login
Check-in [d1ece77c05]
Login

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

Overview
Comment:Merge U.1: the xHCI register file on aarch64

Reviewed against docs/tasks/U.1.md; verdict merge. HCSPARAMS1 0x04000108 gives 4 ports, 1 interrupter, 8 slots; ports follow QEMU's numbering, USB 3 first. The reviewer booted the demo in BQ2's seed: the guest reads the capabilities, stops and resets the controller, and prints 'test guest: xHCI 1.0, 4 ports, 8 slots' after its other lines; 'VM: guest memory 24 KiB backed'; exit 0. x86_64 unchanged (27 boot examples pass outside the seed, per Codex).

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: d1ece77c0590a01f141d7d0778221d42a847a0c59008b5c8433c5b95738fb3e0
User & Date: x86-1-glint 2026-11-11 00:52:36.305
Context
2026-11-11
00:52
docs/boots: the aarch64 guest finding an emulated xHCI, recorded

Claim: the boots page gains U.1: the guest reads an emulated xHCI controller's capabilities, stops and resets it, and prints what it found. 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 slice/U.1 305ddb9fd1 (merged as d1ece77c05), 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: 48f6f63c40 user: x86-1-glint tags: trunk

00:52
Merge U.1: the xHCI register file on aarch64

Reviewed against docs/tasks/U.1.md; verdict merge. HCSPARAMS1 0x04000108 gives 4 ports, 1 interrupter, 8 slots; ports follow QEMU's numbering, USB 3 first. The reviewer booted the demo in BQ2's seed: the guest reads the capabilities, stops and resets the controller, and prints 'test guest: xHCI 1.0, 4 ports, 8 slots' after its other lines; 'VM: guest memory 24 KiB backed'; exit 0. x86_64 unchanged (27 boot examples pass outside the seed, per Codex).

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

00:50
U.1: an aarch64 xHCI register file and guest reset probe

Claim: In aarch64 hypervisor mode the guest finds an xHCI 1.0 controller at 0x0c000000, reads 8 slots, 1 interrupter and 4 ports, stops and resets it, then prints its readings after the existing virtio line. Capability, protocol, operational, port, runtime and doorbell registers implement U.1's reset values and writable masks. Unsupported widths and alignment reach the existing fault report. There are no rings, transfers or interrupts yet. x86_64 retains its device layout, I/O behavior and guest output.

Passage: xv6 section 6, a driver "configures the device hardware"; here Glint is the device. docs/phases/U-usb.md U.1 and docs/tasks/U.1.md specify the register-only slice. Sources: QEMU 11.1.2 hw/usb/hcd-xhci.c:47-54,2640-2670,2710-2808,2924-3173,3188-3194; include/hw/usb/xhci.h:17; hw/arm/virt.c:216. QEMU's protocol list is USB2 then USB3, while USB3 ports are numbered first.

Demonstration: bq2 sysroot-namespace --rootfs=/workspace/seed/rootfs --bind=/workspace:/workspace -- /bin/sh -c 'cd /workspace/v54 && export ZEPHYR_SRC=/workspace/src/zephyr-src QEMU_SRC=/workspace/src/qemu-11.1.2 UBOOT_SRC=/workspace/src/u-boot-2026.07 HOME=/workspace/seed/home GLINT_UBOOT_BUILD_DIR=build/uboot GLINT_QEMU_AARCH64=build/qemu-aarch64/qemu-system-aarch64 LD_LIBRARY_PATH=/usr/lib64 && crystal spec spec/run --example aarch64': 27 examples, no failures/errors/pending. In the same seed, register/MMIO/PL011/virtio host checks: 33 passing; image initialization plus small target: 6 passing; aarch64 EFI headers: 1 passing. bin/glint-run aarch64 --mode hypervisor --guest build/aarch64/guest/test.efi --expect "VM: guest powered off" prints "test guest: xHCI 1.0, 4 ports, 8 slots", then shutdown and 24 KiB backed (five image pages and one stack page, unchanged). Outside, with QEMU_SRC, UBOOT_SRC, ZEPHYR_SRC, GLINT_UBOOT_BUILD_DIR and LD_LIBRARY_PATH set: crystal spec spec/run --example x86_64: 27 passing, boot specs unedited. Outside, with QEMU_SRC and UBOOT_SRC unset, ZEPHYR_SRC=/workspace/src/zephyr-src LD_LIBRARY_PATH=/usr/lib64 crystal spec: 1369 examples, 0 failures, 0 errors, 55 expected pending. crystal tool format --check passes. Initial mixed-architecture invocation mistakes and the corrected validation commands are documented in the requested U.1 report.

Size: 215 non-spec lines added, 4 removed (219 changed, 211 net), including documentation; 9 files total. aarch64 EFI: 222208 -> 230400 bytes; x86_64 EFI: 238080 -> 238080 bytes. Largest new function Xhci.write_word: 1204 bytes. Vcpu.boot: 1984 bytes on aarch64, 1996 on x86_64. No heap allocation or startup initializers added. Leaf check-in: 305ddb9fd1 user: x86-1-glint tags: slice/U.1

00:15
docs/tasks/U.1.md: the xHCI register file on aarch64

Claim: the task for U.1: an xHCI register model at guest-physical 0x0c000000 on 5.2's memory space, with capability, extended-capability, operational, port, runtime and doorbell registers at their reset values, and an aarch64 test guest that reads the capabilities, halts and resets the controller, and prints what it read. 8 slots, 1 interrupter, 4 ports. No rings until U.2. Passage: docs/phases/U-usb.md, slice U.1. Demonstration: the values named are cited to QEMU 11.1.2: hcd-xhci.c lines 47-54 (layout), 2753-2800 (capabilities), 3657-3658 (default ports); xhci.h lines 13-14; virt.c line 216 (platform bus). Size: one task file.

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

Changes
Unified Diff Side-by-Side Diff Patch
Changes to boot/devices.cr.
Changes to boot/mmio.cr.
Changes to boot/vcpu.cr.
Added boot/xhci.cr.
Changes to guest/test/README.md.
Changes to guest/test/main.cr.
Changes to spec/mmio_spec.cr.
Added spec/run/xhci_spec.cr.
Added spec/xhci_spec.cr.