CBMEM ACPI: Move resume handler
Handler is ACPI/x86 specific so move details out of cbmem code. With static CBMEM initialisation, ramstage will need to test for S3 wakeup condition so publish also acpi_is_wakeup(). Change-Id: If591535448cdd24a54262b534c1a828fc13da759 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4619 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
@ -645,12 +645,18 @@ void acpi_resume(void *wake_vec)
|
||||
/* This is to be filled by SB code - startup value what was found. */
|
||||
u8 acpi_slp_type = 0;
|
||||
|
||||
static int acpi_is_wakeup(void)
|
||||
int acpi_is_wakeup(void)
|
||||
{
|
||||
/* Both resume from S2 and resume from S3 restart at CPU reset */
|
||||
return (acpi_slp_type == 3 || acpi_slp_type == 2);
|
||||
}
|
||||
|
||||
void acpi_fail_wakeup(void)
|
||||
{
|
||||
if (acpi_slp_type == 3 || acpi_slp_type == 2)
|
||||
acpi_slp_type = 0;
|
||||
}
|
||||
|
||||
static acpi_rsdp_t *valid_rsdp(acpi_rsdp_t *rsdp)
|
||||
{
|
||||
if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0)
|
||||
|
Reference in New Issue
Block a user