(interrupts): clean up PLIC addresses

This commit is contained in:
Liam Kerr 2026-02-12 02:32:00 +00:00
parent c875a2c35c
commit e3d0c0bab0
2 changed files with 1 additions and 2 deletions

View file

@ -116,7 +116,7 @@ void handle_interrupt(unsigned long code)
case 7: case 7:
break; // timer Interrupt. Ignoring for now. break; // timer Interrupt. Ignoring for now.
case 11: case 11:
volatile uint32_t *claim_reg = (uint32_t *)PLIC_CLAIM_COMPLETE; volatile uint32_t *claim_reg = (uint32_t *)PLIC_CLAIM(0);
uint32_t irq = *claim_reg; uint32_t irq = *claim_reg;
if (irq == 10) if (irq == 10)
{ {

View file

@ -2,7 +2,6 @@
#define PLIC_H #define PLIC_H
#define PLIC_BASE 0x0c000000UL #define PLIC_BASE 0x0c000000UL
#define PLIC_CLAIM_COMPLETE 0x0c200004
// Priorities: 4 bytes per IRQ (IRQ 0 is reserved/null) // Priorities: 4 bytes per IRQ (IRQ 0 is reserved/null)
#define PLIC_PRIORITY(irq) ((volatile uint32_t *)(PLIC_BASE + (irq) * 4)) #define PLIC_PRIORITY(irq) ((volatile uint32_t *)(PLIC_BASE + (irq) * 4))