Commit fbaad243 authored by David Woodhouse's avatar David Woodhouse Committed by Will Deacon

arm64: acpi: Honour firmware_signature field of FACS, if it exists

If the firmware_signature changes then OSPM should not attempt to resume
from hibernate, but should instead perform a clean reboot. Set the global
swsusp_hardware_signature to allow the generic code to include the value
in the swsusp header on disk, and perform the appropriate check on resume.
Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
Acked-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Acked-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240412073530.2222496-3-dwmw2@infradead.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent bc5b492a
......@@ -26,6 +26,7 @@
#include <linux/libfdt.h>
#include <linux/smp.h>
#include <linux/serial_core.h>
#include <linux/suspend.h>
#include <linux/pgtable.h>
#include <acpi/ghes.h>
......@@ -227,6 +228,15 @@ void __init acpi_boot_table_init(void)
if (earlycon_acpi_spcr_enable)
early_init_dt_scan_chosen_stdout();
} else {
#ifdef CONFIG_HIBERNATION
struct acpi_table_header *facs = NULL;
acpi_get_table(ACPI_SIG_FACS, 1, &facs);
if (facs) {
swsusp_hardware_signature =
((struct acpi_table_facs *)facs)->hardware_signature;
acpi_put_table(facs);
}
#endif
acpi_parse_spcr(earlycon_acpi_spcr_enable, true);
if (IS_ENABLED(CONFIG_ACPI_BGRT))
acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment