diff --git a/src/peripherals/plic/plic.c b/src/peripherals/plic/plic.c index 9ea4466..1d3242a 100644 --- a/src/peripherals/plic/plic.c +++ b/src/peripherals/plic/plic.c @@ -116,7 +116,7 @@ uint8_t plic_update(plic_td *plic) /* qemu also seems to clear pending bit if it was already claimed */ assign_u32_bit(&plic->pending_bits[i], j, 0); } - else if((plic->priority[irq_id_count] > highest_prio)) + else if((plic->priority[irq_id_count] >= highest_prio)) { /* find irq with highest prio */ highest_prio = plic->priority[irq_id_count];