thermosphere: vgic: fix OOB accesses, fix icfgr and itargetsr handling

qemu actually allows SPIs to use the N-N model
This commit is contained in:
TuxSH
2020-01-05 00:33:35 +00:00
parent 81a3b4fff5
commit 7d30fce54c
4 changed files with 62 additions and 49 deletions

View File

@@ -18,9 +18,11 @@
#include "types.h"
#define GIC_IRQID_MAX 1020
#define GIC_IRQID_SPURIOUS_GRPNEEDACK (GIC_IRQID_MAX + 2)
#define GIC_IRQID_SPURIOUS (GIC_IRQID_MAX + 3)
#define GIC_IRQID_MAX 1019
#define GIC_IRQID_RESERVED_START 1020
#define GIC_IRQID_SPURIOUS_GRPNEEDACK (GIC_IRQID_RESERVED_START + 2)
#define GIC_IRQID_SPURIOUS (GIC_IRQID_RESERVED_START + 3)
#define GICV_PRIO_LEVELS 32
#define GICV_IDLE_PRIORITY 0xF8 // sometimes 0xFF