ACPI: Get S3 resume state from romstage_handoff

There is nothing platform specific in retrieving S3 resume state from
romstage_handoff structure. Boards without EARLY_CBMEM_INIT update
acpi_slp_type from ACPI power-management block or scratchpad registers.

Change-Id: Ifc3755f891a0810473b3216c1fec8e45908fc1ab
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8188
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Kyösti Mälkki
2015-01-08 20:03:18 +02:00
parent a63719407f
commit 9e94dbfcd0
12 changed files with 45 additions and 128 deletions

View File

@ -30,15 +30,6 @@
#include <broadwell/pei_wrapper.h>
#include <broadwell/ramstage.h>
static inline int is_s3_resume(void)
{
#if CONFIG_HAVE_ACPI_RESUME
return acpi_slp_type == 3;
#else
return 0;
#endif
}
static inline struct ramstage_cache *next_cache(struct ramstage_cache *c)
{
return (struct ramstage_cache *)&c->program[c->size];
@ -136,7 +127,7 @@ static pei_wrapper_entry_t load_reference_code(void)
};
int ret;
if (is_s3_resume()) {
if (acpi_is_wakeup_s3()) {
return load_refcode_from_cache();
}