From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Sami Mujawar <sami.mujawar@arm.com>,
Thomas Panakamattam Abraham <thomas.abraham@arm.com>,
Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
Udit Kumar <udit.kumar@nxp.com>,
Matteo Carlini <Matteo.Carlini@arm.com>,
Nariman Poushin <nariman.poushin@linaro.org>
Subject: Re: [PATCH 2/4] ArmPlatformPkg/SP805WatchdogDxe: switch to interrupt mode
Date: Tue, 18 Dec 2018 17:29:29 +0100 [thread overview]
Message-ID: <CAKv+Gu8=vKQBrEznrcqrcseJQjCTsN8aerJiBA5qbtt0eU=QNg@mail.gmail.com> (raw)
In-Reply-To: <20181218133955.avtfxupuaoj2a6iv@bivouac.eciton.net>
On Tue, 18 Dec 2018 at 14:39, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>
> On Tue, Dec 18, 2018 at 02:10:12PM +0100, Ard Biesheuvel wrote:
> > The SP805 watchdog driver doesn't implement the PI watchdog protocol
> > fully, but always simply resets the system if the watchdog time runs
> > out.
> >
> > However, the hardware does support the intended usage model, as long
> > as the SP805 is wired up correctly. So let's implement interrupt based
> > mode involving a handler that is registered by the DXE core and invoked
> > when the watchdog runs out. In the interrupt handler, we invoke the
> > notify function if one was registered, or call the ResetSystem()
> > runtime service otherwise (as per the UEFI spec)
>
> The only question mark from my end is - what happens when the
> interrupt isn't wired up correctly? Would it be worth to bail out and
> refuse to register the driver if PcdSP805WatchdogInterrupt is set to
> 0?
>
> Thomas?
>
I have left the code in place that enables the hard reset, but the
timeout is double the programmed value (since the countdown timer is
restarted on an interrupt, and the hard reset is generated when it
reaches zero the second time)
This should cover both the miswired interrupt scenario, and the
scenario where ResetSystem() (or the handler) gets stuck and never
returns.
next prev parent reply other threads:[~2018-12-18 16:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 13:10 [PATCH 0/4] ArmPkg, ArmPlatformPkg: watchdog driver cleanup Ard Biesheuvel
2018-12-18 13:10 ` [PATCH 1/4] ArmPlatformPkg/SP805WatchdogDxe: cosmetic cleanup Ard Biesheuvel
2018-12-18 13:35 ` Leif Lindholm
2018-12-18 13:10 ` [PATCH 2/4] ArmPlatformPkg/SP805WatchdogDxe: switch to interrupt mode Ard Biesheuvel
2018-12-18 13:39 ` Leif Lindholm
2018-12-18 16:29 ` Ard Biesheuvel [this message]
2018-12-19 9:03 ` Thomas Abraham
2018-12-18 15:58 ` Udit Kumar
2018-12-18 16:23 ` Ard Biesheuvel
2018-12-18 13:10 ` [PATCH 3/4] ArmPkg/GenericWatchdogDxe: clean up the code Ard Biesheuvel
2018-12-18 13:43 ` Leif Lindholm
2018-12-18 15:19 ` Ard Biesheuvel
2018-12-18 15:24 ` Leif Lindholm
2018-12-18 13:10 ` [PATCH 4/4] ArmPkg/GenericWatchdogDxe: implement RegisterHandler() method Ard Biesheuvel
2018-12-18 13:44 ` Leif Lindholm
2018-12-18 16:00 ` Udit Kumar
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-list 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='CAKv+Gu8=vKQBrEznrcqrcseJQjCTsN8aerJiBA5qbtt0eU=QNg@mail.gmail.com' \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox