mirror of
https://github.com/qemu/qemu.git
synced 2025-10-25 03:03:32 +00:00
We can't allow the supervisor to control SEIP as this would allow the supervisor to clear a pending external interrupt which will result in lost a interrupt in the case a PLIC is attached. The SEIP bit must be hardware controlled when a PLIC is attached. This logic was previously hard-coded so SEIP was always masked even if no PLIC was attached. This patch adds riscv_cpu_claim_interrupts so that the PLIC can register control of SEIP. In the case of models without a PLIC (spike), the SEIP bit remains software controlled. This interface allows for hardware control of supervisor timer and software interrupts by other interrupt controller models. Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Sagar Karandikar <sagark@eecs.berkeley.edu> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Cc: Alistair Francis <Alistair.Francis@wdc.com> Signed-off-by: Michael Clark <mjc@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com> |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile.objs | ||
| riscv_hart.c | ||
| riscv_htif.c | ||
| sifive_clint.c | ||
| sifive_e.c | ||
| sifive_plic.c | ||
| sifive_prci.c | ||
| sifive_test.c | ||
| sifive_u.c | ||
| sifive_uart.c | ||
| spike.c | ||
| virt.c | ||