Skip to content

Commit

Permalink
drivers: wdat: Do not start unless BIOS enabled it
Browse files Browse the repository at this point in the history
Linux won't use a disabled WDAT watchdog either.

Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
jan-kiszka committed Jun 19, 2024
1 parent c5f08a3 commit 920208a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/watchdog/wdat.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#define ACPI_SIG_XSDT (CHAR8 *)"XSDT"
#define ACPI_SIG_WDAT (CHAR8 *)"WDAT"

#define ACPI_WDAT_ENABLED 1

#pragma pack(1)

/* --------------------------------------------------------------------------
Expand Down Expand Up @@ -437,6 +439,9 @@ static EFI_STATUS init(EFI_PCI_IO __attribute__((unused)) * pci_io,
if (EFI_ERROR(status)) {
return status;
}
if (!(wdat_table->flags & ACPI_WDAT_ENABLED)) {
return EFI_UNSUPPORTED;
}
INFO(L"Detected WDAT watchdog\n");

/* Check if the boot was caused by the watchdog */
Expand Down

0 comments on commit 920208a

Please sign in to comment.