Initialize interrupt priority to 0 on all sources.

Without this hardware raises an interrupt regardless of any
pending bits set.

This fixes operation on RocketChip and derivatives (e.g. lowRISC).

Approved by:	re (kib)
Sponsored by:	DARPA, AFRL
This commit is contained in:
Ruslan Bukin 2018-10-12 15:51:41 +00:00
parent 78a3652794
commit 05efeb8430
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339332

View File

@ -218,6 +218,7 @@ plic_attach(device_t dev)
if (error != 0)
return (error);
WR4(sc, PLIC_PRIORITY(irq), 0);
WR4(sc, PLIC_ENABLE(irq, cpu), 0);
}
WR4(sc, PLIC_THRESHOLD(cpu), 0);