All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] watchdog: add watchdog behavior configuration
Date: Sat, 26 Sep 2020 10:45:31 +0200	[thread overview]
Message-ID: <4185392.1601109931@gemini.denx.de> (raw)
In-Reply-To: <81e467f1-aff3-a54d-5f7e-3b8f5390f410@gmx.de>

Dear Heinrich,

In message <81e467f1-aff3-a54d-5f7e-3b8f5390f410@gmx.de> you wrote:
>
> Chapter 2.3.7 RISC-V Platforms
>
> p. 40
> "The causes of reset could be power-on reset, external hard reset,
> brownout detected, watchdog timer elapse, sleep-mode wakeup, etc., which
> machine-mode UEFI system firmware has to distinguish."

This is possible only if the hardware actually supports such
distinction.  In many cases of actual hardware I've seen a watchdog
reset is just the same as an external hard reset, and brownout
detection does not exist.

 p. 70
> "If LoadImage() succeeds, the boot manager must enable the watchdog
> timer for 5 minutes by using the EFI_BOOT_SERVICES.SetWatchdogTimer()
> boot service prior to calling EFI_BOOT_SERVICES.StartImage(). If a boot
> option returns control to the boot manager, the boot manager must
> disable the watchdog timer with an additional call to the
> SetWatchdogTimer() boot service."
>
> Chapter 7.4 EFI_BOOT_SERVICES.ExitBootServices()
>
> p. 222
> "On success ... the boot services watchdog timer is disabled."
>
> Chapter 7.5 EFI_BOOT_SERVICES.SetWatchdogTimer()
>
> This chapter describes management of the watchdog timer. You can set any
> duration with 1 second resolution. A value of 0 will disable the watchdog.

To me this makes clear that what they are talking about is not a
hardware watchdog, which may not offer such flexibility, but a
software layer (driver) that provides such an API to the underlying
hardware.  Again depending on the capabilities of the actual
hardware.

> p. 223
> "If the watchdog timer expires, the event is logged by the firmware. The

And what if the hardware cannot detect this, for example because the
watchdog is an external chip that just pulls the external reset
line?

> ... The watchdog must be set to a
> period of 5 minutes. ...

Again: here "watchdog" can only mean some software component. Many
hardware watchdogs do not allow for such long timeouts at all.

> Appendix R - Glossary
>
> p. 2444
> Watchdog Time
> An alarm timer that may be set to go off. This can be used to regain
> control in cases where a code path in the boot services environment
> fails to or is unable to return control by the expected path.

Again this does not sound as if they were talking about a specific
hardware watchdog.  All this is about software services only, it
seem.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Egotist: A person of low taste, more interested in  himself  than  in
me.                                                  - Ambrose Bierce

  reply	other threads:[~2020-09-26  8:45 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 16:45 [PATCH 1/2] watchdog: Hide WATCHDOG_RESET_DISABLE Michael Walle
2020-09-23 16:45 ` [PATCH 2/2] watchdog: add watchdog behavior configuration Michael Walle
2020-09-23 17:01   ` Mark Kettenis
2020-09-23 17:14     ` Tom Rini
2020-09-23 17:31       ` Heinrich Schuchardt
2020-09-23 17:35         ` Tom Rini
2020-09-24  7:33           ` Michael Walle
2020-09-24  8:10             ` Mark Kettenis
2020-09-24  8:20               ` Michael Walle
2020-09-24 10:22                 ` Mark Kettenis
2020-09-24 21:05                   ` Michael Walle
2020-09-24 13:19             ` Tom Rini
2020-09-24 20:30               ` Michael Walle
2020-09-24 20:58                 ` Mark Kettenis
2020-09-24 21:14                   ` Michael Walle
2020-09-25  1:17                     ` Tom Rini
2020-09-25  8:36               ` Wolfgang Denk
2020-09-25 11:29                 ` Heinrich Schuchardt
2020-09-25 13:00                   ` Tom Rini
2020-09-25 13:26                     ` Heinrich Schuchardt
2020-09-26  8:45                       ` Wolfgang Denk [this message]
2020-09-26 10:54                         ` Mark Kettenis
2020-09-26 12:39                           ` Heinrich Schuchardt
2020-09-26 12:44                             ` Tom Rini
2020-09-27 16:06                               ` Michael Walle
2020-09-28 15:34                                 ` Tom Rini
2020-09-26 14:40                             ` Wolfgang Denk
2020-09-26 14:22                           ` Wolfgang Denk
2020-09-25 13:04                   ` Wolfgang Denk
2020-10-04 14:55                     ` Michael Walle
2020-10-04 15:10                       ` Heinrich Schuchardt
2020-10-04 15:40                         ` Tom Rini
2020-09-23 17:53       ` Mark Kettenis
2020-09-23 18:51         ` Heinrich Schuchardt
2020-09-23 19:02           ` Tom Rini
2020-09-23 20:01             ` Heinrich Schuchardt
2020-09-23 20:23               ` Tom Rini
2020-09-23 20:58                 ` Heinrich Schuchardt
2020-09-23 21:09                   ` Tom Rini
2020-09-23 20:38           ` Michael Walle
2020-09-23 21:01             ` Heinrich Schuchardt
2020-09-23 17:21   ` Heinrich Schuchardt
2020-09-23 17:28     ` Tom Rini
2020-09-24  6:53       ` Michael Walle

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=4185392.1601109931@gemini.denx.de \
    --to=wd@denx.de \
    --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.