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

Does SEI in VS mode use default priority? #73

Open
zhuotianshu opened this issue Mar 12, 2024 · 2 comments
Open

Does SEI in VS mode use default priority? #73

zhuotianshu opened this issue Mar 12, 2024 · 2 comments

Comments

@zhuotianshu
Copy link

On page 74:

Major interrupts outside the priority-confi gurable subset can still be directed to VS level, but their priority will simply be the default order defi ned in Section 5.1.

But SEI is also not in the subset of major interrupt numbers listed on page 73:

1 Supervisor software interrupt
5 Supervisor timer interrupt
13 Counter overfl ow interrupt
14–23 Reserved for standard local interrupts

So I wonder whether SEI in VS mode uses default priority.

@vithursons
Copy link

The statement on page 74 about major interrupts outside the priority-configurable subset using the default priority order is a part of scenario 4 in Section 6.3.3, where hvictl.VTI = 0. However, the priority of a VS-level supervisor external interrupt (SEI) is determined by the first three scenarios in Section 6.3.3. Therefore, the priority of an SEI in VS-mode is not always based on the default priority order, as it depends on the specific conditions outlined in scenarios 1, 2, and 3 of Section 6.3.3.

@jhauser-us
Copy link
Collaborator

Yes, follow the rules in Section 6.3.3. Comments like the one quoted at the top (about the "major interrupts outside the priority-configurable subset") are intended to be helpful, but the normative text (not in comments) has priority.

Modifying the quoted comment to account for SEI would make it more complicated, which may be worse for understanding. I'm not sure I know how to make it better.

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

3 participants