diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/block/pi/refcode_loader.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/soc/amd/common/block/pi/refcode_loader.c b/src/soc/amd/common/block/pi/refcode_loader.c index 2fdbe83347..274291de56 100644 --- a/src/soc/amd/common/block/pi/refcode_loader.c +++ b/src/soc/amd/common/block/pi/refcode_loader.c @@ -48,9 +48,7 @@ static int agesa_locate_stage_file_ramstage(const char *name, .prog = &prog, }; - if (acpi_is_wakeup_s3() && !CONFIG(NO_STAGE_CACHE)) { - printk(BIOS_INFO, "AGESA: Loading stage from cache\n"); - // There is no way to tell if this succeeded. + if (resume_from_stage_cache()) { stage_cache_load_stage(STAGE_REFCODE, &prog); } else { if (prog_locate(&prog)) @@ -59,10 +57,7 @@ static int agesa_locate_stage_file_ramstage(const char *name, if (rmodule_stage_load(&rmod_agesa) < 0) return -1; - if (!CONFIG(NO_STAGE_CACHE)) { - printk(BIOS_INFO, "AGESA: Saving stage to cache\n"); - stage_cache_add(STAGE_REFCODE, &prog); - } + stage_cache_add(STAGE_REFCODE, &prog); } return rdev_chain(rdev, prog_rdev(&prog), 0, |