summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/Kconfig24
-rw-r--r--src/device/pci_rom.c24
2 files changed, 11 insertions, 37 deletions
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 404c73d250..0fe0a0923f 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -846,18 +846,18 @@ config VGA_BIOS_ID
depends on VGA_BIOS
default "1106,3230"
help
- The comma-separated PCI vendor and device ID with optional revision if that
- feature is enabled that would associate your vBIOS to your video card.
+ The comma-separated PCI vendor and device ID that would associate
+ your vBIOS to your video card.
- Example: 1106,3230 or 1106,3230,a3
+ Example: 1106,3230
In the above example 1106 is the PCI vendor ID (in hex, but without
the "0x" prefix) and 3230 specifies the PCI device ID of the
- video card (also in hex, without "0x" prefix). a3 specifies the revision.
+ video card (also in hex, without "0x" prefix).
This ID needs to match the PCI VID and DID in the VGA BIOS file's
header and also needs to match the value returned by map_oprom_vendev
- or map_oprom_vendev_rev if the remapping feature is used.
+ if the remapping feature is used.
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
@@ -879,23 +879,17 @@ config VGA_BIOS_SECOND_ID
string "Graphics device PCI IDs"
depends on VGA_BIOS_SECOND
help
- The comma-separated PCI vendor and device ID with optional revision if that
- feature is enabled that would associate your vBIOS to your video card.
+ The comma-separated PCI vendor and device ID that would associate
+ your vBIOS to your video card.
- Example: 1106,3230 or 1106,3230,a3
+ Example: 1106,3230
In the above example 1106 is the PCI vendor ID (in hex, but without
the "0x" prefix) and 3230 specifies the PCI device ID of the
- video card (also in hex, without "0x" prefix). a3 specifies the revision.
+ video card (also in hex, without "0x" prefix).
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
-config CHECK_REV_IN_OPROM_NAME
- def_bool n
- help
- Select this in the platform BIOS or chipset if the option rom has a revision
- that needs to be checked when searching CBFS.
-
config VGA_BIOS_DGPU
bool "Add a discrete VGA BIOS image"
depends on VGA_BIOS
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index aca55d6774..b9210b0d65 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -12,7 +12,6 @@
#include <acpi/acpigen.h>
/* Rmodules don't like weak symbols. */
-void __weak map_oprom_vendev_rev(u32 *vendev, u8 *rev) { return; }
u32 __weak map_oprom_vendev(u32 vendev) { return vendev; }
void vga_oprom_preload(void)
@@ -39,35 +38,16 @@ static void *cbfs_boot_map_optionrom(uint16_t vendor, uint16_t device)
return cbfs_map(name, NULL);
}
-static void *cbfs_boot_map_optionrom_revision(uint16_t vendor, uint16_t device, uint8_t rev)
-{
- char name[20] = "pciXXXX,XXXX,XX.rom";
-
- snprintf(name, sizeof(name), "pci%04hx,%04hx,%02hhx.rom", vendor, device, rev);
-
- return cbfs_map(name, NULL);
-}
-
struct rom_header *pci_rom_probe(const struct device *dev)
{
struct rom_header *rom_header = NULL;
struct pci_data *rom_data;
- u8 rev = pci_read_config8(dev, PCI_REVISION_ID);
- u8 mapped_rev = rev;
u32 vendev = (dev->vendor << 16) | dev->device;
u32 mapped_vendev = vendev;
/* If the ROM is in flash, then don't check the PCI device for it. */
- if (CONFIG(CHECK_REV_IN_OPROM_NAME)) {
- map_oprom_vendev_rev(&mapped_vendev, &mapped_rev);
- rom_header = cbfs_boot_map_optionrom_revision(mapped_vendev >> 16,
- mapped_vendev & 0xffff,
- mapped_rev);
- } else {
- mapped_vendev = map_oprom_vendev(vendev);
- rom_header = cbfs_boot_map_optionrom(mapped_vendev >> 16,
- mapped_vendev & 0xffff);
- }
+ mapped_vendev = map_oprom_vendev(vendev);
+ rom_header = cbfs_boot_map_optionrom(mapped_vendev >> 16, mapped_vendev & 0xffff);
if (rom_header) {
printk(BIOS_DEBUG, "In CBFS, ROM address for %s = %p\n",