Skip to content

Commit

Permalink
Merge pull request #133 from riscv-software-src/hstatus
Browse files Browse the repository at this point in the history
Fix hstatus.VGEIN (#129)
  • Loading branch information
dhower-qc authored Oct 18, 2024
2 parents 36d558f + 5b605b2 commit e83c4bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/csr/hstatus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ hstatus:
When `hstatus.VGEIN` != 0, it selects which bit of `hgeip` is currently active in VS-mode.
type(): |
# if NUM_EXTERNAL_GUEST_INTERRUPTS+1 is a power of two (beacuse indexing in `hgeip` starts at 1),
# if NUM_EXTERNAL_GUEST_INTERRUPTS+1 is 63 (beacuse indexing in `hgeip` starts at 1),
# then the field accepts any value.
# Otherwise, it accepts a restricted set of values
if (power_of_2?<6>(NUM_EXTERNAL_GUEST_INTERRUPTS + 1)) {
if (NUM_EXTERNAL_GUEST_INTERRUPTS == 63) {
return CsrFieldType::RW;
} else {
return CsrFieldType::RWR;
Expand Down

0 comments on commit e83c4bc

Please sign in to comment.