Commit b5d66607 authored by Tommy Thorn's avatar Tommy Thorn Committed by Jose Renau
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment