Attention is currently required from: Tim Crawford, Nico Huber, Jeremy Soller. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49104 )
Change subject: soc/intel/cannonlake: Allow setting PCIe subsystem IDs after FSP SiliconInit ......................................................................
Patch Set 8:
(2 comments)
File src/soc/intel/cannonlake/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/49104/comment/4f6239a2_db0ba898 PS7, Line 540: reserved1
Done. I've left it unaligned, since it looks like only AGESA code does that.
I use bitfields on sandybridge and keep the numbers aligned, but Jenkins complains about the spacing around colons. In any case, not a big deal.
https://review.coreboot.org/c/coreboot/+/49104/comment/e305e39b_483c50c8 PS7, Line 582: params->SiNumberOfSsidTableEntry = i;
and if the devices are disabled, the entries shouldn't hurt. […]
Yeah, Nico's approach would be rather good. To avoid some redundancy, I'd use an array with the xHCI and HDA devfn's and a loop:
const pci_devfn_t devfn_table[] = { PCH_DEVFN_XHCI, PCH_DEVFN_HDA }; static struct svid_ssid_init_entry ssid_table[ARRAY_SIZE(devfn_table)];
for (i = 0; i < ARRAY_SIZE(devfn_table); i++) { ssid_table[i].reg = PCI_SUBSYSTEM_VENDOR_ID; ssid_table[i].device = PCI_SLOT(devfn_table[i]); ssid_table[i].function = PCI_FUNC(devfn_table[i]); dev = pcidev_path_on_root(devfn_table[i]); if (dev) { ssid_table[i].svid = dev->subsystem_vendor; ssid_table[i].ssid = dev->subsystem_device; } }
params->SiSsidTablePtr = (uintptr_t)ssid_table; params->SiNumberOfSsidTableEntry = ARRAY_SIZE(ssid_table);