From 6271dd8459a4dc717f920ba1997db6ad510dfcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 9 Jan 2021 13:30:57 +0200 Subject: soc/intel/baytrail,broadwell: Use resume_from_stage_cache() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie7b8bd02c3bb92c6ab9071941abbd90afef82601 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/50001 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/soc/intel/broadwell/refcode.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/soc/intel/broadwell') diff --git a/src/soc/intel/broadwell/refcode.c b/src/soc/intel/broadwell/refcode.c index 882f888af9..36b41779c4 100644 --- a/src/soc/intel/broadwell/refcode.c +++ b/src/soc/intel/broadwell/refcode.c @@ -13,17 +13,6 @@ #include #include -static pei_wrapper_entry_t load_refcode_from_cache(void) -{ - struct prog refcode; - - printk(BIOS_DEBUG, "refcode loading from cache.\n"); - - stage_cache_load_stage(STAGE_REFCODE, &refcode); - - return (pei_wrapper_entry_t)prog_entry(&refcode); -} - static pei_wrapper_entry_t load_reference_code(void) { struct prog prog = @@ -33,8 +22,11 @@ static pei_wrapper_entry_t load_reference_code(void) .prog = &prog, }; - if (acpi_is_wakeup_s3()) - return load_refcode_from_cache(); + 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"); -- cgit v1.2.3