mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
Zero PLIC threshold value at startup
The PLIC threshold value must be zeroed at startup to permit all interrupt priorities. Fixes #1128.
This commit is contained in:
@@ -24,6 +24,9 @@ func main() {
|
||||
sifive.PLIC.ENABLE[0].Set(0)
|
||||
sifive.PLIC.ENABLE[1].Set(0)
|
||||
|
||||
// Zero the threshold value to allow all priorities of interrupts.
|
||||
sifive.PLIC.THRESHOLD.Set(0)
|
||||
|
||||
// Set the interrupt address.
|
||||
// Note that this address must be aligned specially, otherwise the MODE bits
|
||||
// of MTVEC won't be zero.
|
||||
|
||||
Reference in New Issue
Block a user