ACPI S3 support: Add acpi_s3_resume_allowed()
Add this to reduce the amount of preprocessor conditionals used in the source, compiler currently resolves this to a constant. Once we have gone through all #if CONFIG_HAVE_ACPI_RESUME cases, we may change the implementation to enable/disable S3 support runtime. Change-Id: I0e2d9f81e2ab87c2376a04fab38a7c951cac7a07 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6060 Tested-by: build bot (Jenkins)
This commit is contained in:
@ -756,17 +756,17 @@ extern unsigned int __wakeup_size;
|
||||
|
||||
void acpi_jump_to_wakeup(void *vector)
|
||||
{
|
||||
#if CONFIG_RELOCATABLE_RAMSTAGE
|
||||
u32 acpi_backup_memory = 0;
|
||||
#else
|
||||
u32 acpi_backup_memory = (u32)cbmem_find(CBMEM_ID_RESUME);
|
||||
|
||||
if (!acpi_backup_memory) {
|
||||
printk(BIOS_WARNING, "ACPI: Backup memory missing. "
|
||||
"No S3 resume.\n");
|
||||
return;
|
||||
if (HIGH_MEMORY_SAVE && acpi_s3_resume_allowed()) {
|
||||
acpi_backup_memory = (u32)cbmem_find(CBMEM_ID_RESUME);
|
||||
|
||||
if (!acpi_backup_memory) {
|
||||
printk(BIOS_WARNING, "ACPI: Backup memory missing. "
|
||||
"No S3 resume.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_SMP
|
||||
// FIXME: This should go into the ACPI backup memory, too. No pork sausages.
|
||||
|
Reference in New Issue
Block a user