plic: fix multiple bugs, virtio working again
In order of severity - claim access didn't work (word vs byte index confusion) - 0-based/1-based confusion cased pending to not match actual irq - reading claim must clear the pending interrupt - disabled sources still triggered - context assignement wasn't respected - contexts weren't being distinguished - VIRTIO_IRQ assignment clashing with hardwired devices Note, this is the minimal change I could make to get it fixed. It still doesn't handle priorities and the code is in desperate need of restructuring (and name fixing). The PLIC in QEMU (sifive_plic.c) is very clean and should be use as gold standard.
parent
2077b288
Please register or sign in to comment