Add MPS entries for LINT interrupts.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 14 Nov 2009 18:49:06 +0000 (13:49 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 14 Nov 2009 18:49:06 +0000 (13:49 -0500)
Signed-off-by: Magnus Christensson <mch@virtutech.com>
src/mptable.c
src/mptable.h

index 8d6db59bd46a591fde1fc23cf95aef515a5fb441..1920dfe2e7b3e4f0fe32f6846fe35908f5bfc009 100644 (file)
@@ -23,7 +23,7 @@ mptable_init(void)
                   + sizeof(struct mpt_cpu) * MaxCountCPUs
                   + sizeof(struct mpt_bus)
                   + sizeof(struct mpt_ioapic)
-                  + sizeof(struct mpt_intsrc) * 16);
+                  + sizeof(struct mpt_intsrc) * 18);
     struct mptable_config_s *config = malloc_fseg(length);
     struct mptable_floating_s *floating = malloc_fseg(sizeof(*floating));
     if (!config || !floating) {
@@ -119,6 +119,27 @@ mptable_init(void)
     }
     entrycount += intsrc - intsrcs;
 
+    /* Local interrupt assignment */
+    intsrc->type = MPT_TYPE_LOCAL_INT;
+    intsrc->irqtype = 3; /* ExtINT */
+    intsrc->irqflag = 0; /* PO, EL default */
+    intsrc->srcbus = 0;
+    intsrc->srcbusirq = 0;
+    intsrc->dstapic = 0; /* BSP == APIC #0 */
+    intsrc->dstirq = 0; /* LINTIN0 */
+    intsrc++;
+    entrycount++;
+
+    intsrc->type = MPT_TYPE_LOCAL_INT;
+    intsrc->irqtype = 1; /* NMI */
+    intsrc->irqflag = 0; /* PO, EL default */
+    intsrc->srcbus = 0;
+    intsrc->srcbusirq = 0;
+    intsrc->dstapic = 0; /* BSP == APIC #0 */
+    intsrc->dstirq = 1; /* LINTIN1 */
+    intsrc++;
+    entrycount++;
+
     // Finalize config structure.
     config->entrycount = entrycount;
     config->length = (void*)intsrc - (void*)config;
index 4c4d52fb7bafe598c3067bffc76f85170a29758a..c4e3c51ab4c48341a343120064ab0fa714d7e9a2 100644 (file)
@@ -38,6 +38,7 @@ struct mptable_config_s {
 #define MPT_TYPE_BUS 1
 #define MPT_TYPE_IOAPIC 2
 #define MPT_TYPE_INTSRC 3
+#define MPT_TYPE_LOCAL_INT 4
 
 struct mpt_cpu {
     u8 type;