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

AR: Update priority table from latest privspec #897

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Conversation

timsifive
Copy link
Contributor

Addresses #892.

Here's the privspec table:
image

And here is what ours looks like:
image

@pdonahue-ventana
Copy link
Collaborator

What you pasted above doesn't match the latest table 7 from https://github.com/riscv/riscv-isa-manual/blob/main/src/hypervisor.adoc#trap-cause-codes. It's missing guest-page faults, virtual instructions, and maybe more.

@timsifive
Copy link
Contributor Author

I copied the table from https://github.com/riscv/riscv-isa-manual/blob/d924944fa58d21547ee72fd3fec6020ef2f3337c/src/machine.adoc#exception-priority

How does this work? Clearly the machine table is the base one. Then the hypervisor one is an extension of that. Is there a supervisor one that also extends it? How do we know what is the right one for Debug to extend?

I'm inclined to say that the machine mode one provides a good reference. Adding hypervisor or other extension causes is left as an exercise to the reader.

@pdonahue-ventana
Copy link
Collaborator

The hypervisor table is a superset. If you don't implement the H extension then you can still use the hypervisor table and just ignore the exceptions that are N/A like virtual instruction or guest-page fault. And if you don't implement the A extension then you ignore things about AMOs. And if you just have a M-only or M+U implementation then you ignore page faults. etc.

@timsifive
Copy link
Contributor Author

Alright. I've updated based on the other exception priority table in the privspec. I guess I'm just grumpy that there is more than one.

Privspec table:
image

New debug spec table:
image

Copy link
Collaborator

@pdonahue-ventana pdonahue-ventana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@timsifive timsifive merged commit 79e257b into master Oct 6, 2023
@timsifive timsifive deleted the priority branch October 6, 2023 16:48
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

Successfully merging this pull request may close these issues.

2 participants