[PATCH 06/10] Add MPS entries for LINT interrupts.

Magnus Christensson mch at virtutech.com
Tue Nov 3 12:52:07 CET 2009


---
 src/mptable.c |   23 +++++++++++++++++++++--
 src/mptable.h |    1 +
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/mptable.c b/src/mptable.c
index 7e8486d..b91591d 100644
--- a/src/mptable.c
+++ b/src/mptable.c
@@ -22,7 +22,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) {
@@ -94,7 +94,7 @@ mptable_init(void)
             break;
     }
 
-    config->entrycount = actual_cpu_count + 2 + 16;
+    config->entrycount = actual_cpu_count + 2 + 16 + 2;
 
     /* isa bus */
     struct mpt_bus *bus = (void*)&cpus[actual_cpu_count];
@@ -131,6 +131,25 @@ mptable_init(void)
         intsrc++;
     }
 
+    /* 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++;
+
+    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++;
+
     // Set checksum.
     config->length = (void*)intsrc - (void*)config;
     config->checksum -= checksum(config, config->length);
diff --git a/src/mptable.h b/src/mptable.h
index 4c4d52f..c4e3c51 100644
--- a/src/mptable.h
+++ b/src/mptable.h
@@ -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;
-- 
1.6.2.5


--------------080100040501080908060605
Content-Type: text/x-patch;
 name="0007-Always-enable-the-IRQ0-override-if-the-VIRTUTECH_IRQ.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0007-Always-enable-the-IRQ0-override-if-the-VIRTUTECH_IRQ.pa";
 filename*1="tch"



More information about the coreboot mailing list