Attention is currently required from: Jason Nien, Matt DeVillier, Arthur Heymans, Martin Roth.
Martin L Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/73294 )
Change subject: mb/google/skyrim: Allow port descriptors to be overridden ......................................................................
Patch Set 2:
(1 comment)
File src/mainboard/google/skyrim/port_descriptors.c:
https://review.coreboot.org/c/coreboot/+/73294/comment/e41bb208_d44762ad PS2, Line 97: if (!*dxio_num || !*dxio_descs) : { : *dxio_descs = skyrim_mdn_dxio_descriptors; : *dxio_num = ARRAY_SIZE(skyrim_mdn_dxio_descriptors); : }
Does the compiler optimizes this out? If not, you might want a Kconfig override for DXIO overrides w […]
No, it the compiler won't optimize it out and it won't drop the table above either which is a bigger issue. The reason I did it this way though was to be as consistent as possible with other variant entries, such as the GPIO tables. Using weak functions is *definitely* not my preference, but it's consistent.
If there's a preference to drop the weak functions and just use a Kconfig variable instead, I can do it that way, but I expect the google preference will be the weak functions so that the code can just be dropped into the variant directory.
Personally, I agree with Arthur, and would rather use a Kconfig variable to determine if we're overriding the PCIe descriptors.