All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Carlo Caione <ccaione@baylibre.com>
Cc: u-boot@lists.denx.de, xypron.glpk@gmx.de, ilias.apalodimas@linaro.org
Subject: Re: [PATCH] efi_loader: stop watchdog devices in ExitBootServices()
Date: Sat, 4 Jul 2026 08:32:51 -0600	[thread overview]
Message-ID: <20260704143251.GK749385@bill-the-cat> (raw)
In-Reply-To: <20260704135258.68543-1-ccaione@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

On Sat, Jul 04, 2026 at 03:52:29PM +0200, Carlo Caione wrote:

> U-Boot can autonomously start a hardware watchdog
> (CONFIG_WATCHDOG_AUTOSTART, default y) and service it from its main
> loop, but the EFI boot path never stops it: efi_exit_boot_services()
> tears the devices down without calling wdt_stop_all(), and a watchdog
> driver without a .remove hook leaves the hardware ticking across the
> firmware-to-OS handoff.
> 
> An EFI-booted OS that does not take over the SoC watchdog within the
> remaining timeout is reset mid-boot at a wall-clock-dependent point.
> 
> The UEFI specification (v2.11, section 7.5 "Miscellaneous Boot
> Services", EFI_BOOT_SERVICES.SetWatchdogTimer()) is explicit about the
> one watchdog it allows across the handoff:
> 
>   "The watchdog timer is only used during boot services. On
>    successful completion of EFI_BOOT_SERVICES.ExitBootServices() the
>    watchdog timer is disabled."
> 
> U-Boot's UEFI watchdog (an EFI timer event) complies by construction. A
> platform watchdog silently surviving the handoff defeats the purpose of
> that rule: the OS has no generic way to know it is running, let alone to
> service it.
> 
> Stop all watchdog devices in efi_exit_boot_services(), before the device
> teardown.
> 
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>

NAK. We have had this come up before, and in short, the UEFI
specification needs to be fixed here, as generally speaking a watchdog
should never be stopped, as that leaves a gap where the system can hang
and thus defeat the point of having enabled a watchdog.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-07-04 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-04 13:52 [PATCH] efi_loader: stop watchdog devices in ExitBootServices() Carlo Caione
2026-07-04 14:32 ` Tom Rini [this message]
2026-07-04 15:21   ` Carlo Caione
2026-07-04 15:53     ` Mark Kettenis
2026-07-04 16:17     ` Tom Rini
2026-07-04 16:46       ` Heinrich Schuchardt
2026-07-04 16:53         ` Tom Rini
2026-07-04 16:59       ` Heinrich Schuchardt
2026-07-04 17:15         ` Tom Rini
2026-07-04 17:15           ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260704143251.GK749385@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ccaione@baylibre.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.