diff options
author | Shuo Liu <shuo.liu@intel.com> | 2024-03-26 22:57:18 +0800 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-05-02 14:31:21 +0000 |
commit | 1c39bccf7228252e126d565488f73baeef084c53 (patch) | |
tree | 1f3ff0d3d99f62ca6c47d7db4c0363cfa6571be3 /src | |
parent | 98077dc359e1885c176857661ee9ba25b31f0dd9 (diff) |
soc/intel/xeon_sp: Make NUMA support by default
TEST=Build and boot on intel/archercity CRB
Change-Id: I84f07c16e24e441a885144df8c805f1310acae29
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Co-authored-by: Ziang Wang <ziang.wang@intel.com>
Co-authored-by: Gang Chen <gang.c.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81439
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/xeon_sp/Makefile.mk | 3 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/cpx/soc_util.c | 5 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/numa.c | 5 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/skx/soc_util.c | 5 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/uncore.c | 14 |
5 files changed, 21 insertions, 11 deletions
diff --git a/src/soc/intel/xeon_sp/Makefile.mk b/src/soc/intel/xeon_sp/Makefile.mk index f4051eafa8..18a53acc50 100644 --- a/src/soc/intel/xeon_sp/Makefile.mk +++ b/src/soc/intel/xeon_sp/Makefile.mk @@ -11,9 +11,10 @@ romstage-y += romstage.c reset.c util.c spi.c pmutil.c memmap.c ddr.c romstage-y += ../../../cpu/intel/car/romstage.c ramstage-y += uncore.c reset.c util.c lpc.c spi.c ramstage.c chip_common.c ramstage-y += memmap.c pch.c lockdown.c finalize.c +ramstage-y += numa.c ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_PMC) += pmc.c pmutil.c ramstage-$(CONFIG_HAVE_ACPI_TABLES) += uncore_acpi.c acpi.c -ramstage-$(CONFIG_SOC_INTEL_HAS_CXL) += uncore_acpi_cxl.c numa.c +ramstage-$(CONFIG_SOC_INTEL_HAS_CXL) += uncore_acpi_cxl.c ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.c ramstage-$(CONFIG_XEON_SP_HAVE_IIO_IOAPIC) += iio_ioapic.c smm-y += smihandler.c pmutil.c diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c index 2d6005b08f..3472d589a8 100644 --- a/src/soc/intel/xeon_sp/cpx/soc_util.c +++ b/src/soc/intel/xeon_sp/cpx/soc_util.c @@ -136,3 +136,8 @@ bool is_memtype_processor_attached(uint16_t mem_type) { return true; } + +uint8_t get_cxl_node_count(void) +{ + return 0; +} diff --git a/src/soc/intel/xeon_sp/numa.c b/src/soc/intel/xeon_sp/numa.c index 62657dce1f..0186865e86 100644 --- a/src/soc/intel/xeon_sp/numa.c +++ b/src/soc/intel/xeon_sp/numa.c @@ -50,7 +50,6 @@ void fill_pds(void) /* Fill in processor domains */ uint8_t i, j, socket; - struct device *dev; for (socket = 0, i = 0; i < num_sockets; socket++) { if (!soc_cpu_is_enabled(socket)) continue; @@ -73,6 +72,7 @@ void fill_pds(void) if (num_cxlnodes == 0) return; +#if CONFIG(SOC_INTEL_HAS_CXL) /* There are CXL nodes, fill in generic initiator domain after the processors pds */ uint8_t skt_id, cxl_id; const CXL_NODE_SOCKET *cxl_hob = get_cxl_node(); @@ -83,7 +83,7 @@ void fill_pds(void) pds.pds[i].socket_bitmap = node.SocketBitmap; pds.pds[i].base = node.Address; pds.pds[i].size = node.Size; - dev = pcie_find_dsn(node.SerialNumber, node.VendorId, 0); + struct device *dev = pcie_find_dsn(node.SerialNumber, node.VendorId, 0); pds.pds[i].dev = dev; pds.pds[i].distances = malloc(sizeof(uint8_t) * pds.num_pds); if (!pds.pds[i].distances) @@ -97,6 +97,7 @@ void fill_pds(void) } } } +#endif } /* diff --git a/src/soc/intel/xeon_sp/skx/soc_util.c b/src/soc/intel/xeon_sp/skx/soc_util.c index 6f482466ce..0ccacfb73c 100644 --- a/src/soc/intel/xeon_sp/skx/soc_util.c +++ b/src/soc/intel/xeon_sp/skx/soc_util.c @@ -209,3 +209,8 @@ bool is_memtype_processor_attached(uint16_t mem_type) { return true; } + +uint8_t get_cxl_node_count(void) +{ + return 0; +} diff --git a/src/soc/intel/xeon_sp/uncore.c b/src/soc/intel/xeon_sp/uncore.c index a177a89d66..e4c4675855 100644 --- a/src/soc/intel/xeon_sp/uncore.c +++ b/src/soc/intel/xeon_sp/uncore.c @@ -338,14 +338,12 @@ static void mmapvtd_read_resources(struct device *dev) { int index = 0; - if (CONFIG(SOC_INTEL_HAS_CXL)) { - static bool once; - if (!once) { - /* Construct NUMA data structure. This is needed for CXL. */ - fill_pds(); - dump_pds(); - once = true; - } + static bool once; + if (!once) { + /* Construct NUMA data structure. This is needed for CXL. */ + fill_pds(); + dump_pds(); + once = true; } /* Read standard PCI resources. */ |