Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33996 )
Change subject: soc/intel: Replace uses of dev_find_slot() ......................................................................
Patch Set 4:
This is uncovering much havoc it seems. There are reports of P2SB and MEI devices hidden from the tree. Both with KBL FSP, I'm not sure what makes the difference. If nobody has the time to look into it, I fear we should revert.
I just had an idea how to work around the blob is hiding devices bugs. Add another setting for devicetree, beside `on`/`off` a `force` that marks the device as existing but potentially not probable. What do you think?
Since the device is hidden, to search for the node must be about accessing the devicetree configuration, not to do any pci_read/write_config (that would fail)?
OMG, you are right. I mixed up hiding mechanisms in my head. There is another device "hidden" in the way that only VID/DID return 0xffff. But that doesn't apply to all of Intel's messy devices.
First, we could modify PCI_BDF() macro to use __file__, __line__, that would make the error message useful and pinpoint location. Then, we could declare a wrapper to access dev->chip_info that also finds disconnected device configurations?
Sounds like a plan. Another idea just popped up (that I dis- carded earlier because I thought we could still access the hidden devices): If a device can be hidden by a blob. Maybe we shouldn't declare it as PCI device in the dt at all?
OR
Add Kconfig that allows for dev==NULL for pci_read/write_configX(), reads will return 0xFF and writes are being ignored.
I would have some concerns...