summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/device/Kconfig24
-rw-r--r--src/device/pci_rom.c24
-rw-r--r--src/include/device/pci_rom.h1
-rw-r--r--src/mainboard/amd/bilby/Kconfig12
-rw-r--r--src/mainboard/amd/mandolin/Kconfig13
-rw-r--r--src/soc/amd/picasso/Kconfig15
-rw-r--r--src/soc/amd/picasso/graphics.c13
7 files changed, 21 insertions, 81 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",
diff --git a/src/include/device/pci_rom.h b/src/include/device/pci_rom.h
index 19728f2225..531ec18ffa 100644
--- a/src/include/device/pci_rom.h
+++ b/src/include/device/pci_rom.h
@@ -55,7 +55,6 @@ pci_rom_write_acpi_tables(const struct device *device,
void pci_rom_ssdt(const struct device *device);
-void map_oprom_vendev_rev(u32 *vendev, u8 *rev);
u32 map_oprom_vendev(u32 vendev);
int verified_boot_should_run_oprom(struct rom_header *rom_header);
diff --git a/src/mainboard/amd/bilby/Kconfig b/src/mainboard/amd/bilby/Kconfig
index 19fcbe5e9f..95732046b0 100644
--- a/src/mainboard/amd/bilby/Kconfig
+++ b/src/mainboard/amd/bilby/Kconfig
@@ -80,18 +80,6 @@ config BILBY_LPC
Picasso's LPC bus signals are MUXed with some of the EMMC signals.
Select this option if LPC signals are required.
-#TODO: remove this hack to not break graphics in combination with SeaBIOS
-config VGA_BIOS_DGPU_ID
- string
- default "1002,15d8"
- help
- The default VGA BIOS PCI vendor/device ID should be set to the
- result of the map_oprom_vendev() function in northbridge.c.
-
-config VGA_BIOS_DGPU_FILE
- string
- default "3rdparty/amd_blobs/picasso/PicassoGenericVbios.bin"
-
if !EM100 # EM100 defaults in soc/amd/common/blocks/spi/Kconfig
config EFS_SPI_READ_MODE
default 3 # Quad IO (1-1-4)
diff --git a/src/mainboard/amd/mandolin/Kconfig b/src/mainboard/amd/mandolin/Kconfig
index 252404bb53..ce3af3ba74 100644
--- a/src/mainboard/amd/mandolin/Kconfig
+++ b/src/mainboard/amd/mandolin/Kconfig
@@ -106,19 +106,6 @@ config MANDOLIN_LPC
Picasso's LPC bus signals are MUXed with some of the EMMC signals.
Select this option if LPC signals are required.
-#TODO: remove this hack to not break graphics in combination with SeaBIOS
-config VGA_BIOS_DGPU_ID
- string
- default "1002,15d8"
- help
- The default VGA BIOS PCI vendor/device ID should be set to the
- result of the map_oprom_vendev() function in northbridge.c.
-
-config VGA_BIOS_DGPU_FILE
- string
- default "3rdparty/amd_blobs/picasso/PicassoGenericVbios.bin" if BOARD_AMD_MANDOLIN
- default "3rdparty/amd_blobs/picasso/Raven2GenericVbios.bin" if BOARD_AMD_CEREME
-
if !EM100 # EM100 defaults in soc/amd/common/blocks/spi/Kconfig
config EFS_SPI_READ_MODE
default 3 # Quad IO (1-1-4)
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index d6c3fbd3e9..f450e294d7 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -230,10 +230,10 @@ config MAX_CPUS
config VGA_BIOS_ID
string
- default "1002,15d8,c1"
+ default "1002,15d8"
help
The default VGA BIOS PCI vendor/device ID should be set to the
- result of the map_oprom_vendev_rev() function in graphics.c.
+ result of the map_oprom_vendev() function in graphics.c.
config VGA_BIOS_FILE
string
@@ -244,25 +244,18 @@ config VGA_BIOS_SECOND
config VGA_BIOS_SECOND_ID
string
- default "1002,15dd,c4"
+ default "1002,15dd"
help
Some Dali and all Pollock APUs need a different VBIOS than some other
Dali and all Picasso APUs, but don't always have a different PCI
vendor/device IDs, so we need an alternate method to determine the
- correct video BIOS. In map_oprom_vendev_rev(), we look at the return
+ correct video BIOS. In map_oprom_vendev(), we look at the return
value of soc_is_raven2() and decide which rom to load.
config VGA_BIOS_SECOND_FILE
string
default "3rdparty/amd_blobs/picasso/Raven2GenericVbios.bin"
-config CHECK_REV_IN_OPROM_NAME
- bool
- default y
- 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 S3_VGA_ROM_RUN
bool
default n
diff --git a/src/soc/amd/picasso/graphics.c b/src/soc/amd/picasso/graphics.c
index 3c2e0f8ad0..bd7ec77ae3 100644
--- a/src/soc/amd/picasso/graphics.c
+++ b/src/soc/amd/picasso/graphics.c
@@ -6,20 +6,19 @@
#include <soc/soc_util.h>
#include <stdint.h>
-void map_oprom_vendev_rev(u32 *vendev, u8 *rev)
+u32 map_oprom_vendev(u32 vendev)
{
- if (*vendev == PICASSO_VBIOS_VID_DID) {
+ if (vendev == PICASSO_VBIOS_VID_DID) {
/* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */
if (soc_is_raven2()) {
printk(BIOS_NOTICE, "Using RV2 VBIOS.\n");
- *vendev = RAVEN2_VBIOS_VID_DID;
- *rev = RAVEN2_VBIOS_REV;
+ return RAVEN2_VBIOS_VID_DID;
} else {
printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n");
- *rev = PICASSO_VBIOS_REV;
}
- } else if (*vendev == RAVEN2_VBIOS_VID_DID) {
+ } else if (vendev == RAVEN2_VBIOS_VID_DID) {
printk(BIOS_NOTICE, "Using RV2 VBIOS.\n");
- *rev = RAVEN2_VBIOS_REV;
}
+
+ return vendev;
}