Skip to content

Commit e83c4bc

Browse files
authored
Merge pull request #133 from riscv-software-src/hstatus
Fix hstatus.VGEIN (#129)
2 parents 36d558f + 5b605b2 commit e83c4bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/csr/hstatus.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ hstatus:
133133
When `hstatus.VGEIN` != 0, it selects which bit of `hgeip` is currently active in VS-mode.
134134
135135
type(): |
136-
# if NUM_EXTERNAL_GUEST_INTERRUPTS+1 is a power of two (beacuse indexing in `hgeip` starts at 1),
136+
# if NUM_EXTERNAL_GUEST_INTERRUPTS+1 is 63 (beacuse indexing in `hgeip` starts at 1),
137137
# then the field accepts any value.
138138
# Otherwise, it accepts a restricted set of values
139-
if (power_of_2?<6>(NUM_EXTERNAL_GUEST_INTERRUPTS + 1)) {
139+
if (NUM_EXTERNAL_GUEST_INTERRUPTS == 63) {
140140
return CsrFieldType::RW;
141141
} else {
142142
return CsrFieldType::RWR;

0 commit comments

Comments
 (0)