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

Fix MODE field description of mtvec register #1165

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

HepoH3
Copy link
Contributor

@HepoH3 HepoH3 commented Nov 22, 2023

Fix MODE field description in the mtvec register

In Section 1.6, "Exceptions, Traps, and Interrupts" of the unprivileged specification, a distinction is made between exceptions and interrupts.

Table 13 in the privileged specification uses the term "exceptions" as a catch-all expression, encompassing both "exceptions and interrupts" which may not be immediately apparent.

Reading "exceptions" merely as "exceptions" while seeing following word "interrupts" can led to believe that the 0th bit is used to control exception handling behavior, while the 1st bit is used to control interrupt handling behavior.

Fix MODE field description in the mtvec register

In Section 1.6, "Exceptions, Traps, and Interrupts" of the unprivileged
specification, a distinction is made between exceptions and interrupts.

Table 13 in the privileged specification uses the term "exceptions" as a
catch-all expression, encompassing both "exceptions and interrupts"
which may not be immediately apparent.

Reading "exceptions" merely as "exceptions" initially led me to believe
that the 0th bit is used to control exception handling behavior, while
the 1st bit is used to control interrupt handling behavior.



Signed-off-by: Andrei Solodovnikov <[email protected]>
Copy link
Member

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

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

Right, with the direct mode, both exceptions and interrupts set pc to BASE.

@aswaterman aswaterman merged commit b0040f3 into riscv:main Nov 22, 2023
2 checks passed
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