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

Improved clarity regarding xcause when switching between CLIC and CLINT #408

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/clic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -970,13 +970,13 @@ through the trap handling process.
11:0 exccode[11:0] Exception/interrupt code
----

The `mcause.mpp` and `mcause.mpie` fields typically mirror the `mstatus.mpp` and
`mstatus.mpie` fields, and are aliased into `mcause` to reduce context
save/restore code. For backwards compatibility in implementations supporting both CLINT and CLIC modes, when
switching to CLINT mode the new CLIC {cause} state field
({pil}) is zeroed. The other new CLIC {cause} fields,
{pp} and {pie}, appear as zero in the {cause} CSR but the corresponding
state bits in the `mstatus` register are not cleared.
The `mcause.mpp` and `mcause.mpie` fields mirror the `mstatus.mpp` and
`mstatus.mpie` fields when in CLIC mode to reduce context
save/restore code.
Else, these fields read as zero.
For backwards compatibility in implementations supporting both CLINT and CLIC modes, when
switching to CLINT mode the new CLIC {cause}.{pil} state field
is zeroed.

If the hart is currently running at some privilege mode (`pp`) at some
interrupt level (`pil`) and an enabled interrupt becomes pending at
Expand Down
Loading