soc/intel/xeon_sp: Use SocketID in NUMA table generation

Use the actual SocketID instead of the running index.

Change-Id: I9128909756d0dbb0c4dabc52acdc98cb2a4f7baa
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76558
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph 2023-07-14 17:50:52 +02:00 committed by Lean Sheng Tan
parent b403849a43
commit 92904bcdff
1 changed files with 2 additions and 1 deletions

View File

@ -29,6 +29,7 @@ enum cb_err fill_pds(void)
{ {
uint8_t num_sockets = soc_get_num_cpus(); uint8_t num_sockets = soc_get_num_cpus();
uint8_t num_cxlnodes = get_cxl_node_count(); uint8_t num_cxlnodes = get_cxl_node_count();
const IIO_UDS *hob = get_iio_uds();
/* /*
* Rules/assumptions: * Rules/assumptions:
@ -53,7 +54,7 @@ enum cb_err fill_pds(void)
struct device *dev; struct device *dev;
for (i = 0; i < num_sockets; i++) { for (i = 0; i < num_sockets; i++) {
pds.pds[i].pd_type = PD_TYPE_PROCESSOR; pds.pds[i].pd_type = PD_TYPE_PROCESSOR;
pds.pds[i].socket_bitmap = 1 << i; pds.pds[i].socket_bitmap = 1 << hob->PlatformData.IIO_resource[i].SocketID;
pds.pds[i].distances = malloc(sizeof(uint8_t) * pds.num_pds); pds.pds[i].distances = malloc(sizeof(uint8_t) * pds.num_pds);
if (!pds.pds[i].distances) if (!pds.pds[i].distances)
die("%s %d out of memory.", __FILE__, __LINE__); die("%s %d out of memory.", __FILE__, __LINE__);