Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86386?usp=email )
Change subject: device/pci_rom: Support non VGA iGPUs ......................................................................
device/pci_rom: Support non VGA iGPUs
Recent AMD iGPUs are not VGA compatible any more, thus they don't identify themself as "VGA compatible" any more by the PCI class code. Since the PCI VGA Option ROM code assumes it only runs on VGA compatible devices, relax the ACPI code part to handle display devices as well. In order to run a VBIOS in coreboot it still must be VGA compatible, but for ACPI table generation, where no code is run, it's not necessary any more.
The new code allows to use Linux's amdgpu driver on AMD/glinda.
TEST: On amd/birman+ the amdgpu kernel drivers starts and dmesg shows: [ 3.010224] [drm] amdgpu kernel modesetting enabled.
The coreboot log shows:
[INFO ] CBFS: Found 'pci1002,150e.rom' @0x10a40 size 0x4400 in mcache @0x1b7dd184 [DEBUG] In CBFS, ROM address for PCI: 00:02:00.0 = 0xff012a6c [DEBUG] Class Code mismatch ROM 00030000, dev 00038000 [DEBUG] Copying non-VGA ROM image from 0xff012a6c to 0x000d0000, 0x4400 bytes [...] Copying initialized VBIOS image from 0x000d0000 [DEBUG] ACPI: * VFCT at 1b5cb960
Change-Id: I623cd80b45b148b91f2796b22a589bbede0feeeb Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/device/pci_rom.c 1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/86386/1
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index 70e18ab..b05cc8b 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -210,10 +210,7 @@ }
printk(BIOS_DEBUG, " Copying %sVBIOS image from %p\n", - rom == (struct rom_header *) - (uintptr_t)PCI_VGA_RAM_IMAGE_START ? - "initialized " : "", - rom); + ((uintptr_t)rom < MiB) ? "initialized " : "", rom);
header->DeviceID = device->device; header->VendorID = device->vendor; @@ -233,8 +230,8 @@ pci_rom_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp) { - /* Only handle VGA devices */ - if ((device->class >> 8) != PCI_CLASS_DISPLAY_VGA) + /* Only handle display devices */ + if ((device->class >> 16) != PCI_BASE_CLASS_DISPLAY) return current;
/* Only handle enabled devices */