提交 7a156413 编写于 作者: Y Yinan Xu

extintr: add one to PLIC enable bit

PLIC interrupt number starts at 1 instead of 0.
上级 aa2b97f9
......@@ -168,7 +168,8 @@ void random_trigger() {
for (int i = 0; i < (MAX_EXTERNAL_INTR + 31) / 32; i++) {
WRITE_WORD(INTR_RANDOM_ADDR(i), 0xffffffff);
}
for (int i = 0; i < (MAX_EXTERNAL_INTR + 31) / 32; i++) {
// Add one here because PLIC interrupt number starts at 1.
for (int i = 0; i < (MAX_EXTERNAL_INTR + 1 + 31) / 32; i++) {
WRITE_WORD(PLIC_ENABLE(CONTEXT_S) + i * 4, 0xffffffff);
}
void hello_intr_n(int n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册