romstage_handoff: add helper to determine resume status
Instead of having callers query the romstage handoff resume status by inspecting the object themselves add romstage_handoff_is_resume() so that the same information can be queried easily. Change-Id: I40f3769b7646bf296ee4bc323a9ab1d5e5691e21 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/17647 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
@@ -32,14 +32,7 @@ int acpi_slp_type = -1;
|
||||
#if IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)
|
||||
int acpi_get_sleep_type(void)
|
||||
{
|
||||
struct romstage_handoff *handoff;
|
||||
|
||||
handoff = cbmem_find(CBMEM_ID_ROMSTAGE_INFO);
|
||||
|
||||
if (handoff == NULL) {
|
||||
printk(BIOS_DEBUG, "Unknown boot method, assuming normal.\n");
|
||||
return ACPI_S0;
|
||||
} else if (handoff->s3_resume) {
|
||||
if (romstage_handoff_is_resume()) {
|
||||
printk(BIOS_DEBUG, "S3 Resume.\n");
|
||||
return ACPI_S3;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user