Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82592?usp=email )
Change subject: [UNTESTED, WIP] device/pci_rom: handle non-remapped VGA_BIOS_ID ......................................................................
[UNTESTED, WIP] device/pci_rom: handle non-remapped VGA_BIOS_ID
While the SoC-level defaults for VGA_BIOS_ID are the expected correctly remapped PCI ID of the GPU, some mainboards override the VGA_BIOS_ID setting to the non-remapped PCI ID. This resulted in coreboot not finding the VBIOS file. The proper solution would be to not override this SoC-level config in neither the mainboard code nor some external config file. This however requires adding some mechanism to be able to tell SeaBIOS which VBIOS image to use for the GPU device.
This sort-of reverts parts of commit 42f0396a1028 ("device/pci_rom: rework PCI ID remapping in pci_rom_probe"), but it still tries to find the VBIOS image with the expected remapped PCI ID and only adds trying the non-remapped PCI ID as a fallback when the file with the remapped PCI ID doesn't exist and prints a warning in that case.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I7cd8e2036250f4ca2239b04cd070bbf0778b13aa --- M src/device/pci_rom.c 1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/82592/1
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index aca55d6..ef41a0b 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -69,6 +69,22 @@ mapped_vendev & 0xffff); }
+ /* Handle the case of VGA_BIOS_ID not being set to the remapped PCI ID. This is a + workaround that should be removed once the underlying issue is fixed. */ + if (!rom_header && (vendev != mapped_vendev || rev != mapped_rev)) { + if (CONFIG(CHECK_REV_IN_OPROM_NAME)) { + rom_header = cbfs_boot_map_optionrom_revision(vendev >> 16, + vendev & 0xffff, + rev); + } else { + rom_header = cbfs_boot_map_optionrom(vendev >> 16, + vendev & 0xffff); + } + if (rom_header) { + printk(BIOS_WARNING, "VGA_BIOS_ID should be the remapped PCI ID\n"); + } + } + if (rom_header) { printk(BIOS_DEBUG, "In CBFS, ROM address for %s = %p\n", dev_path(dev), rom_header);