[coreboot-gerrit] New patch to review for coreboot: lib/prog_loaders: Allow platforms to skip stage cache for ramstage

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Fri May 6 19:04:45 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/14636

-gerrit

commit 32628596384fdbfb9579ae3d169c3ac9b334cd7a
Author: Furquan Shaikh <furquan at google.com>
Date:   Fri May 6 09:20:35 2016 -0700

    lib/prog_loaders: Allow platforms to skip stage cache for ramstage
    
    Before multi-CBFS support was added, x86 platforms cached their
    ramstage in TSEG so that it could be re-used on the resume
    path. However, more resources/assets are being put in cbfs that are
    utilized during ramstage. Just caching ramstage does not mean that
    correct cbfs region is used for all the data. Thus, provide an option
    to allow platforms to skip caching ramstage for resume.
    
    Change-Id: I0e957a6b859cc7d700aaff67209a17c6558be5de
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/Kconfig            | 7 +++++++
 src/lib/prog_loaders.c | 9 +++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/Kconfig b/src/Kconfig
index f9bd661..bc40e21 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -254,6 +254,13 @@ config CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM
 	 The relocated ramstage is saved in an area specified by the
 	 by the board and/or chipset.
 
+config NO_RAMSTAGE_STAGE_CACHE
+	bool
+	default n
+	help
+	 Do not save ramstage in stage cache for resume path. On resume,
+	 ramstage would be read back from CBFS again.
+
 config FLASHMAP_OFFSET
 	hex "Flash Map Offset"
 	default 0x00670000 if NORTHBRIDGE_INTEL_SANDYBRIDGE
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 14e1299..dc616f2 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -107,8 +107,13 @@ void run_ramstage(void)
 
 	timestamp_add_now(TS_END_ROMSTAGE);
 
-	/* Only x86 systems currently take the same firmware path on resume. */
-	if (IS_ENABLED(CONFIG_ARCH_X86) && IS_ENABLED(CONFIG_EARLY_CBMEM_INIT))
+	/*
+	 * Only x86 systems using ramstage stage cache currently take the same
+	 * firmware path on resume.
+	 */
+	if (IS_ENABLED(CONFIG_ARCH_X86) &&
+	    !IS_ENABLED(CONFIG_NO_RAMSTAGE_STAGE_CACHE) &&
+	    IS_ENABLED(CONFIG_EARLY_CBMEM_INIT))
 		run_ramstage_from_resume(romstage_handoff_find_or_add(),
 						&ramstage);
 



More information about the coreboot-gerrit mailing list