Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(d1): make
Plic::mask
actually do that (#348)
PR #312 (commit df41dec) inadvertently broke the `Plic` method to mask an interrupt by copy-pasting the code from `Plic::unmask`. Previously, `Plic::unmask` would write `MIE[offset]| irq_en` to `MIE[offset]`, setting the `IRQ_EN` bit for that interrupt; while `Plic::mask` would write `MIE[offset] & !irq_en` to `MIE[offset]`, unsetting the `IRQ_EN` bit. But now they both *set* the `IRQ_EN` bit, so masking an interrupt actually unmasks it. Whoopsie. This seems to have occurred because I'm a LOSER FUCKING IDIOT. This commit puts it back the way it was supposed to be. Sorry. Fixes #347
- Loading branch information