--- 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 0c07cfb..b93d50a 100644 --- a/src/mptable.c +++ b/src/mptable.c @@ -31,7 +31,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) { @@ -90,7 +90,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]; @@ -127,6 +127,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;