Skip to content

grandcentral: Keep interrupt events and CPU IRQ state consistent - #240

Merged
dingusdev merged 1 commit into
dingusdev:masterfrom
mihaip:upstream-grandcentral-irq
Oct 14, 2026
Merged

dingusdev merged 1 commit into
dingusdev:masterfrom
mihaip:upstream-grandcentral-irq

Conversation

@mihaip

@mihaip mihaip commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Two correctness fixes, based on the Grand Central ERS:

  • Reevaluate the CPU interrupt when the mask changes, releasing it if no pending events remain enabled (section 6.1).
  • Keep events latched until software writes InterruptClear, even if a device deasserts its interrupt line or repeats an assertion (section 6.2.1).

This fixes occasional freezes on BeOS (especially in realtime mode). Previously, the CPU interrupt could remain asserted with no enabled events, trapping BeOS in its interrupt handler.

Two correctness fixes, based on the Grand Central ERS:
- Reevaluate the CPU interrupt when the mask changes, releasing it if
  no pending events remain enabled (section 6.1).
- Keep events latched until software writes InterruptClear, even if a
  device deasserts its interrupt line or repeats an assertion (section
  6.2.1).

This fixes occasional freezes on BeOS (especially in realtime mode).
Previously, the CPU interrupt could remain asserted with no enabled
events, trapping BeOS in its interrupt handler.
mihaip added a commit to mihaip/infinite-mac that referenced this pull request Oct 14, 2026
Picks up dingusdev/dingusppc#240 which occasional BeOS freezes in
realtime mode.

For #237
@dingusdev
dingusdev merged commit 45a4965 into dingusdev:master Oct 14, 2026
7 checks passed
@mihaip
mihaip deleted the upstream-grandcentral-irq branch October 15, 2026 00:15
dingusdev pushed a commit that referenced this pull request Oct 15, 2026
Apply the Grand Central fixes from #240 to O'Hare,
Heathrow, and Paddington; the Heathrow ERS shows that it expects to
have the same behavior:
- Reevaluate the CPU interrupt when either mask changes, releasing it
  if no pending events remain enabled in either bank (section 7.1).
- Keep events latched until software writes InterruptClear, even if a
  device deasserts its interrupt line or repeats an assertion (sections
  7.2.1 and 7.2.5).
- Replace writable InterruptMask2 bits instead of ORing them, allowing
  sources to be disabled while preserving the read-only IntMode bit
  (section 7.2.6).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants