Skip to content

Commit d61d5d7

Browse files
Yannis Huberdeadprogram
authored andcommitted
Zero PLIC threshold value at startup
The PLIC threshold value must be zeroed at startup to permit all interrupt priorities. Fixes #1128.
1 parent c5a8967 commit d61d5d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/runtime_fe310.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ func main() {
2424
sifive.PLIC.ENABLE[0].Set(0)
2525
sifive.PLIC.ENABLE[1].Set(0)
2626

27+
// Zero the threshold value to allow all priorities of interrupts.
28+
sifive.PLIC.THRESHOLD.Set(0)
29+
2730
// Set the interrupt address.
2831
// Note that this address must be aligned specially, otherwise the MODE bits
2932
// of MTVEC won't be zero.

0 commit comments

Comments
 (0)