mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org,
	Frederick Gotham <cauldwell.thomas@gmail.com>
Subject: Re: Watchdog Timer with x86 processor
Date: Tue, 7 Jan 2020 16:38:57 +0100	[thread overview]
Message-ID: <223f55e5-85ce-3c0b-795c-885d180e7ceb@pengutronix.de> (raw)
In-Reply-To: <XnsAB3D73D8140D5fgotham@195.159.176.226>

Hi,

On 1/7/20 12:23 PM, Frederick Gotham wrote:
> What I have NOT dealt with though, is the case of the device freezing mid-
> boot. So let's say that Barebox tries to load the Linux kernel, and let's say 
> the kernel get 15% loaded and then it freezes. If this happens, I need the 
> device to reboot.
> 
> How would you go about this? Would you use the watchdog timer in the BIOS, or 
> would you use the one in Barebox?

First you need to determine what watchdogs you have and determine which to choose
- Do you have a Super I/O chip? Does it have a watchdog?
- You have an iTCO watchdog. Are e.g. smbus devices correctly reset with an iTCO
  reset? A Super I/O reset might be more 'global'

Then you need to check what interfaces you have:
- Can the BIOS enable the watchdog?
- Can the BIOS provide a WDAT ACPI table for your watchdog?

Having the BIOS enable the watchdog is preferable, because then you can monitor
barebox execution reliably as well. If your BIOS can't do that, it exports
the wrong watchdog or you would like easy access to the barebox shell without
being reset all the time, you can then evaluate which driver would work
best for you:

- implement iTCO watchdog driver in barebox
- implement Super I/O watchdog in barebox (Porting over the Fintek Watchdog
  from Linux was quite straight-forward)
- implement WDAT watchdog in barebox

I've taken a look at my iTCO driver and it works mostly fine for iTCO version 3
(QEMU), but you'll probably need to port the missing parts for your particular
version from the kernel. I'll clean it up and send it to the list later this week. 

Cheers
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2020-01-07 15:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 13:27 Frederick Gotham
2020-01-06 13:47 ` Rouven Czerwinski
2020-01-06 14:13   ` Ahmad Fatoum
2020-01-07 11:23     ` Frederick Gotham
2020-01-07 15:38       ` Ahmad Fatoum [this message]

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=223f55e5-85ce-3c0b-795c-885d180e7ceb@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=cauldwell.thomas@gmail.com \
    /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