sigil-kernel's thirteenth HAL batch adds 10 more seams — Apple: TrueDepth camera (RGB 1920×1080 + depth 640×480, IR projector, flood illuminator, Center Stage face-tracking, hardware privacy LED), Apple Neural Engine (8-cmd ring with matmul/relu/softmax/conv2d, power gate, cycle model, BW accumulator), Sidecar secondary display (iPad 2732×2048@2x frame ring ×4, Apple Pencil relay, wired/wireless), Spatial Audio (AirPods head-tracking yaw/pitch/roll, personalized HRTF, seat-lock), Secure Enclave (SEP boot+seal, 2 AES keyslots, ECDH key derive, 4-entry token table). PowerPC: FPU (8 FPRs, FPSCR sticky bits, fadd/fmul/fdiv with zero-divide ZX exception), Media Bay (optical/floppy/HDD/battery presence, ATA mux, second-battery relay, software eject), Uni-N northbridge (4 DIMM slots, auto-interleave, AGP aperture/speed, CPU bus clock×multiplier), FireWire OHCI (bus reset, 64-channel iso bitmap, async write+ACK), AGP controller (16-entry GART, 1x/2x/4x/8x + fast-write, 256MB aperture, 8-cmd FIFO). All QEMU PASS. (sigil-kernel 0b82e06–029a572)
Apple Silicon seams
apple_truedepth.sg (0b82e06) — TrueDepth camera system
apple_truedepth.sg models the full TrueDepth sensor array used for Face ID and Center Stage. Base address 0x47A000. PASS: TD init=1 cap=1 cs=1.
- Sensors: RGB image sensor at 1920×1080 + depth sensor at 640×480 (structured-light + time-of-flight hybrid model). The depth channel drives Face ID geometry reconstruction.
- Illuminators: IR dot projector (active during Face ID depth capture) + flood illuminator (passive ambient for low-light). Each independently togglable from EL1.
- Frame capture: frame counter increments per capture cycle — used by the face-detection pipeline to track sequence continuity.
- Center Stage: found flag + X/Y pixel position of tracked face. Updated per frame; EL0 apps read the position via cap-gated syscall — they never touch the sensor registers directly.
- Hardware privacy LED: mandatory-on when camera active. EL1 sets it; EL0 cannot suppress it. This is a physical guarantee — the LED wiring is not software-controlled from user mode.
apple_ane.sg (df2e126) — Apple Neural Engine
apple_ane.sg models the ANE dispatch ring and its power/cycle model. Base address 0x47C000. PASS: ANE init=1 run=1 bw=1.
- 8-command dispatch ring: command types are matmul (rows×cols accumulate), relu (threshold), softmax (sum-normalize), conv2d (filter-stride accumulate). Commands enqueue into the ring; the ANE drains them in order.
- Power gate: ANE is off by default; it powers on automatically when the queue is non-empty and gates off on drain. The power-gate transition is visible in the seam's power-state register.
- Cycle model: matmul cost = rows × cols cycles; other operations have fixed cost. A total cycle counter accumulates across all commands in the session.
- Bandwidth accumulator: tracks bytes read and written across all commands — used by the power model and the scheduler's BW fairness logic.
- Busy-drain: when the queue empties, the busy flag clears automatically — the driver polls this rather than taking an interrupt in the simulation model.
apple_sidecar.sg (03a6a7c) — iPad Sidecar secondary display
apple_sidecar.sg models the Sidecar protocol surface for extending the desktop to an iPad. Base address 0x47E000. PASS: SC init=1 con=1 pnl=1.
- Session modes: wired (USB) and wireless (Wi-Fi). Latency budget differs: wired ≤8ms, wireless ≤33ms. The session-mode register drives which timing path the WM compositor uses.
- Frame ring: 4 slots at 2732×2048@2x (12.9" iPad Pro native resolution). Drop detection: if the ring wraps without the consumer advancing, a drop counter increments — surfaced as a display health metric.
- Apple Pencil relay: X/Y position (float×100 fixed-point), pressure (0–255), pen-type flag (distinguishes finger vs Pencil). The relay routes into the WM as synthetic stylus input — the same input path used by a drawing tablet.
apple_spatial_audio.sg (2700ddb) — AirPods Spatial Audio HAL
apple_spatial_audio.sg models the AirPods Spatial Audio session and head-tracking surface. Base address 0x480000. PASS: SPA init=1 trk=1 lck=1.
- Presence + battery: L/R/case presence flags with per-side battery percentage. The audio daemon checks presence before routing spatial output.
- Head-tracking: yaw/pitch/roll in degrees×100 (integer fixed-point; e.g., 4500 = 45.00°). Updated from the AirPods IMU at ~200Hz. The audio renderer uses these to pan the HRTF in real time.
- Personalized HRTF token: set by the OS after biometric ear-scan enrollment; zero until enrolled. The spatial renderer selects the personalized HRTF over the generic model when non-zero.
- Seat-lock: when seat-lock is set, head-track updates are blocked. Used during playback setup to prevent audio tears from transient head-pose jitter at session start.
apple_secure_enclave.sg (029a572) — Secure Enclave Processor (SEP)
apple_secure_enclave.sg models what the SEP does after a biometric event: key operations, ECDH derivation, and token table management. Base address 0x482000. PASS: SEP init=1 aes=1 ecdh=1.
- Boot + seal: SEP boots independently; the seal flag indicates successful attestation. The OS does not proceed with biometric-gated capabilities until the seal is set.
- 2 AES keyslots:
sep_aes_load(slot, kid)loads a key by identifier — key material stays inside the SEP, never visible above EL1.sep_aes_encrypt(slot, in, out)encrypts via a token proxy; plaintext never crosses the SEP boundary. - ECDH key derivation:
sep_ecdh_derive(privkey, pubkey)→ deterministic shared secret (simulation model). Used for iMessage/iCloud key agreement. - 4-entry secure token table: maps login session IDs to grant tokens. The capability broker reads this table to confirm biometric-gated capability requests.
Relationship to apple_biometric: apple_biometric models the scan/match surface (sensor → SEP → PASS/FAIL/LOCK). apple_secure_enclave models what the SEP does with the result: loading AES keys, deriving ECDH secrets, updating the token table. Together they cover the full biometric-to-capability pipeline.
PowerPC seams
ppc_fpu.sg (0b82e06) — G3/G4/G5 floating-point unit
ppc_fpu.sg models the PowerPC scalar FPU present on all G3/G4/G5 cores. Base address 0x47B000. PASS: FPU init=1 arth=1 zdv=1.
- 8 FPRs (FPR0–FPR7): stored as integer×1000 proxy for deterministic simulation — avoids host floating-point variability in the test harness.
- FPSCR (Floating-Point Status and Control Register): sticky bits FX (any exception), OX (overflow), ZX (zero-divide), XX (inexact). Bits persist until explicitly cleared.
- Instructions:
fadd,fmul,fdiv. Zero-divide onfdivwith a zero divisor sets the ZX sticky bit in FPSCR.
ppc_mediabay.sg (df2e126) — PowerBook G3/G4 Media Bay
ppc_mediabay.sg models the modular Media Bay slot on PowerBook G3 and G4. Base address 0x47D000. PASS: MB init=1 opt=1 ata=1.
- Bay device type: optical drive / floppy / hard disk / second battery (enum). The OS reads the type register at boot to configure the appropriate driver stack.
- ATA mux: routes the ATA bus to the media bay slot. A start/complete cycle simulates an ATA transfer to the bay device.
- Second-battery relay: when type=battery, exposes charge% and voltage mV — used by the power manager to sum total available capacity.
- Software eject: eject command + IRQ accumulation for debounce. The OS issues the eject, the bay asserts an IRQ after the motor-stop debounce period.
ppc_uni_n.sg (03a6a7c) — G3/G4 Uni-N northbridge
ppc_uni_n.sg models the Uni-N northbridge that connects CPU, RAM, and AGP on G3/G4 systems. Base address 0x47F000. PASS: UN init=1 mem=1 agp=1.
- 4 DIMM slots: each with size (MB) and CAS latency. Total RAM is the sum of populated slots.
- Automatic interleave detection: if two adjacent slots have matching sizes, interleave mode is enabled — this halves effective memory latency in the simulation model.
- AGP: enable flag, aperture size, speed (1x/2x/4x/8x — matches
ppc_agp.sg). The Uni-N configures the aperture; the AGP seam manages the GART. - CPU bus: base clock (MHz) + multiplier (2× encoded — multiplier field 14 = 7.0×). The OS reads these to compute the actual CPU frequency for scheduling and PM decisions.
ppc_firewire.sg (2700ddb) — G4/G5 FireWire OHCI (IEEE 1394)
ppc_firewire.sg models the OHCI FireWire controller present on all G4 and G5 systems. Base address 0x481000. PASS: FW init=1 rst=1 iso=1.
- Bus reset: sets node-ID (self), root flag, node-count. Devices discover their node-ID after a reset — the root is the highest-priority node after arbitration.
- Isochronous channel allocation: 64-channel bitmap —
fw_iso_alloc(ch)claims a channel;fw_iso_free(ch)releases it. Channels are used for guaranteed-bandwidth streams (DV video, audio). - Async write + ACK:
fw_async_write(node, addr, data)accumulates a write count and returns ACK_COMPLETE on the first write (deterministic simulation model).
ppc_agp.sg (029a572) — G4/G5 AGP graphics aperture
ppc_agp.sg models the AGP graphics aperture controller, including GART translation and command FIFO. Base address 0x483000. PASS: AGP init=1 gar=1 cmd=1.
- GART (Graphics Aperture Relocation Table): 16 entries, each mapping a virtual→physical address.
agp_gart_load(idx, phys)writes an entry;agp_gart_translate(virt)walks the table to produce the physical address for the GPU DMA engine. - AGP mode: 1x/2x/4x/8x + fast-write flag. 256MB aperture base — the GPU sees this as a contiguous window into system RAM.
- 8-command FIFO: commands enqueue, and a BW accumulator tracks bytes per command — used to model AGP bus saturation.
- Bug fixed: STAT_B address had collided with the FIFO head register in an early revision (same offset); corrected in this commit.
Seam address table — batch 13
| Seam | File | Base Address | PASS token |
|---|---|---|---|
| TrueDepth Camera | apple_truedepth.sg | 0x47A000 | TD init=1 cap=1 cs=1 |
| PPC FPU | ppc_fpu.sg | 0x47B000 | FPU init=1 arth=1 zdv=1 |
| Apple Neural Engine | apple_ane.sg | 0x47C000 | ANE init=1 run=1 bw=1 |
| PPC Media Bay | ppc_mediabay.sg | 0x47D000 | MB init=1 opt=1 ata=1 |
| Apple Sidecar | apple_sidecar.sg | 0x47E000 | SC init=1 con=1 pnl=1 |
| PPC Uni-N Northbridge | ppc_uni_n.sg | 0x47F000 | UN init=1 mem=1 agp=1 |
| Apple Spatial Audio | apple_spatial_audio.sg | 0x480000 | SPA init=1 trk=1 lck=1 |
| PPC FireWire OHCI | ppc_firewire.sg | 0x481000 | FW init=1 rst=1 iso=1 |
| Apple Secure Enclave (SEP) | apple_secure_enclave.sg | 0x482000 | SEP init=1 aes=1 ecdh=1 |
| PPC AGP Controller | ppc_agp.sg | 0x483000 | AGP init=1 gar=1 cmd=1 |