All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Michael Walle <michael@walle.cc>
Cc: andre.przywara@arm.com, etienne.carriere@linaro.org,
	ilias.apalodimas@linaro.org, sjg@chromium.org,
	trini@konsulko.com, u-boot@lists.denx.de,
	rasmus.villemoes@prevas.dk
Subject: Re: [PATCH 1/1] efi_loader: stop watchdogs in ExitBootServices()
Date: Tue, 7 Feb 2023 16:08:58 +0100	[thread overview]
Message-ID: <e88945eb-e563-147f-b387-a14b5612960a@canonical.com> (raw)
In-Reply-To: <20230207145955.2468379-1-michael@walle.cc>

On 2/7/23 15:59, Michael Walle wrote:
>>>> Honestly, not really? Some good number of SoCs will start the watchdog
>>>> in ROM and these are also the ones that don't allow you to turn it off.
>>>
>>> I hope not, that sounds really risky. How would you debug such a platform?
>>
>> _Every single_ custom piece of industrial (as opposed to consumer-grade)
>> hardware I've worked on as a consultant has had an external,
>> always-running, gpio-petted watchdog. It's simply just something that
>> the hardware designers include, and in some cases that's even due to
>> certification requirements. So an always-running, cannot-be-turned-off,
>> watchdog is a real thing, in real hardware, and if specs don't account
>> for that, well, the spec is just paper, and we can ignore it.
> 
> I agree. But on the other hand, you cannot assume or force the OS to
> have a watchdog driver in the general case - which is as I understand
> it - one goal of EFI.
> 
> Obviously, there are watchdogs that can be disabled and some which
> cannot. I don't want to argue about the advantages and disadvantages.
> 
> For watchdogs which cannot be turned off, we can't really do anything
> anyway after the handoff to the OS - except increasing its timeout if
> thats possible.
> 
> For watchdogs that can be disabled (and are enabled in u-boot of course),
> there seems to be two use-cases:
>   (1) embedded EFI boot, that is you know exactly what you are booting, i.e.
>       self compiled kernel with a watchdog driver
>   (2) booting a general OS via EFI, think of a debian boot CD for example.
> 
> I agree, that for (1) the watchdog shouldn't be disabled. For (2) you
> cannot assume the booting OS has a driver for the watchdog, let it be an
> older version of a distribution which just haven't the SoC watchdog driver
> enabled or maybe because there is no driver for it at all (yet).
> 
> Is there a way, to have the watchdog disabled for case (2) while also
> having the possibity to use bootm/booti/bootz and keep the watchdog
> enabled? Basically I want the following:
> 
> (1) board boots with watchdog enabled
> (2) u-boot services watchdog
> (3a) booting embedded linux with booti (watchdog enabled) or
> (3b) booting generic OS with bootefi (watchdog disabled)
> 
> The missing case is booting an embedded linux with bootefi, which
> would be nice to have. But I don't really see it as a use-case for
> our board.
> 
> -michael

For SUNXI boards disabling CONFIG_WATCHDOG_AUTOSTART solved the problem 
with the very short maximum expiration time of the watchdog.

Best regards

Heinrich

  reply	other threads:[~2023-02-07 15:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  8:57 [PATCH 1/1] efi_loader: stop watchdogs in ExitBootServices() Heinrich Schuchardt
2023-01-30 18:13 ` Tom Rini
2023-01-30 18:30   ` Tom Rini
2023-01-31 12:03     ` Ilias Apalodimas
2023-01-31 14:16       ` Simon Glass
2023-01-31 14:48         ` Heinrich Schuchardt
2023-01-31 15:07       ` Tom Rini
2023-02-01  8:32         ` Rasmus Villemoes
2023-02-01  9:00           ` Heinrich Schuchardt
2023-02-02  8:17             ` Etienne Carriere
2023-02-02 17:12               ` Simon Glass
2023-02-02 17:22                 ` Tom Rini
2023-02-03  2:15                   ` Simon Glass
2023-02-03  7:30                     ` Rasmus Villemoes
2023-02-07 14:59                       ` Michael Walle
2023-02-07 15:08                         ` Heinrich Schuchardt [this message]
2023-02-07 15:29                           ` Michael Walle
2023-02-07 15:30                             ` Heinrich Schuchardt
2023-02-07 15:34                               ` Michael Walle
2023-02-03 15:51                     ` Tom Rini
2023-02-04  0:20                       ` Simon Glass
2023-02-01 12:49           ` Mark Kettenis
2023-02-01 15:21             ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2021-11-09 10:19 Heinrich Schuchardt
2021-11-09 10:19 ` Heinrich Schuchardt
2021-11-09 14:20   ` Michael Walle
2021-11-09 14:46     ` Mark Kettenis
2021-11-09 14:54       ` Michael Walle
2021-11-09 17:30         ` Heinrich Schuchardt
2021-11-09 17:55   ` Tom Rini
2021-11-09 18:15     ` Heinrich Schuchardt
2021-11-09 18:18       ` Tom Rini
2021-11-09 21:47         ` Andre Przywara
2021-11-09 23:45     ` Grant Likely

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=e88945eb-e563-147f-b387-a14b5612960a@canonical.com \
    --to=heinrich.schuchardt@canonical.com \
    --cc=andre.przywara@arm.com \
    --cc=etienne.carriere@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=michael@walle.cc \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.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.