Attention is currently required from: Jérémy Compostella.

Patrick Rudolph has uploaded this change for review.

View Change

cpu/x86/smm/pci_resource_store: Allow devices with no resources

When a device with no resource is passed it will keep overwriting
the current slot. Remove the conditional and allow a PCI device
to not have any resources.

This is particular useful for the next commits that makes use
of the PCI resource store to pass UBOX devices to SMM that allow
to lock-down SMM from within an SMI handler. Those devices do
not have any resources and cannot be hardcoded in SMM as their
PCI segment group and bus number varies depending on socket
count, CPU discovery and configuration.

Change-Id: I1a1b5944c97da5be6b9794c653b5159683f492e5
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
M src/cpu/x86/smm/pci_resource_store.c
1 file changed, 0 insertions(+), 4 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/80246/1
diff --git a/src/cpu/x86/smm/pci_resource_store.c b/src/cpu/x86/smm/pci_resource_store.c
index f1d3e28..b1e61a9 100644
--- a/src/cpu/x86/smm/pci_resource_store.c
+++ b/src/cpu/x86/smm/pci_resource_store.c
@@ -37,10 +37,6 @@
slots[i_slot].vendor_id = devices[i_dev]->vendor;
slots[i_slot].device_id = devices[i_dev]->device;

- /* Use the resource list to get our BARs. */
- if (!devices[i_dev]->resource_list)
- continue;
-
size_t i_res = 0;
for (const struct resource *res = devices[i_dev]->resource_list; res != NULL;
res = res->next) {

To view, visit change 80246. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I1a1b5944c97da5be6b9794c653b5159683f492e5
Gerrit-Change-Number: 80246
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella@intel.com>
Gerrit-Attention: Jérémy Compostella <jeremy.compostella@intel.com>
Gerrit-MessageType: newchange