summaryrefslogtreecommitdiff
path: root/src/soc/intel/broadwell/acpi.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-10-26 00:08:47 +0100
committerMichael Niewöhner <foss@mniewoehner.de>2020-11-13 13:17:20 +0000
commita472e33634b7c9709fccb3c60d1d21b2c75e1347 (patch)
treec4454c9269da198b87ab83941be9952741fc8342 /src/soc/intel/broadwell/acpi.c
parentc29d8e046804cc922d84feb092caa9d6088f7b2b (diff)
downloadcoreboot-a472e33634b7c9709fccb3c60d1d21b2c75e1347.tar.xz
broadwell: Factor out `acpi_fill_madt` function
It is identical for all Broadwell mainboards, thus deduplicate it. Change-Id: I74559fbe42e44aa4d15ced5d88f6c15a1bf5203b Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46792 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/broadwell/acpi.c')
-rw-r--r--src/soc/intel/broadwell/acpi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/soc/intel/broadwell/acpi.c b/src/soc/intel/broadwell/acpi.c
index 1b4db1dae6..3d5e74ae5c 100644
--- a/src/soc/intel/broadwell/acpi.c
+++ b/src/soc/intel/broadwell/acpi.c
@@ -3,6 +3,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
+#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
#include <cbmem.h>
#include <device/pci_ops.h>
@@ -496,12 +497,18 @@ unsigned long northbridge_write_acpi_tables(const struct device *const dev,
return current;
}
-unsigned long acpi_madt_irq_overrides(unsigned long current)
+unsigned long acpi_fill_madt(unsigned long current)
{
int sci = acpi_sci_irq();
acpi_madt_irqoverride_t *irqovr;
uint16_t flags = MP_IRQ_TRIGGER_LEVEL;
+ /* Local APICs */
+ current = acpi_create_madt_lapics(current);
+
+ /* IOAPIC */
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, 2, IO_APIC_ADDR, 0);
+
/* INT_SRC_OVR */
irqovr = (void *)current;
current += acpi_create_madt_irqoverride(irqovr, 0, 0, 2, 0);