[coreboot-gerrit] Patch set updated for coreboot: soc/intel/apollolake: add support for IFWI region

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Tue May 31 08:06:18 CEST 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14999

-gerrit

commit 3bfb0c5abfcdbb3f95587471fe29191d9288d8b0
Author: Furquan Shaikh <furquan at google.com>
Date:   Sat May 28 12:57:05 2016 -0700

    soc/intel/apollolake: add support for IFWI region
    
    On apollolake, the boot media layout is different in that the traditional
    "BIOS" region contains another data structure with the boot assets such
    as CSE firmware, PMC microcode, CPU microcode, and boot firmware to name
    a few. This region is referred to as the IFWI. Add support for writing
    the IFWI to a specified FMAP region to accommodate such platforms.
    
    Change-Id: Ia61f12a77893c3dd3256a9bd4e0f5eca0065de26
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/soc/intel/apollolake/Kconfig      | 21 +++++++++++++++++++++
 src/soc/intel/apollolake/Makefile.inc | 15 +++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index d6c5ffc..7c21ed2 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -160,4 +160,25 @@ config LBP2_FILE_NAME
 	help
 	  Name of file to store in the logical boot partition 2 region.
 
+config NEED_IFWI
+	bool "Write content into IFWI region"
+	default n
+	help
+	  Write the content from a file into IFWI region defined by
+	  IFWI_FMAP_NAME.
+
+config IFWI_FMAP_NAME
+	string "Name of FMAP region to pull IFWI into"
+	depends on NEED_IFWI
+	default "IFWI"
+	help
+	  Name of FMAP region to write IFWI.
+
+config IFWI_FILE_NAME
+	string "Path of file to write to IFWI region"
+	depends on NEED_IFWI
+	default "3rdparty/blobs/mainboard/$(CONFIG_MAINBOARD_DIR)/ifwi.bin"
+	help
+	  Name of file to store in the IFWI region.
+
 endif
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index 1ea21f6..275c97c 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -75,4 +75,19 @@ files_added::
 	$(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_LBP2_FMAP_NAME) -f $(CONFIG_LBP2_FILE_NAME) --fill-upward
 endif
 
+# Bootblock on Apollolake platform lies in the IFWI region. In order to place
+# the bootblock at the right location in IFWI image:
+# 1. We need to copy the sample ifwi image (CONFIG_IFWI_FILE_NAME) to a
+#    temporary file (ifwi.bin.tmp).
+# 2. Replace the IBBL directory entry in sub-partition IBBP in the ifwi.bin.tmp
+#    file with currently generated bootblock.bin using ifwitool.
+# 3. Use cbfstool to write ifwi.bin.tmp to coreboot.rom using
+#    CONFIG_IFWI_FMAP_NAME.
+ifeq ($(CONFIG_NEED_IFWI),y)
+files_added:: $(IFWITOOL)
+	cp $(CONFIG_IFWI_FILE_NAME) $(objcbfs)/ifwi.bin.tmp
+	$(IFWITOOL) $(objcbfs)/ifwi.bin.tmp replace -n IBBP -f $(objcbfs)/bootblock.bin -d -e IBBL
+	$(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_IFWI_FMAP_NAME) -f $(objcbfs)/ifwi.bin.tmp --fill-upward
+endif
+
 endif



More information about the coreboot-gerrit mailing list