[coreboot-gerrit] Patch set updated for coreboot: cbfs: Use NO_XIP_EARLY_STAGES to decide if stage is XIP

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Thu Jun 2 00:33:29 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/15045

-gerrit

commit bb9bc4398420b06fca1102e547dbef7a80b6193c
Author: Furquan Shaikh <furquan at google.com>
Date:   Wed Jun 1 01:53:18 2016 -0700

    cbfs: Use NO_XIP_EARLY_STAGES to decide if stage is XIP
    
    Modern platforms like Apollolake do not use XIP for early stages. In
    such cases, cbfs_prog_stage_load should check for NO_XIP_EARLY_STAGES
    instead of relying on ARCH_X86 to decide if a stage is XIP.
    
    Change-Id: I1729ce82b5f678ce8c37256090fcf353cc22b1ec
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/Kconfig    | 3 +--
 src/lib/cbfs.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index f93c2cc..6e6e944 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -204,8 +204,7 @@ config NO_XIP_EARLY_STAGES
 	default n if ARCH_X86
 	default y
 	help
-	  Identify if --xip parameter needs to be passed into cbfstool for early
-	  stages.
+	  Identify if early stages are eXecute-In-Place(XIP).
 
 config EARLY_CBMEM_INIT
 	def_bool !LATE_CBMEM_INIT
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 764a6f7..aa652c2 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -192,7 +192,7 @@ int cbfs_prog_stage_load(struct prog *pstage)
 
 	/* Hacky way to not load programs over read only media. The stages
 	 * that would hit this path initialize themselves. */
-	if (ENV_VERSTAGE && IS_ENABLED(CONFIG_ARCH_X86) &&
+	if (ENV_VERSTAGE && !IS_ENABLED(CONFIG_NO_XIP_EARLY_STAGES) &&
 	    IS_ENABLED(CONFIG_SPI_FLASH_MEMORY_MAPPED)) {
 		void *mapping = rdev_mmap(fh, foffset, fsize);
 		rdev_munmap(fh, mapping);



More information about the coreboot-gerrit mailing list