summaryrefslogtreecommitdiff
path: root/src/soc/intel/braswell/acpi.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-01-28 12:22:52 +0100
committerNico Huber <nico.h@gmx.de>2021-03-12 15:41:35 +0000
commit18edd0008c1cfd7d0c61dcceb02cbfea03d464bf (patch)
treed8cf8145d36a486340148e408e31971e5bc25167 /src/soc/intel/braswell/acpi.c
parentd37cfb766942748782dd866ec986dc36538836a2 (diff)
downloadcoreboot-18edd0008c1cfd7d0c61dcceb02cbfea03d464bf.tar.xz
soc/intel/braswell: Factor out common `acpi_fill_madt`
Function is identical for all mainboards, so factor it out. Change-Id: Ibe08fa7ae19bfc238d09158309f0a9fdb31ad21c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50028 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/braswell/acpi.c')
-rw-r--r--src/soc/intel/braswell/acpi.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/soc/intel/braswell/acpi.c b/src/soc/intel/braswell/acpi.c
index c55632c4e5..2d7ca3c9ca 100644
--- a/src/soc/intel/braswell/acpi.c
+++ b/src/soc/intel/braswell/acpi.c
@@ -3,8 +3,9 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
-#include <device/mmio.h>
+#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
+#include <device/mmio.h>
#include <console/console.h>
#include <cpu/intel/turbo.h>
#include <cpu/x86/msr.h>
@@ -305,7 +306,7 @@ void generate_cpu_entries(const struct device *device)
acpigen_write_processor_cnot(pattrs->num_cpus);
}
-unsigned long acpi_madt_irq_overrides(unsigned long current)
+static unsigned long acpi_madt_irq_overrides(unsigned long current)
{
int sci_irq = acpi_sci_irq();
acpi_madt_irqoverride_t *irqovr;
@@ -326,6 +327,19 @@ unsigned long acpi_madt_irq_overrides(unsigned long current)
return current;
}
+unsigned long acpi_fill_madt(unsigned long current)
+{
+ /* Local APICs */
+ current = acpi_create_madt_lapics(current);
+
+ /* IOAPIC */
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, 2, IO_APIC_ADDR, 0);
+
+ current = acpi_madt_irq_overrides(current);
+
+ return current;
+}
+
unsigned long southcluster_write_acpi_tables(const struct device *device, unsigned long current,
struct acpi_rsdp *rsdp)
{