[coreboot-gerrit] New patch to review for coreboot: intel/braswell: Build in both C0 and 'other' vbios

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Mon Jan 4 21:55:31 CET 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12826

-gerrit

commit b6de0837a990e7d0686eb3badc86ca5a16513641
Author: Martin Roth <martinroth at google.com>
Date:   Mon Jan 4 12:43:22 2016 -0700

    intel/braswell: Build in both C0 and 'other' vbios
    
    The Braswell CPU seems to have two different Video BIOS roms, one for
    the C0 revision, and one for other revisions.  Build them both into
    the coreboot image, and let coreboot sort out which one should be used
    at runtime.  This should allow one rom to be used for all revisions.
    
    The initial reason for this patch was that the Kconfig symbol
    C0_DISP_SUPPORT didn't exist, and was causing issues.  This
    seems like the best way to eliminate the need for that symbol.
    
    Change-Id: I5b9f225c0daf4e02fda75daf9cd07bb160bf0e0f
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 src/mainboard/google/cyan/Kconfig   | 15 ++++++++++-----
 src/mainboard/intel/strago/Kconfig  | 17 ++++++++++++-----
 src/soc/intel/braswell/Makefile.inc | 15 +++++++++++++--
 3 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/src/mainboard/google/cyan/Kconfig b/src/mainboard/google/cyan/Kconfig
index 7a3a11a..593548d 100644
--- a/src/mainboard/google/cyan/Kconfig
+++ b/src/mainboard/google/cyan/Kconfig
@@ -60,13 +60,18 @@ config VBOOT_REFCODE_INDEX
 if !GOP_SUPPORT
 config VGA_BIOS_FILE
 	string
-	default "3rdparty/blobs/mainboard/intel/strago/vgabios_c0.bin" if C0_DISP_SUPPORT
-	default "3rdparty/blobs/mainboard/intel/strago/vgabios.bin" if !C0_DISP_SUPPORT
+	default "3rdparty/blobs/mainboard/intel/strago/vgabios.bin"
+	help
+	  The C0 version of the video bios gets computed from this name
+	  so that they can both be added.  Only the correct one for the
+	  system will be run.
 
 config VGA_BIOS_ID
 	string
-	default "8086,22b1" if C0_DISP_SUPPORT
-	default "8086,22b0" if !C0_DISP_SUPPORT
-endif
+	default "8086,22b0"
+	help
+	  The VGA_BIOS_ID for the C0 version of the video bios is hardcoded
+	  in soc/intel/braswell/Makefile.inc as 8086,22b1
 
+endif #GOP_SUPPORT
 endif # BOARD_GOOGLE_CYAN
diff --git a/src/mainboard/intel/strago/Kconfig b/src/mainboard/intel/strago/Kconfig
index facd97f..3c12ece 100755
--- a/src/mainboard/intel/strago/Kconfig
+++ b/src/mainboard/intel/strago/Kconfig
@@ -50,11 +50,18 @@ config MAINBOARD_VENDOR
 if !GOP_SUPPORT
 config VGA_BIOS_FILE
 	string
-	default "3rdparty/blobs/mainboard/intel/strago/vgabios_c0.bin" if C0_DISP_SUPPORT
-	default "3rdparty/blobs/mainboard/intel/strago/vgabios.bin" if !C0_DISP_SUPPORT
+	default "3rdparty/blobs/mainboard/intel/strago/vgabios.bin"
+	help
+	  The C0 version of the video bios gets computed from this name
+	  so that they can both be added.  Only the correct one for the
+	  system will be run.
+
 config VGA_BIOS_ID
 	string
-	default "8086,22b1" if C0_DISP_SUPPORT
-	default "8086,22b0" if !C0_DISP_SUPPORT
-endif # GOP_SUPPORT
+	default "8086,22b0"
+	help
+	  The VGA_BIOS_ID for the C0 version of the video bios is hardcoded
+	  in soc/intel/braswell/Makefile.inc as 8086,22b1
+
+endif #GOP_SUPPORT
 endif # BOARD_INTEL_STRAGO
diff --git a/src/soc/intel/braswell/Makefile.inc b/src/soc/intel/braswell/Makefile.inc
index 54b9c6a..b61323d 100644
--- a/src/soc/intel/braswell/Makefile.inc
+++ b/src/soc/intel/braswell/Makefile.inc
@@ -43,7 +43,6 @@ ramstage-y += tsc_freq.c
 
 # Remove as ramstage gets fleshed out
 ramstage-y += placeholders.c
-
 smm-y += lpc_init.c
 smm-y += pmutil.c
 smm-y += smihandler.c
@@ -58,4 +57,16 @@ CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp1_1/braswell
 
 CPPFLAGS_common += -I3rdparty/blobs/mainboard/$(CONFIG_MAINBOARD_DIR)
 
-endif
+ifneq ($(CONFIG_GOP_SUPPORT),y)
+ifneq ($(CONFIG_VGA_BIOS_FILE),)
+#we will assume that the vbios names will remain as they are now: vgabios.bin and vgabios_c0.bin
+BRASWELL_C0_VBIOS= $(subst .bin,_c0.bin,$(call strip_quotes,$(CONFIG_VGA_BIOS_FILE)))
+
+cbfs-files-$(CONFIG_VGA_BIOS) += pci8086,22b1.rom
+pci8086,22b1.rom-file := $(BRASWELL_C0_VBIOS)
+pci8086,22b1.rom-type := optionrom
+
+endif # ifneq ($(CONFIG_GOP_SUPPORT),y)
+endif # ifneq ($(CONFIG_VGA_BIOS_FILE),)
+
+endif # ifeq ($(CONFIG_SOC_INTEL_BRASWELL),y)



More information about the coreboot-gerrit mailing list