aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp/cpx/chip.h
diff options
context:
space:
mode:
authorJonathan Zhang <jonzhang@fb.com>2020-04-02 17:27:54 -0700
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2020-06-04 15:42:10 +0000
commit7919d618f8ffd742df1e5d4804656b20412f4999 (patch)
tree7cdb6c95a1401efc5354e85a3e16d3b22a7747c4 /src/soc/intel/xeon_sp/cpx/chip.h
parentbd3245c2075c4915b2256593b414c8355d31001a (diff)
soc/intel/xeon_sp/cpx: add chip operation and PCIe enumeration
Add PCIe enumeration and resource assignment/allocation. Xeon-SP processor family has split IIO design, where PCIe domain 0 is split into multiple stacks. Each stack has its own resource ranges (eg. IO resource, mem32 resource, mem64 resource). The stack itself is not PCIe device, it does not have config space to be probed/programmed. The stack is programmed by FSP. coreboot needs to take into account of stack when doing PCIe enumeration and resource allocation. Current coreboot PCIe resource allocator does not support the concept of split IIO stack, thus entire support is done locally in this patch. In near future, improvements will be done, first generalize for xeon-sp, then generalize for coreboot PCIe device code. Signed-off-by: Jonathan Zhang <jonzhang@fb.com> Signed-off-by: Reddy Chagam <anjaneya.chagam@intel.com> Change-Id: If461b1dc1f313d98b676dc9e91d08a1dbb9cb388 Reviewed-on: https://review.coreboot.org/c/coreboot/+/40110 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src/soc/intel/xeon_sp/cpx/chip.h')
-rw-r--r--src/soc/intel/xeon_sp/cpx/chip.h54
1 files changed, 53 insertions, 1 deletions
diff --git a/src/soc/intel/xeon_sp/cpx/chip.h b/src/soc/intel/xeon_sp/cpx/chip.h
index 87dd2b30b5..6bf7272572 100644
--- a/src/soc/intel/xeon_sp/cpx/chip.h
+++ b/src/soc/intel/xeon_sp/cpx/chip.h
@@ -3,13 +3,65 @@
#ifndef _SOC_CHIP_H_
#define _SOC_CHIP_H_
-#include <stdint.h>
#include <intelblocks/cfg.h>
+#include <soc/irq.h>
+#include <stdint.h>
struct soc_intel_xeon_sp_cpx_config {
/* Common struct containing soc config data required by common code */
struct soc_intel_common_config common_soc_config;
+ /**
+ * Interrupt Routing configuration
+ * If bit7 is 1, the interrupt is disabled.
+ */
+ uint8_t pirqa_routing;
+ uint8_t pirqb_routing;
+ uint8_t pirqc_routing;
+ uint8_t pirqd_routing;
+ uint8_t pirqe_routing;
+ uint8_t pirqf_routing;
+ uint8_t pirqg_routing;
+ uint8_t pirqh_routing;
+
+ /**
+ * Device Interrupt Routing configuration
+ * Interrupt Pin x Route.
+ * 0h = PIRQA#
+ * 1h = PIRQB#
+ * 2h = PIRQC#
+ * 3h = PIRQD#
+ * 4h = PIRQE#
+ * 5h = PIRQF#
+ * 6h = PIRQG#
+ * 7h = PIRQH#
+ */
+ uint16_t ir00_routing;
+ uint16_t ir01_routing;
+ uint16_t ir02_routing;
+ uint16_t ir03_routing;
+ uint16_t ir04_routing;
+
+ /**
+ * Device Interrupt Polarity Control
+ * ipc0 - IRQ-00-31 - 1: Active low to IOAPIC, 0: Active high to IOAPIC
+ * ipc1 - IRQ-32-63 - 1: Active low to IOAPIC, 0: Active high to IOAPIC
+ * ipc2 - IRQ-64-95 - 1: Active low to IOAPIC, 0: Active high to IOAPIC
+ * ipc3 - IRQ-96-119 - 1: Active low to IOAPIC, 0: Active high to IOAPIC
+ */
+ uint32_t ipc0;
+ uint32_t ipc1;
+ uint32_t ipc2;
+ uint32_t ipc3;
+
+ uint64_t turbo_ratio_limit;
+ uint64_t turbo_ratio_limit_cores;
+
+ uint32_t pstate_req_ratio;
+
+ uint32_t coherency_support;
+ uint32_t ats_support;
+
/* Generic IO decode ranges */
uint32_t gen1_dec;
uint32_t gen2_dec;