[PATCH 5/8] Add MPS entries for LINT interrupts.

Magnus Christensson mch at virtutech.com
Thu Nov 5 10:20:34 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 525188d..51b50db 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) {
@@ -88,7 +88,7 @@ mptable_init(void)
         }
     }
 
-    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];
@@ -125,6 +125,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


--------------010303080000070006010407
Content-Type: text/x-patch;
 name="0006-Properly-mask-value-for-MTRR-mask.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0006-Properly-mask-value-for-MTRR-mask.patch"



More information about the coreboot mailing list