Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41384 )
Change subject: device/pci_device: Add notion of "hidden" PCI devices ......................................................................
Patch Set 2:
(1 comment)
Patch Set 2: Code-Review+2
How to handle devices that can be unhidden by coreboot? For example the P2SB can be made visible again, removing the need for such a change. Would I mark this device as hidden, too?
That depends on when it's hidden / unhidden. If it is hidden during PCI enumeration, and that causes problems (you still want to do something with the struct device), you can mark it hidden, and then you can still use device_operations callbacks to perform work during ramstage. If it is hidden during enumeration and we would still like to hang its PCI resources off of that device, we could certainly look at marking it hidden as well.
https://review.coreboot.org/c/coreboot/+/41384/2/src/device/pci_device.c File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/41384/2/src/device/pci_device.c@788 PS2, Line 788: 0
We should be using NULL for pointers.
Ack, will also fix pci_bus_ops_pci above.