From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sat, 26 Sep 2020 10:45:31 +0200 Subject: [PATCH 2/2] watchdog: add watchdog behavior configuration In-Reply-To: <81e467f1-aff3-a54d-5f7e-3b8f5390f410@gmx.de> References: <20200923164527.26894-1-michael@walle.cc> <20200923164527.26894-2-michael@walle.cc> <8ba6107a460b8647@bloch.sibelius.xs4all.nl> <20200923171409.GT14816@bill-the-cat> <8070fb73-d42b-fa66-98a6-a2b9926b2d3f@gmx.de> <20200923173504.GV14816@bill-the-cat> <20200924131931.GF14816@bill-the-cat> <4098208.1601022997@gemini.denx.de> <20200925130039.GI14816@bill-the-cat> <81e467f1-aff3-a54d-5f7e-3b8f5390f410@gmx.de> Message-ID: <4185392.1601109931@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.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