>From 0cd0c1346f9adb7b90df3e4e30a5904eeda33bfa Mon Sep 17 00:00:00 2001 From: Marc Bommert <m...@brightwise.de> Date: Sun, 26 Feb 2017 22:08:49 +0100 Subject: [PATCH] Fix off-by-one error in priority handling when reading VECTADDR: Also, if enabled, have the "current" priority bit (1<<i) set in s->prio_mask[i].
Signed-off-by: Marc Bommert <m...@brightwise.de> --- hw/intc/pl190.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c index 55ea15d..0369da8 100644 --- a/hw/intc/pl190.c +++ b/hw/intc/pl190.c @@ -80,12 +80,12 @@ static void pl190_update_vectors(PL190State *s) mask = 0; for (i = 0; i < 16; i++) { - s->prio_mask[i] = mask; if (s->vect_control[i] & 0x20) { n = s->vect_control[i] & 0x1f; mask |= 1 << n; } + s->prio_mask[i] = mask; } s->prio_mask[16] = mask; pl190_update(s); -- 2.5.0