Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect trap polling against interrupts in Ensemble's OS #1

Open
endorpersand opened this issue Oct 4, 2024 · 0 comments
Open

Protect trap polling against interrupts in Ensemble's OS #1

endorpersand opened this issue Oct 4, 2024 · 0 comments

Comments

@endorpersand
Copy link
Owner

Section 9.5 of the textbook mentions that data corruption can occur if an interrupt happens during a polling trap. The textbook resolves this by introducing a notion of disabling/enabling interrupts.

Currently, Ensemble does not do this. However, as far as I know, Complx and LC3Tools v3.1.0 also did not do this. It is an extremely minor and pedantic problem which will almost certainly never occur, but for correctness, it probably should be implemented.

The textbook's discussion in 9.5 introduces a notion of PSR[14] as a system-wide interrupt toggle (and proceeds to never define this again–it's not even in the LC-3 specification). This can probably instead be supplemented with setting the priority of the PSR to 7.

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

No branches or pull requests

1 participant