Werner Zeh (werner.zeh@siemens.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11709
-gerrit
commit 86029be458ccc3955370d872659736c9d12dfa00 Author: Werner Zeh werner.zeh@siemens.com Date: Fri Sep 25 07:54:59 2015 +0200
fsp1.0: Get size of microcode during build time
Avoid specifying the size of the microcode in microcode_size.h. Instead, the size will be get during build time and microcode_size.h will be generated. In this way, the size do not need to be adjusted by hand.
Change-Id: I868f02b0cc03af12464a6a87c59761c200eb2502 Signed-off-by: Werner Zeh werner.zeh@siemens.com --- src/arch/x86/Makefile.inc | 2 +- src/drivers/intel/fsp1_0/Makefile.inc | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 79b82e0..5dd7ff7 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -135,7 +135,7 @@ $(objgenerated)/romstage.inc: $$(crt0s) # the right order. Make sure the auto generated romstage.inc is a proper # dependency. romstage-y += romstage.S -$(obj)/arch/x86/romstage.romstage.o: $(objgenerated)/romstage.inc +$(obj)/arch/x86/romstage.romstage.o: $(objgenerated)/romstage.inc $$(FSP_MICROCODE_SIZE_HEADER)
ifneq ($(CONFIG_ROMCC),y)
diff --git a/src/drivers/intel/fsp1_0/Makefile.inc b/src/drivers/intel/fsp1_0/Makefile.inc index 11ff31a..3a81602 100644 --- a/src/drivers/intel/fsp1_0/Makefile.inc +++ b/src/drivers/intel/fsp1_0/Makefile.inc @@ -23,7 +23,7 @@ romstage-y += fsp_util.c hob.c ramstage-$(CONFIG_ENABLE_MRC_CACHE) += fastboot_cache.c romstage-$(CONFIG_ENABLE_MRC_CACHE) += fastboot_cache.c
-CPPFLAGS_common += -Isrc/drivers/intel/fsp1_0 +CPPFLAGS_common += -Isrc/drivers/intel/fsp1_0 -I$(objgenerated)
cpu_incs-$(CONFIG_USE_GENERIC_FSP_CAR_INC) += $(src)/drivers/intel/fsp1_0/cache_as_ram.inc
@@ -45,3 +45,8 @@ mrc.cache-file := $(obj)/mrc.cache mrc.cache-align := 0x10000 mrc.cache-type := mrc_cache endif + +export FSP_MICROCODE_SIZE_HEADER := $(objgenerated)/microcode_size.h +$(objgenerated)/microcode_size.h: $(obj)/cpu_microcode_blob.bin + printf "#define MICROCODE_REGION_LENGTH $(call file-size,$<)" > $@.tmp && cmp $@.tmp $@ 2>/dev/null || mv $@.tmp $@ +