From e0165fbc944521171cd2776be4d3f655712079d2 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Sat, 9 Jan 2021 13:30:57 +0200 Subject: stage_cache: Add resume_from_stage_cache() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Factor out the condition when an attempt to load stage from cache can be tried. Change-Id: I936f07bed6fc82f46118d217f1fd233e2e041405 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/50000 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/arch/x86/postcar_loader.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c index 241ba8c21f..cae5574fd3 100644 --- a/src/arch/x86/postcar_loader.c +++ b/src/arch/x86/postcar_loader.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -183,8 +182,7 @@ void run_postcar_phase(struct postcar_frame *pcf) postcar_commit_mtrrs(pcf); - if (!CONFIG(NO_STAGE_CACHE) && - romstage_handoff_is_resume()) { + if (resume_from_stage_cache()) { stage_cache_load_stage(STAGE_POSTCAR, &prog); /* This is here to allow platforms to pass different stack parameters between S3 resume and normal boot. On the -- cgit v1.2.3