Repository navigation
irq: an InterruptController trait, with the Indy and Indigo2 interrupts on it - #261
Merged
Merged
Conversation
`InterruptController::set_line(line, level)` is what interrupt lines lead into; an `IrqLine` is one input of one controller, which a device drives to its level. One shape for every device's interrupt, instead of a callback trait per device. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each IocInterrupt is a line, numbered in declaration order. Ioc and the lines from `Ioc::irq_line` drive the same code `set_interrupt` always ran, now `IocState::set_source`. Nothing uses the lines yet; the devices move over one at a time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its interrupt goes to the IOC's Serial line instead of through its own IrqCallback trait, which goes. The level is the same: either channel's pending bits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its interrupt goes to the IOC's KbMouse line instead of through its own Ps2Callback trait; that trait and the IOC's IocIrqLine adapter go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The IOC's VideoVsync line, from `Ioc::irq_line`, replaces the VinoIrq trait and the machine's adapter for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ines Each INTSTAT bit is a line. A SCSI channel's chip and DMA bits are ORed onto its IOC line, and a chip-INT ack still settles the paired PDMA half; the SEEQ's level goes to the IOC's Ethernet line as before, not ORed with the Ethernet DMA bits. The WD33C93A, SEEQ 8003 and PDMA channels hold IrqLines; ScsiCallback, SeeqCallback, PdmaCallback and the Hpc3Irq/EnetSeeqIrq adapters go. Same bits, same lock order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MC held the whole IOC to raise and clear one interrupt; it now holds the IOC's McDma line (`set_dma_irq`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It held the whole IOC for one line; it now holds the IOC's GioExp0 line. Its three sources still share that line with no OR between them, as before (an ack of one drops the line while another may be pending); that is a separate fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The IMPACT board picked its IOC sources itself (the Indigo2 graphics slot's FIFO, general and retrace); the machine now hands it those three lines, so the board no longer knows which slot it is in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The machine hands REX3 the IOC lines its slot is wired to (`set_vblank_irq`, `set_fifo_full_irq`) instead of closures that called the IOC; the vblank trace instant moves to where REX3 raises the line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
belikh
added a commit
to irix7/iris
that referenced
this pull request
Oct 24, 2026
Upstream's README carries the whole contract: small PRs, one fix per PR, preferably one commit, bisectable. Observed practice matches it — of the last 25 merged PRs nearly all are a single commit touching one to four files, median merge latency is hours, and almost nothing is closed unmerged. Add the policy, the one-commit consequence for each unit, and the coordination notes for the contributors whose work these PRs build on (techomancer#266, techomancer#265, techomancer#279/techomancer#283, techomancer#261, techomancer#253). Credit: none of this is derived from upstream; the analysis is the fork's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
irq: an InterruptController trait, with the Indy and Indigo2 interrupts on it
Each Indy/Indigo2 device that raises an interrupt had its own callback trait or held the whole
Iocto set one line. This addssrc/irq.rs, one shape for every interrupt, and moves IP22/IP24/IP28 onto it. As discussed, it is the base for the O2: its CRIME and MACE controllers will implement the same trait, so devices see one interface on every machine.The trait
A device holds an
IrqLineand drives it to its level. The controller decides what the level means: a status bit behind a mask, an input ORed with others, or a cascade further up.The changes, one device per commit
IocInterruptis a line, numbered in declaration order;Ioc::irq_line(source)hands one out.set_interruptruns the same code as before (nowIocState::set_source).Hpc3Irqdid. The SEEQ's level still goes to Ethernet on its own, not ORed with the Ethernet DMA bits.IrqLines: the Z85C30, the 8042, VINO, both WD33C93As and their PDMA channels, the SEEQ, the MC's GIO DMA engine, Ultra64, MGRAS (FIFO, general and retrace) and REX3 (VV_INT_N,FIFO_INT_N).IrqCallback,Ps2Callback,VinoIrq,ScsiCallback,SeeqCallback,PdmaCallback, the REX3 vblank/FIFO closures, and theIocIrqLine,Hpc3Irq,EnetSeeqIrqandVinoIrqAdapteradapters.Iocnow take the line(s):Z85c30::new*,Ps2Controller::new,Wd33c93a::new*,Seeq8003::new/with_config,Ultra64::new,Mgras::new;MemoryController::set_iocis nowset_dma_irq, and REX3's setters areset_vblank_irq/set_fifo_full_irq. REX3's field names are unchanged, since docs and the lock diagnostics use them.Behaviour is meant to be identical: the same bits, the same ORs, the same lock order. Left as they are, because they are not plain levels: the 8254 timers (latched, cleared by TMR_CLR), GR2's retrace (a rising edge acked IOC-side, plus the EXT_IO status), and the IOC's output to the CPU's Cause bits.
Tests
set_interruptdrives; INTSTAT ORs a SCSI channel's halves, a chip ack settles the DMA half, and the SEEQ's level reaches Ethernet as it is; the 8042's line follows its receive queue; the SCC test now uses the sharedLevelProbe.cargo test --lib: all pass, apart frombreakpoints_can_be_set_while_running_and_report_their_hitandudp_fragmented_both_ways, which fail the same way onmainhere.main(see below)Extreme's desktop and the dual-head Indy's head 0 were also compared with
mainpixel by pixel: identical.The IP22 IMPACT rows: with Solid, High or Max IMPACT on an R4400 Indigo2, the PROM prints "NVRAM checksum is incorrect: reinitializing" and then takes a UTLB miss at 0x10c (EPC 0x9fc36988), before IRIX loads.
maindoes exactly the same with the same disk and NVRAM, so those three couldn't be tested here. The same install booted on IMPACT on 2026-10-01.Found on the way, not changed here
These are behaviour this PR keeps as it was, filed as issues:
Ioc::power_onstores 0 to the CPU's whole interrupt word, which also clears IP7 (the CPU timer) (Ioc::power_on clears the CPU's whole interrupt word, including IP7 (CPU timer) #264).🤖 Generated with Claude Code