soc/intel/baytrail,broadwell: Use resume_from_stage_cache()
Change-Id: Ie7b8bd02c3bb92c6ab9071941abbd90afef82601 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50001 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
e0165fbc94
commit
6271dd8459
|
@ -17,17 +17,6 @@ static void ABI_X86 send_to_console(unsigned char b)
|
|||
console_tx_byte(b);
|
||||
}
|
||||
|
||||
static efi_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 (efi_wrapper_entry_t)prog_entry(&refcode);
|
||||
}
|
||||
|
||||
static efi_wrapper_entry_t load_reference_code(void)
|
||||
{
|
||||
struct prog prog =
|
||||
|
@ -37,8 +26,10 @@ static efi_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(&refcode);
|
||||
}
|
||||
|
||||
if (prog_locate(&prog)) {
|
||||
|
|
|
@ -13,17 +13,6 @@
|
|||
#include <soc/pm.h>
|
||||
#include <soc/ramstage.h>
|
||||
|
||||
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");
|
||||
|
|
Loading…
Reference in New Issue