[coreboot-gerrit] Patch set updated for coreboot: 5239d47 arch/x86: Do not run UPDATE-FIT if we don't include microcode

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Fri Dec 6 22:05:12 CET 2013


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4480

-gerrit

commit 5239d4783587f230485949335b6aac5263a92e03
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Wed Dec 4 21:57:15 2013 -0600

    arch/x86: Do not run UPDATE-FIT if we don't include microcode
    
    The original intention was to only run UPDATE_FIT when a microcode file was
    included in CBFS. This happens when either CPU_MICROCODE_CBFS_GENERATE or
    CPU_MICROCODE_CBFS_EXTERNAL is selected, however, the makefile checked that
    CPU_MICROCODE_IN_CBFS was selected instead. The end result was that on
    hasswell, the UPDATE-FIT step was always run, even when no microcode was
    included, generating a build error.
    
    Instead, introduce a new variable which tells if a microcode update is
    added in CBFS during the build.
    
    Change-Id: I28638912ed6f77761ef8a584f7636dc907b7a9b7
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 src/arch/x86/Makefile.inc |  2 +-
 src/cpu/Kconfig           | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 2e54645..2ade820 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -140,7 +140,7 @@ ifeq ($(CONFIG_PXE_ROM),y)
 	$(CBFSTOOL) $@.tmp add -f $(CONFIG_PXE_ROM_FILE) -n pci$(CONFIG_PXE_ROM_ID).rom -t raw
 endif
 ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y)
-ifeq ($(CONFIG_CPU_MICROCODE_IN_CBFS),y)
+ifeq ($(CONFIG_CPU_MICROCODE_ADDED_DURING_BUILD),y)
 	@printf "    UPDATE-FIT \n"
 	$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES)
 endif
diff --git a/src/cpu/Kconfig b/src/cpu/Kconfig
index 7317bcc..6c118b7 100644
--- a/src/cpu/Kconfig
+++ b/src/cpu/Kconfig
@@ -77,6 +77,17 @@ config CPU_MICROCODE_IN_CBFS
 	bool
 	default n
 
+# This variable is used to determine if we add CPU microcode to CBFS during the
+# build. Microcode can be added manually afterwards, or removed. As a result,
+# code should not rely on this to tell if a microcode update is present or not,
+# and should instead search CBFS.
+# This variable is useful in determining if certain automated post-processing
+# steps can be performed right after the build, such as automatically adding
+# a firmware interface table.
+config CPU_MICROCODE_ADDED_DURING_BUILD
+	bool
+	default y if CPU_MICROCODE_CBFS_GENERATE || CPU_MICROCODE_CBFS_EXTERNAL
+
 choice
 	prompt "Include CPU microcode in CBFS" if ARCH_X86
 	default CPU_MICROCODE_CBFS_GENERATE if CPU_MICROCODE_IN_CBFS



More information about the coreboot-gerrit mailing list