From 3dde409d5e84426c6ab3285743235b20099c0908 Mon Sep 17 00:00:00 2001 From: Franz Flasch Date: Fri, 23 Jun 2023 13:28:42 +0000 Subject: [PATCH] Fix bug in plic priority handling, fixes running kernel >= 6.x --- src/peripherals/plic/plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];