From 0f98655b37d32f0a8c7f778e2683ea6c595ee88d Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 17 Dec 2023 20:32:19 +0100 Subject: device: Drop MULTIPLE_VGA_ADAPTERS Kconfig This option is nowhere selected and there is only a single case left where it's used. Guarding the check in pci_rom_load() seems like a bad idea: As the code would be copying all VGA ROMs to the same location, it would be only working by chance (if the last encoun- tered ROM is the right one). Hence, drop the guard and always check for the correct device. Change-Id: Ib283bf0a65367b99099a3bfcbd27585d44235eb9 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/79596 Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/device/Kconfig | 4 ---- src/device/pci_rom.c | 2 -- 2 files changed, 6 deletions(-) (limited to 'src') diff --git a/src/device/Kconfig b/src/device/Kconfig index 13d20cdcee..83afa8cda6 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -297,10 +297,6 @@ config YABEL_DIRECTHW they can still access all devices in the system. Enable this option for a good compromise between security and speed. -config MULTIPLE_VGA_ADAPTERS - bool - default n - menu "Display" depends on HAVE_VGA_TEXT_FRAMEBUFFER || HAVE_LINEAR_FRAMEBUFFER diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index 46bf1144bc..2592f83757 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -169,10 +169,8 @@ struct rom_header *pci_rom_load(struct device *dev, * devices have a mismatch between the hardware and the ROM. */ if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { -#if !CONFIG(MULTIPLE_VGA_ADAPTERS) extern struct device *vga_pri; /* Primary VGA device (device.c). */ if (dev != vga_pri) return NULL; /* Only one VGA supported. */ -#endif if ((void *)PCI_VGA_RAM_IMAGE_START != rom_header) { printk(BIOS_DEBUG, "Copying VGA ROM Image from %p to 0x%x, 0x%x bytes\n", -- cgit v1.2.3