summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-01-09 13:30:57 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2021-01-29 10:53:33 +0000
commite0165fbc944521171cd2776be4d3f655712079d2 (patch)
treeda303ac99860420f001a843c98e547576bc4cfc8 /src/arch
parentcdaddde0672643a2457b163ea1b286a4ea77c0f1 (diff)
stage_cache: Add resume_from_stage_cache()
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 <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50000 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/postcar_loader.c4
1 files changed, 1 insertions, 3 deletions
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 <program_loading.h>
#include <reset.h>
#include <rmodule.h>
-#include <romstage_handoff.h>
#include <stage_cache.h>
#include <timestamp.h>
#include <security/vboot/vboot_common.h>
@@ -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