# K2155 IRQ discovery component The native drain must resolve each actual MMIO device to the correct IRQ before masking it. Device names and hard-coded QEMU slot numbers are not authority. The guest reuses the accepted `platform::os_k940_virtio_spi` function and its already validated platform scratch; no second guest parser is added. `binding_reference.rs` is an independent host verifier. It discovers enabled root-bus `virtio,mmio` slots and one `arm,gic-v3` distributor from a bounded FDT v17 blob. It resolves each inherited or explicit interrupt parent against a unique controller phandle, requires a three-cell SPI with an architectural INTID of 32–1019, and preserves edge/level trigger information. Unsupported nested buses, interrupt nexuses, IOMMUs, overlapping ranges, shared IRQs and ambiguous handles are refused. The parser has fixed depth, handle and slot capacities. Header/section overlap, reservation termination, truncated values, duplicate binding properties and properties following children are rejected without allocation or MMIO access. All phandles, including those on unrelated descendant nodes, participate in the uniqueness check. Exact `compatible` tokens determine device type; names are not used by the parser. Disabled/unavailable devices are not returned. Discovery does not own the controller or its mappings. The native caller must also validate its Device mappings, GICD_TYPER capacity, current IRQ ownership, configuration, register mask/readback, active handlers, DMA, workers and page accounting. This component alone cannot accept K2155 or any product image. `prepare.py` archives sources and actual DTBs from the accepted K2150 matrix. It compares the unchanged accepted IRQ function against the host reference and independent `dtc` decoding of nine actual QEMU hardware descriptions (32 slots each), including the exact byte offsets of `reg` and `interrupts` properties. It runs malformed-input and source mutation tests on the reference and compiles the unchanged accepted platform modules for `aarch64-unknown-none`. No QEMU process or existing evidence is modified. ## Owned SPI mask/readback component `k2155-gic-spi.rs` accepts one exclusively owned SPI and the exact DT trigger. Before writing, it checks the actual GICD_TYPER capacity and ICFGR trigger. It writes only that SPI's ICENABLER bit, issues `dsb sy`, and bounds waiting by an absolute physical-counter deadline and a finite poll budget. Success requires RWP clear, enable clear and the owned active bit clear. Capacity and trigger are checked again; clock rollback, expired time, every I/O error and repeat calls fail. Pending and active bits are never cleared to manufacture completion. Unrelated bits are observed but do not stand for the owned IRQ. The AArch64 backend requires an unsafe, exclusively owned Device mapping and retained IRQ registration. It only permits reads of the required distributor registers and one-bit writes to ICENABLER. Its Drop does nothing. The larger native drain still must separately verify that all software handlers returned, workers stopped, DMA completed, device reset read back and pages were released. The component does not configure or enable an IRQ; native setup must do so before exercising the mask operation. `prepare_spi.py` tests the ordering against explicit host I/O fixtures and failure injection, then compiles/disassembles the actual AArch64 backend. Compiled MMIO instructions are not evidence that hardware has executed them. Binding references checked on 2026-10-15: - https://raw.githubusercontent.com/torvalds/linux/master/Documentation/devicetree/bindings/virtio/mmio.yaml - https://raw.githubusercontent.com/torvalds/linux/master/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml - https://devicetree-specification.readthedocs.io/en/stable/devicetree-basics.html