Attention is currently required from: Mike Banon. Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38202 )
Change subject: src/device/pci: Add support for discrete VGA initialization and OpROM loading ......................................................................
Patch Set 7: Code-Review-1
(4 comments)
Patchset:
PS7: This looks like a board/device specific hack, that cannot be generalised. Instead of modifying the pci_dev_init, why not have a PCI driver for the discrete GPU on your device with a different init function. It could even load the option rom at other available addresses, to not conflict with the VGA option ROM loading.
File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/38202/comment/9b819f43_6a6ebdfa PS7, Line 749: if (!CONFIG(VGA_ROM_RUN)) : return; One can assume that DISPLAY_OTHER does not decode VGA. So this makes sense.
https://review.coreboot.org/c/coreboot/+/38202/comment/7fb285fe_b21f479b PS7, Line 756: PCI_CLASS_DISPLAY_OTHER Why not create a PCI specific driver for your device to load the option ROM without executing it. I don't think this behavior should be generalised or guarded with vague Kconfig options.
https://review.coreboot.org/c/coreboot/+/38202/comment/e87a2046_ed40fa63 PS7, Line 776: pci_rom_load This always loads the rom at 0xC0000 which is generally used for the device decoding VGA. Why not have a device specific driver to also load roms at the next option ROM address 0xD0000?