You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ide): full-polling mode for IDE/ATAPI with scheduler-pump and IRQ hardening
Convert the IDE subsystem from interrupt-driven to full polling:
- IDEPacketCommand: poll BSY/DRQ/phase in setup() with transferIn/transferOut
and bounded iteration (MAX_PHASE_ITERATIONS = 1<<20)
- IDEIdCommand: poll for completion and read data in setup()
- IDERWSectorsCommand.pollWait(): unchanged (already polling)
- All handleIRQ() methods become no-ops; CTR_NIEN disables device IRQs
IDEBus hardening:
- resetChannel(): softwareReset() + CTR_NIEN + clear currentCommand
(prevents channel running with interrupts enabled after timeout recovery)
- executeAndWait(): sleep-poll loop instead of waitUntilFinished() to
drive reschedule and dispatch pending interrupts
- process(): clear currentCommand on successful setup completion
- handleInterrupt(): deassert INTRQ for stray IRQs and no-op handlers
- probe(): keep CTR_NIEN after ATAPI identify fallback
vm-ints.asm: send EOI at interrupt level for legacy IDE lines (IRQ14/15)
to prevent PIC line latching from resume-overrun; other lines keep
deferred EOI required by level-triggered PCI devices.
VmIsolate: add scheduler-pump thread (user-mode, MIN_PRIORITY, yields
continuously) started from VmIsolate.run() covering both shell and
installer paths; self-heals if previous pump's isolate exited.
IDEConstants: remove unused CTR_IEN, add CTR_NIEN with Javadoc;
move IR_CD/IR_IO from IDEPacketCommand to IDEConstants; collapse
duplicate section headers and orphaned Javadoc.
Tests: add IDEPacketCommandTest (6 tests) with FakeIDEIO double;
fix FakeIDEIO.Phase.dataIn() intReason from 0x00 to IR_IO (was
causing test hangs by taking the write path).
Ref: #613 (diagnosis: kernel-mode IRQ resume-overrun drops
completions; polling avoids the dependency on yieldpoints in kernel
context but does not fix the assembly-level defects)
0 commit comments