]> Git Repo - qemu.git/commitdiff
nvic: Make ICSR.RETTOBASE handle banked exceptions
authorPeter Maydell <[email protected]>
Tue, 12 Sep 2017 18:13:53 +0000 (19:13 +0100)
committerPeter Maydell <[email protected]>
Thu, 21 Sep 2017 15:29:27 +0000 (16:29 +0100)
Update the code in nvic_rettobase() so that it checks the
sec_vectors[] array as well as the vectors[] array if needed.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: 1505240046[email protected]

hw/intc/armv7m_nvic.c

index d745f383615d1653b11feb3a31d97817d081631b..0df5eaf294dad3401dd36a3a427e2a03bc8cd10c 100644 (file)
@@ -84,9 +84,12 @@ static int nvic_pending_prio(NVICState *s)
 static bool nvic_rettobase(NVICState *s)
 {
     int irq, nhand = 0;
+    bool check_sec = arm_feature(&s->cpu->env, ARM_FEATURE_M_SECURITY);
 
     for (irq = ARMV7M_EXCP_RESET; irq < s->num_irq; irq++) {
-        if (s->vectors[irq].active) {
+        if (s->vectors[irq].active ||
+            (check_sec && irq < NVIC_INTERNAL_VECTORS &&
+             s->sec_vectors[irq].active)) {
             nhand++;
             if (nhand == 2) {
                 return 0;
This page took 0.029603 seconds and 4 git commands to generate.