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

sip register set / clear functions #130

Closed
PitiBouchon opened this issue Apr 20, 2023 · 4 comments
Closed

sip register set / clear functions #130

PitiBouchon opened this issue Apr 20, 2023 · 4 comments

Comments

@PitiBouchon
Copy link

There are many functions for the sie register to set and clear bits but nothing for the sip register which can only be read
I don't know why but it would be super useful (for example if you want to clear the STIP bit to acknowledge a supervisor timer interrupt

@romancardenas
Copy link
Contributor

I'll check this in depth, but I'm 99% sure that usually you don't clear the interrupt pending flags directly from the sip register. Instead, you interface the interrupt controller of your particular target (e.g., CLINT, PLIC, ...).

@romancardenas
Copy link
Contributor

Hmm, it seems weird to me that mip allows you to clear/set the interrupt pending bits whereas sip does not... @rust-embedded/riscv any insights about this difference?

@PitiBouchon
Copy link
Author

I'll check this in depth, but I'm 99% sure that usually you don't clear the interrupt pending flags directly from the sip register. Instead, you interface the interrupt controller of your particular target (e.g., CLINT, PLIC, ...).

Okay thx, I misunderstood something

@romancardenas
Copy link
Contributor

No problem! Check this old issue, maybe it helps you with your use case :)

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

2 participants