ACPI S3: Handle LATE_CBMEM_INIT boards
Followup removes inlined acpi_is_wakeup_s3() from PRE_RAM, and new implementation depends of CAR_GLOBAL. Change-Id: Iea1c5ab2175f8d496baa09bd6137cacc912df2cb Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21398 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
d35c06d09e
commit
916b331a8d
|
@ -128,6 +128,7 @@ static void vErrata343(void)
|
|||
asmlinkage void * post_cache_as_ram(void)
|
||||
{
|
||||
uint32_t family = amd_fam1x_cpu_family();
|
||||
int s3resume = 0;
|
||||
|
||||
/* Verify that the BSP didn't overrun the lower stack
|
||||
* boundary during romstage execution
|
||||
|
@ -139,12 +140,17 @@ asmlinkage void * post_cache_as_ram(void)
|
|||
if ((*lower_stack_boundary) != 0xdeadbeef)
|
||||
printk(BIOS_WARNING, "BSP overran lower stack boundary. Undefined behaviour may result!\n");
|
||||
|
||||
int s3resume = acpi_is_wakeup_s3();
|
||||
|
||||
/* Boards with EARLY_CBMEM_INIT need to do this in cache_as_ram_main().
|
||||
if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) {
|
||||
s3resume = acpi_is_wakeup_s3();
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME))
|
||||
s3resume = (acpi_get_sleep_type() == ACPI_S3);
|
||||
/* For normal boot path, boards with LATE_CBMEM_INIT will do
|
||||
* cbmem_initialize_empty() late in ramstage.
|
||||
*/
|
||||
if (s3resume && !IS_ENABLED(CONFIG_EARLY_CBMEM_INIT))
|
||||
if (s3resume)
|
||||
cbmem_recovery(s3resume);
|
||||
}
|
||||
|
||||
prepare_romstage_ramstack(s3resume);
|
||||
|
||||
|
|
Loading…
Reference in New Issue