aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp/skx
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2020-11-06 12:53:33 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-11-16 11:07:16 +0000
commita1cc557d614c8ea6822c8dada5aeb049cf685826 (patch)
treee34be00ba12ffe474ee740ee9ea5c663220e1979 /src/soc/intel/xeon_sp/skx
parentc8e86de3feff539e863562f3d4d896815aff2e70 (diff)
soc/intel/xeon_sp: Synchronize DMAR and MADT IOAPIC id's
Add a soc specific callback for getting the IIO IOAPIC enumeration ID. Tested on ocp/deltalake. Change-Id: Id504c2159066e6cddd01d30649921447bef17b12 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47302 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Diffstat (limited to 'src/soc/intel/xeon_sp/skx')
-rw-r--r--src/soc/intel/xeon_sp/skx/include/soc/pci_devs.h12
-rw-r--r--src/soc/intel/xeon_sp/skx/soc_util.c21
2 files changed, 21 insertions, 12 deletions
diff --git a/src/soc/intel/xeon_sp/skx/include/soc/pci_devs.h b/src/soc/intel/xeon_sp/skx/include/soc/pci_devs.h
index b500c2896c..02df790460 100644
--- a/src/soc/intel/xeon_sp/skx/include/soc/pci_devs.h
+++ b/src/soc/intel/xeon_sp/skx/include/soc/pci_devs.h
@@ -161,17 +161,5 @@
// ========== IOAPIC Definitions for DMAR/ACPI ========
#define PCH_IOAPIC_ID 0x08
-#define PC00_IOAPIC_ID 0x09
-#define PC01_IOAPIC_ID 0x0A
-#define PC02_IOAPIC_ID 0x0B
-#define PC03_IOAPIC_ID 0x0C
-#define PC04_IOAPIC_ID 0x0D
-#define PC05_IOAPIC_ID 0x0E
-#define PC06_IOAPIC_ID 0x0F
-#define PC07_IOAPIC_ID 0x10
-#define PC08_IOAPIC_ID 0x11
-#define PC09_IOAPIC_ID 0x12
-#define PC10_IOAPIC_ID 0x13
-#define PC11_IOAPIC_ID 0x14
#endif /* _SOC_PCI_DEVS_H_ */
diff --git a/src/soc/intel/xeon_sp/skx/soc_util.c b/src/soc/intel/xeon_sp/skx/soc_util.c
index 7d95ae8600..b903249e1d 100644
--- a/src/soc/intel/xeon_sp/skx/soc_util.c
+++ b/src/soc/intel/xeon_sp/skx/soc_util.c
@@ -148,3 +148,24 @@ int soc_get_stack_for_port(int port)
else
return -1;
}
+
+uint8_t soc_get_iio_ioapicid(int socket, int stack)
+{
+ uint8_t ioapic_id = socket ? 0xf : 0x9;
+ switch (stack) {
+ case CSTACK:
+ break;
+ case PSTACK0:
+ ioapic_id += 1;
+ break;
+ case PSTACK1:
+ ioapic_id += 2;
+ break;
+ case PSTACK2:
+ ioapic_id += 3;
+ break;
+ default:
+ return 0xff;
+ }
+ return ioapic_id;
+}