* Watchdog Timer with x86 processor
@ 2020-01-06 13:27 Frederick Gotham
2020-01-06 13:47 ` Rouven Czerwinski
0 siblings, 1 reply; 5+ messages in thread
From: Frederick Gotham @ 2020-01-06 13:27 UTC (permalink / raw)
To: barebox
I have an embedded Linux project with an x86_64 CPU.
I'm looking through the Barebox documentation and it seems that there's a lot
of support for ARM, but I'm trying to find something that will work with my
Intel processor.
When I go into the "menuconfig", I see the following symbols:
WATCHDOG
RAVE_SP_WATCHDOG
WATCHDOG_AR9344
WATCHDOG_BCM2835
WATCHDOG_DAVINCI
WATCHDOG_DW
WATCHDOG_IMX
WATCHDOG_IMX_RESET_SOURCE
WATCHDOG_JZ4740
WATCHDOG_MXS28
WATCHDOG_OMAP
WATCHDOG_ORION
WATCHDOG_POLLER
Right now the only one that I have enabled is:WATCHDOG. I think the Intel
Watchdog timer is referred to as iTCO_wdt, but I don't see it in the above
list.
Is it possible to use the Barebox bootloader with a watchdog timer on an x86
CPU?
Frederick
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Watchdog Timer with x86 processor
2020-01-06 13:27 Watchdog Timer with x86 processor Frederick Gotham
@ 2020-01-06 13:47 ` Rouven Czerwinski
2020-01-06 14:13 ` Ahmad Fatoum
0 siblings, 1 reply; 5+ messages in thread
From: Rouven Czerwinski @ 2020-01-06 13:47 UTC (permalink / raw)
To: Frederick Gotham, barebox
Hi Frederick,
On Mon, 2020-01-06 at 13:27 +0000, Frederick Gotham wrote:
> I have an embedded Linux project with an x86_64 CPU.
>
> I'm looking through the Barebox documentation and it seems that
> there's a lot
> of support for ARM, but I'm trying to find something that will work
> with my
> Intel processor.
>
> When I go into the "menuconfig", I see the following symbols:
>
> WATCHDOG
> RAVE_SP_WATCHDOG
> WATCHDOG_AR9344
> WATCHDOG_BCM2835
> WATCHDOG_DAVINCI
> WATCHDOG_DW
> WATCHDOG_IMX
> WATCHDOG_IMX_RESET_SOURCE
> WATCHDOG_JZ4740
> WATCHDOG_MXS28
> WATCHDOG_OMAP
> WATCHDOG_ORION
> WATCHDOG_POLLER
Your list is interesntigly missing WATCHDOG_EFI, which can be used on
x86_64 machines.
> Right now the only one that I have enabled is:WATCHDOG. I think the
> Intel
> Watchdog timer is referred to as iTCO_wdt, but I don't see it in the
> above
> list.
> Is it possible to use the Barebox bootloader with a watchdog timer on
> an x86
> CPU?
https://www.barebox.org/doc/latest/boards/efi.html?highlight=watchdog#u-efi-watchdog
is probably the relevant documentation for this, the watchdog for efi
is implemented in drivers/watchdog/efi_wdt.c.
Regards,
Rouven
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Watchdog Timer with x86 processor
2020-01-06 13:47 ` Rouven Czerwinski
@ 2020-01-06 14:13 ` Ahmad Fatoum
2020-01-07 11:23 ` Frederick Gotham
0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2020-01-06 14:13 UTC (permalink / raw)
To: barebox
On 1/6/20 2:47 PM, Rouven Czerwinski wrote:
> Your list is interesntigly missing WATCHDOG_EFI, which can be used on
> x86_64 machines.
As described in the linked documentation, it's useless for monitoring Linux
boot, because it's a boot service and these are terminated very early in the
Linux boot process.
Only usable x86 watchdog we have at the moment is the Fintek Super I/O watchdog.
If you have another Super I/O, but your BIOS exports a WDAT ACPI table, barebox
v2019.01.0 will come with ACPI driver support, so you could write an ACPI driver on
top. Alternatively, you could turn on the watchdog in the BIOS and leave barebox
out of it altogether.
I've an iTCO patch series sitting on a local branch. I'll take a look and see
if it's usable. Main problem is that the iTCO is accessible over PCI, but we
have no EFI PCI support in barebox so far[1].
[1]: There's an incomplete patch series here:
https://www.mail-archive.com/barebox@lists.infradead.org/msg33441.html
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Watchdog Timer with x86 processor
2020-01-06 14:13 ` Ahmad Fatoum
@ 2020-01-07 11:23 ` Frederick Gotham
2020-01-07 15:38 ` Ahmad Fatoum
0 siblings, 1 reply; 5+ messages in thread
From: Frederick Gotham @ 2020-01-07 11:23 UTC (permalink / raw)
To: barebox
Ahmad Fatoum <a.fatoum@pengutronix.de> wrote in
news:ee89e9f9-7ddf-ef42-0ad6-5881c74ebb48@pengutronix.de:
> As described in the linked documentation, it's useless for monitoring
> Linux boot, because it's a boot service and these are terminated very
> early in the Linux boot process.
>
> Only usable x86 watchdog we have at the moment is the Fintek Super I/O
> watchdog. If you have another Super I/O, but your BIOS exports a WDAT
> ACPI table, barebox v2019.01.0 will come with ACPI driver support, so
> you could write an ACPI driver on top. Alternatively, you could turn on
> the watchdog in the BIOS and leave barebox out of it altogether.
Just to be clear about what I'm doing.
I have an embedded Linux device whose CPU is 64-Bit quad-core.
Once the device has successfully booted up, there is a watchdog timer that
makes sure everything keeps running smoothly. So if my device freezes AFTER
it boots up successfully, then this eventuality is dealt with.
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?
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Watchdog Timer with x86 processor
2020-01-07 11:23 ` Frederick Gotham
@ 2020-01-07 15:38 ` Ahmad Fatoum
0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2020-01-07 15:38 UTC (permalink / raw)
To: barebox, Frederick Gotham
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-07 15:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 13:27 Watchdog Timer with x86 processor 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox