amiga kernel: restore INTENA's master bit when leaving a Paula interrupt - #158
Open
Kamelitoloveless wants to merge 1 commit into
Conversation
A program may hold a Disable() and still turn the hardware interrupts back on itself (Speedway Manager cracktro: Disable(), INTENA=$C020, AddIntServer(VERTB), spin on the server's counter). Our VERTB servers take Disable()/Enable() sections (timer.device's vblank handler, the graphics VBlank server), and with the interrupted task's IDNestCnt at 0 their Enable() never writes $C000 again, so the first vertical blank silently cleared INTEN and the program froze (issue #742). Kickstart's Enable() behaves the same, but its VERTB servers never do this. Interrupt handling must be transparent to the interrupted code: the master bit was set or the interrupt could not have happened, so set it again on the way out of the level 1-6 handlers.
Contributor
Author
|
This fixed all the demos having issues for OCS and AGA that come with ApolloOS. |
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.
A program may hold a Disable() and still turn the hardware interrupts back on itself (Speedway Manager cracktro: Disable(), INTENA=$C020, AddIntServer(VERTB), spin on the server's counter). Our VERTB servers take Disable()/Enable() sections (timer.device's vblank handler, the graphics VBlank server), and with the interrupted task's IDNestCnt at 0 their Enable() never writes $C000 again, so the first vertical blank silently cleared INTEN and the program froze (issue #742). Kickstart's Enable() behaves the same, but its VERTB servers never do this.
Interrupt handling must be transparent to the interrupted code: the master bit was set or the interrupt could not have happened, so set it again on the way out of the level 1-6 handlers.