Hi Jan,

On Wed, 2024-06-19 at 20:22 +0200, 'Jan Kiszka' via EFI Boot Guard wrote:
> From: Jan Kiszka <jan.kis...@siemens.com>
> 
> Linux won't use a disabled WDAT watchdog either.
> 
> Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
> ---
>  drivers/watchdog/wdat.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/watchdog/wdat.c b/drivers/watchdog/wdat.c
> index f5cb5e4..0875a50 100644
> --- a/drivers/watchdog/wdat.c
> +++ b/drivers/watchdog/wdat.c
> @@ -33,6 +33,8 @@
>  #define ACPI_SIG_XSDT (CHAR8 *)"XSDT"
>  #define ACPI_SIG_WDAT (CHAR8 *)"WDAT"
>  
> +#define ACPI_WDAT_ENABLED    1
> +
>  #pragma pack(1)
>  
>  /* ------------------------------------------------------------------------
> --
> @@ -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)) {

Could we add an debug message to show why it failed; something similar to

ERROR(L"WDAT is not enabled in BIOS\n");


With that considered, 

Reviewed-by: Christopher Obbard <chris.obb...@collabora.com>



> +             return EFI_UNSUPPORTED;
> +     }
>       INFO(L"Detected WDAT watchdog\n");
>  
>       /* Check if the boot was caused by the watchdog */
> -- 
> 2.43.0
> 

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to efibootguard-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/550e3670141610d4c592e46553e8a9a9c2955a29.camel%40collabora.com.

Reply via email to