diff options
author | Lance Zhao <lijian.zhao@intel.com> | 2015-11-16 18:33:21 -0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-04-11 18:19:34 +0200 |
commit | 2fc82d699d23cf3136a25e06972f90a9fc4909ab (patch) | |
tree | 11de2e09adaea5d3a761bb52bcf66b939654b4d8 /src | |
parent | 186b9de95d8dfd6a944879915729ea75b7f3448a (diff) |
soc/apollolake/acpi: Fill in ACPI MADT table
ACPI MADT tables required to describe the multiprocessor interrupt
routing. Apollolake SOC also have the interrupt override table like
other x86 silicons.
Change-Id: I85976e227963c950aad4476d68581b96e1090559
Signed-off-by: Lance Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/13373
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/apollolake/acpi.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c index 3677477f40..93602b9e8c 100644 --- a/src/soc/intel/apollolake/acpi.c +++ b/src/soc/intel/apollolake/acpi.c @@ -11,6 +11,8 @@ */ #include <arch/acpi.h> +#include <arch/ioapic.h> +#include <arch/smp/mpspec.h> #include <cpu/x86/smm.h> #include <soc/acpi.h> #include <soc/iomap.h> @@ -25,15 +27,36 @@ unsigned long acpi_fill_mcfg(unsigned long current) return current; } -unsigned long acpi_fill_madt(unsigned long current) +static int acpi_sci_irq(void) +{ + int sci_irq = 9; + return sci_irq; +} + +static unsigned long acpi_madt_irq_overrides(unsigned long current) { + int sci = acpi_sci_irq(); + uint16_t flags = MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW;; + + /* INT_SRC_OVR */ + current += acpi_create_madt_irqoverride((void *)current, 0, 0, 2, 0); + + /* SCI */ + current += acpi_create_madt_irqoverride((void *)current, 0, sci, sci, flags); + return current; } -static int acpi_sci_irq(void) +unsigned long acpi_fill_madt(unsigned long current) { - int sci_irq = 9; - return sci_irq; + /* Local APICs */ + current = acpi_create_madt_lapics(current); + + /* IOAPIC */ + current += acpi_create_madt_ioapic((void *) current, + 2, IO_APIC_ADDR, 0); + + return acpi_madt_irq_overrides(current); } void soc_fill_common_fadt(acpi_fadt_t * fadt) |