summaryrefslogtreecommitdiff
path: root/src/soc/intel/broadwell/refcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/broadwell/refcode.c')
-rw-r--r--src/soc/intel/broadwell/refcode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/intel/broadwell/refcode.c b/src/soc/intel/broadwell/refcode.c
index 36b41779c4..31d6ad8482 100644
--- a/src/soc/intel/broadwell/refcode.c
+++ b/src/soc/intel/broadwell/refcode.c
@@ -15,6 +15,12 @@
static pei_wrapper_entry_t load_reference_code(void)
{
+ if (resume_from_stage_cache()) {
+ struct prog prog;
+ stage_cache_load_stage(STAGE_REFCODE, &prog);
+ return prog_entry(&prog);
+ }
+
struct prog prog =
PROG_INIT(PROG_REFCODE, CONFIG_CBFS_PREFIX "/refcode");
struct rmod_stage_load refcode = {
@@ -22,12 +28,6 @@ static pei_wrapper_entry_t load_reference_code(void)
.prog = &prog,
};
- if (resume_from_stage_cache()) {
- struct prog refcode;
- stage_cache_load_stage(STAGE_REFCODE, &refcode);
- return prog_entry(&prog);
- }
-
if (prog_locate(&prog)) {
printk(BIOS_DEBUG, "Couldn't locate reference code.\n");
return NULL;