ACPI S3: Split arch-agnostic parts
Change-Id: I9fc2d1cdbb280f781045882bc4ac98c67946953e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42614 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
committed by
Angel Pons
parent
dc5539fe16
commit
4a3f67a9f2
@@ -1017,6 +1017,7 @@ unsigned long acpi_create_hest_error_source(acpi_hest_t *hest,
|
||||
void __noreturn acpi_resume(void *wake_vec);
|
||||
void mainboard_suspend_resume(void);
|
||||
void *acpi_find_wakeup_vector(void);
|
||||
int acpi_handoff_wakeup_s3(void);
|
||||
|
||||
/* ACPI_Sn assignments are defined to always equal the sleep state numbers */
|
||||
enum {
|
||||
@@ -1062,20 +1063,16 @@ static inline int acpi_s3_resume_allowed(void)
|
||||
return CONFIG(HAVE_ACPI_RESUME);
|
||||
}
|
||||
|
||||
#if CONFIG(HAVE_ACPI_RESUME)
|
||||
|
||||
#if ENV_ROMSTAGE_OR_BEFORE
|
||||
static inline int acpi_is_wakeup_s3(void)
|
||||
{
|
||||
return (acpi_get_sleep_type() == ACPI_S3);
|
||||
}
|
||||
#else
|
||||
int acpi_is_wakeup_s3(void);
|
||||
#endif
|
||||
if (!acpi_s3_resume_allowed())
|
||||
return 0;
|
||||
|
||||
#else
|
||||
static inline int acpi_is_wakeup_s3(void) { return 0; }
|
||||
#endif
|
||||
if (ENV_ROMSTAGE_OR_BEFORE)
|
||||
return (acpi_get_sleep_type() == ACPI_S3);
|
||||
|
||||
return acpi_handoff_wakeup_s3();
|
||||
}
|
||||
|
||||
static inline uintptr_t acpi_align_current(uintptr_t current)
|
||||
{
|
||||
|
Reference in New Issue
Block a user