-
Notifications
You must be signed in to change notification settings - Fork 44
Modify Smaia extension and add Machine-Level AIA CSRs (Phase 1 of Issue #566) #851
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments to get started. This one is tricky, and is probably going to need some schema adjustments to represent conditional aliasing.
RESERVED: | ||
location: 31-28 | ||
base: 32 | ||
type: RO | ||
reset_value: 0 | ||
description: Reserved. Always reads as 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this; unspecified bits are reserved
Bits corresponding to unsupported or unimplemented interrupts must be read-only zero. | ||
|
||
fields: | ||
midelegh: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field names need to be UPPERCASE
location: 31-0 | ||
type: RW-R | ||
sw_write(csr_value): | | ||
|
||
description: | | ||
Interrupt delegation bits 32-63. Each bit, when set, delegates the corresponding | ||
interrupt to HS/S-mode. Bits corresponding to unimplemented or non-delegatable interrupts | ||
are read-only zero. | ||
reset_value: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the spec, UDB treats the individual bits of m[i|e]deleg as separate fields. In this case, I think there aren't any standard interrupts > 31, so this CSR has an empty fields right now:
fields: []
mieh: | ||
location: 31-0 | ||
type: RW-R | ||
sw_write(csr_value): | | ||
description: | | ||
Interrupt enable bits 32-63. Each bit enables the corresponding interrupt | ||
if supported. Unsupported bits are read-only zero. | ||
reset_value: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, empty fields
location: 31-0 | ||
type: RW | ||
description: | | ||
Interrupt-pending bits 32 through 63. Each bit corresponds to an interrupt | ||
source above bit 31 in the full `mip` register. These bits reflect interrupt | ||
pending status and are writable in M-mode. | ||
reset_value: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
IPRIO: | ||
location: 7-0 | ||
base: 32 | ||
type: RO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be RO-H (read only with hardware update)
IID: | ||
location: 27-16 | ||
base: 32 | ||
type: RO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RO-H
description: | | ||
Supervisor software interrupt enable. May be writable or read-only zero depending on platform. | ||
When 1, allows delegation of SSIP via `mvip` even if not delegated via `mideleg`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a parameter for this. it will affect type(), and probably reset_value()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces initial support for the Smaia (Machine-Level Advanced Interrupt Architecture) extension, addressing Issue #566.
New Machine-Level CSRs Added:
These CSRs represent Phase 1 of the implementation, covering machine-level functionality. Supervisor- and VS-level CSRs will be added in a follow-up phase.