ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36221 )
Change subject: Add configurable ramstage support for minimal PCI scanning ......................................................................
Patch Set 9:
You should ask its author, it wasn't merged too long ago, IIRC. Still my question remains, what is wrong with `.on_mainboard`?
To me, that's not the same as mandatory. on_mainboard means just that -- it's a non-removable device of some sort. We originally added it for devices soldered on to the board that could not be removed.
Mandatory means "present and must be configured". Just because a device is on_mainboard does not mean we want to scan it in coreboot. I view those as different things.
The idea of mandatory is that it is hardware that must be enabled or we can't load a payload. We learned on the q35 that 0:00.0 was mandatory, and also that 0:1f.0 was mandatory. No other devices need be scanned.
The reason I like this way of changing the pci scan code, for a first pass, is that the footprint and impact of the change is tiny. This slight change to behavior doesn't involve a lot of code, and it makes it look like only those devices marked mandatory were found. I believe this lets us test the idea -- that a Linux can function correctly with minimal PCI setup -- across a wide range of boards to make sure nothing gets broken. It's a very slight change that lets us easily test the idea. The default is that it doesn't work.
So, small code space impact, small binary size impact, defaults to off -- I'm comfortable with that as opposed to the earlier, more far-reaching changes.