Skip to content

Commit fbaad24

Browse files
dwmw2willdeacon
authored andcommitted
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: David Woodhouse <[email protected]> Acked-by: Sudeep Holla <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent bc5b492 commit fbaad24

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/arm64/kernel/acpi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/libfdt.h>
2727
#include <linux/smp.h>
2828
#include <linux/serial_core.h>
29+
#include <linux/suspend.h>
2930
#include <linux/pgtable.h>
3031

3132
#include <acpi/ghes.h>
@@ -227,6 +228,15 @@ void __init acpi_boot_table_init(void)
227228
if (earlycon_acpi_spcr_enable)
228229
early_init_dt_scan_chosen_stdout();
229230
} else {
231+
#ifdef CONFIG_HIBERNATION
232+
struct acpi_table_header *facs = NULL;
233+
acpi_get_table(ACPI_SIG_FACS, 1, &facs);
234+
if (facs) {
235+
swsusp_hardware_signature =
236+
((struct acpi_table_facs *)facs)->hardware_signature;
237+
acpi_put_table(facs);
238+
}
239+
#endif
230240
acpi_parse_spcr(earlycon_acpi_spcr_enable, true);
231241
if (IS_ENABLED(CONFIG_ACPI_BGRT))
232242
acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);

0 commit comments

Comments
 (0)