From 1e162bf8bd74e8dcd0b164b627e1d536c7dbd5f5 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 6 May 2016 09:20:35 -0700 Subject: lib/prog_loaders: Allow platforms to skip stage cache 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 any component for resume. Change-Id: I0e957a6b859cc7d700aaff67209a17c6558be5de Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/14636 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/lib/prog_loaders.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/lib/prog_loaders.c') diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 14e12998e0..38dfc2b5df 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_STAGE_CACHE) && + IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) run_ramstage_from_resume(romstage_handoff_find_or_add(), &ramstage); -- cgit v1.2.3