mikeb mikeb would like Mike Banon to review this change.

View Change

src/device/Kconfig: Add support for discrete VGA OpROM inclusion at config UI

Create the way of adding the discrete VGA OpROM at config UI ( alternative to
./cbfstool ./cb.rom add -f vgabios_dgpu.bin -n pci1002,6663.rom -t optionrom )
DGPU options are accessible only if CONFIG_MULTIPLE_VGA_ADAPTERS is enabled.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I0a7bf0fe95c833cf3df0c7cb20fc27b6ab218c5a
---
M src/arch/x86/Makefile.inc
M src/device/Kconfig
2 files changed, 42 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/31449/1
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 8dafac8..47ef66b 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -47,6 +47,13 @@
pci$(stripped_vgabios_id).rom-file := $(call strip_quotes,$(CONFIG_VGA_BIOS_FILE))
pci$(stripped_vgabios_id).rom-type := optionrom

+ifeq ($(CONFIG_MULTIPLE_VGA_ADAPTERS),y)
+stripped_vgabios_dgpu_id = $(call strip_quotes,$(CONFIG_VGA_BIOS_DGPU_ID))
+cbfs-files-$(CONFIG_VGA_BIOS_DGPU) += pci$(stripped_vgabios_dgpu_id).rom
+pci$(stripped_vgabios_dgpu_id).rom-file := $(call strip_quotes,$(CONFIG_VGA_BIOS_DGPU_FILE))
+pci$(stripped_vgabios_dgpu_id).rom-type := optionrom
+endif
+
verstage-$(CONFIG_HAVE_CF9_RESET) += cf9_reset.c
bootblock-$(CONFIG_HAVE_CF9_RESET) += cf9_reset.c
romstage-$(CONFIG_HAVE_CF9_RESET) += cf9_reset.c
diff --git a/src/device/Kconfig b/src/device/Kconfig
index b90b15f..33c1e5b3 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -613,6 +613,41 @@

Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.

+config VGA_BIOS_DGPU
+ bool "Add a Discrete VGA BIOS image"
+ depends on ARCH_X86 && MULTIPLE_VGA_ADAPTERS
+ help
+ Select this option if you have a VGA BIOS image for Discrete GPU
+ that you would like to add to your ROM.
+
+ You will be able to specify the location and file name of the
+ image later.
+
+config VGA_BIOS_DGPU_FILE
+ string "Discrete VGA BIOS path and filename"
+ depends on VGA_BIOS_DGPU
+ default "vgabios_dgpu.bin"
+ help
+ The path and filename of the file to use as VGA BIOS for Discrete GPU.
+
+config VGA_BIOS_DGPU_ID
+ string "Discrete VGA device PCI IDs"
+ depends on VGA_BIOS_DGPU
+ default "1002,6663"
+ help
+ The comma-separated PCI vendor and device ID that would associate
+ your VGA BIOS to your discrete video card.
+
+ Examples:
+ 1002,6663 for HD 8570M
+ 1002,6665 for R5 M230
+
+ In the above examples 1002 is the PCI vendor ID (in hex, but without
+ the "0x" prefix) and 6663 / 6665 specifies the PCI device ID of the
+ discrete 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 INTEL_GMA_HAVE_VBT
bool
help

To view, visit change 31449. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0a7bf0fe95c833cf3df0c7cb20fc27b6ab218c5a
Gerrit-Change-Number: 31449
Gerrit-PatchSet: 1
Gerrit-Owner: mikeb mikeb <mikebdp2@gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2@gmail.com>
Gerrit-MessageType: newchange