summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2023-02-28 09:17:40 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-23 15:15:55 +0000
commit57ddd682cefb924d84016a1d494f3e1483a5cff0 (patch)
treeaa7d56e3c0535cd230a6c9e25c74f24063717103 /src
parentc5d6af43fb544423fa103f523ac85356b3ff3725 (diff)
downloadcoreboot-57ddd682cefb924d84016a1d494f3e1483a5cff0.tar.gz
coreboot-57ddd682cefb924d84016a1d494f3e1483a5cff0.tar.bz2
coreboot-57ddd682cefb924d84016a1d494f3e1483a5cff0.zip
soc/intel/xeon_sp: Fix PCH IOAPIC ID
FSP may program a different ID under certain circumstances. Read IOAPIC ID from hardware instead of using some define that might not reflect how hardware is configured. Change-Id: Ia91cb4aef9d15520b8b3402ec10e7b0a4355caeb Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73390 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/xeon_sp/include/soc/pch_pci_devs.h3
-rw-r--r--src/soc/intel/xeon_sp/uncore_acpi.c9
2 files changed, 5 insertions, 7 deletions
diff --git a/src/soc/intel/xeon_sp/include/soc/pch_pci_devs.h b/src/soc/intel/xeon_sp/include/soc/pch_pci_devs.h
index de7a73a47222..4f34fe011175 100644
--- a/src/soc/intel/xeon_sp/include/soc/pch_pci_devs.h
+++ b/src/soc/intel/xeon_sp/include/soc/pch_pci_devs.h
@@ -58,7 +58,4 @@
#define PCH_IOAPIC_DEV_NUM 0x1F
#define PCH_IOAPIC_FUNC_NUM 0x00
-// ========== IOAPIC Definitions for DMAR/ACPI ========
-#define PCH_IOAPIC_ID 0x08
-
#endif
diff --git a/src/soc/intel/xeon_sp/uncore_acpi.c b/src/soc/intel/xeon_sp/uncore_acpi.c
index 89deb8866568..af53ebb590dc 100644
--- a/src/soc/intel/xeon_sp/uncore_acpi.c
+++ b/src/soc/intel/xeon_sp/uncore_acpi.c
@@ -2,6 +2,7 @@
#include <acpi/acpigen.h>
#include <arch/hpet.h>
+#include <arch/ioapic.h>
#include <assert.h>
#include <cbmem.h>
#include <cpu/x86/lapic.h>
@@ -223,10 +224,10 @@ static unsigned long acpi_create_drhd(unsigned long current, int socket,
if (socket == 0 && stack == CSTACK) {
union p2sb_bdf ioapic_bdf = p2sb_get_ioapic_bdf();
printk(BIOS_DEBUG, " [IOAPIC Device] Enumeration ID: 0x%x, PCI Bus Number: 0x%x, "
- "PCI Path: 0x%x, 0x%x\n",
- PCH_IOAPIC_ID, ioapic_bdf.bus, ioapic_bdf.dev, ioapic_bdf.fn);
- current += acpi_create_dmar_ds_ioapic(current, PCH_IOAPIC_ID,
- ioapic_bdf.bus, ioapic_bdf.dev, ioapic_bdf.fn);
+ "PCI Path: 0x%x, 0x%x\n", get_ioapic_id(VIO_APIC_VADDR), ioapic_bdf.bus,
+ ioapic_bdf.dev, ioapic_bdf.fn);
+ current += acpi_create_dmar_ds_ioapic_from_hw(current,
+ IO_APIC_ADDR, ioapic_bdf.bus, ioapic_bdf.dev, ioapic_bdf.fn);
}
// Add IOAPIC entry