This is more useful behaviour than forcing all tests which call apic_init() to
set up SPIV themselves to actually receive interrupts.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
cur_apic_mode = mode;
}
+ /*
+ * Enable the APIC. Use 0xff for the spurious vector, not that we expect
+ * to see any.
+ */
+ apic_write(APIC_SPIV, APIC_SPIV_APIC_ENABLED | 0xff);
+
return 0;
}
/* Local APIC register definitions. */
#define APIC_ID 0x020
#define APIC_LVR 0x030
+#define APIC_SPIV 0x0f0
+#define APIC_SPIV_APIC_ENABLED 0x00100
+
#define APIC_ICR 0x300
#define APIC_DM_NMI 0x00400
#define APIC_ICR_BUSY 0x01000