-
Notifications
You must be signed in to change notification settings - Fork 20
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
A question of Interrupt filtering? #105
Comments
I'm not sure how to respond to this issue.
Since machine-level registers like
You definitely lose me here, because
Yes, in theory. But the problem is that S-level software (usually an operating system) has to be written to know to look in those variables for the information. Standard operating systems you can download and install on your machine won't normally do that. |
hi @jhauser-us -Thank you for your answer.
|
Oh, you meant the attempt to access I guess the sequence you are suggesting would work. Not sure why you're doing it. (But I don't need to know.) More typically, M-level code would emulate the trapped attempt to access |
According to spec 5.3, mvip and mvien can be used to implement interrupt filtering. Here's an idea for an interrupt filtering method: Firstly, an array of external interrupt ids that need to be filtered. Secondly, s mode external interrupt is generated for an id stored in this array in S mode. After entering the trap, read stopei to obtain the id, and then configure mvien[9]=1, mvip[9]=1, mie[9]=0. After exiting the trap, Then enter the virtual interrupt trap. At this time, csrrw stopei will report illegal instrction exception, and then jump to the exception trap in M mode to clear mvien[9], mvip[9] and csrrw stopei. At this time, the information obtained through csrrw stopei will be stored in a total of previously defined public variables. This public variable is then used after exiting the trap so that S mode can obtain information about the external interrupt. Is it possible to pass the obtained external interrupt information to S mode by using public variables?
The text was updated successfully, but these errors were encountered: