Re: FW: watchdog suport for new hardware

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: FW: watchdog suport for new hardware

Chase Davis
Theo / Stuart,


I am e-mailing regarding the source code that Stan Brown sent for a new
watchdog driver. We modeled our code off of the wbsio driver that does a
write to the Super I/O chip first in order to read the device ID and
compare it with a known list of device IDs. The device that we wrote the
driver for does have an entry in the DSDT table of SEL0002, but when we
wrote the driver as an acpi device, the probe function never found an HID
of SEL0002.


I understand your concern about “stepping” on another device. This device
is found at IO port 0x192 which could potentially be re-used by some other
device I would assume. Is there a way to read the DSDT tables from within
an ISA probe function? I couldn’t wrap my head around that process as the
ISA bus on this particular machine is hosted by a PCI-ISA bridge. Any help
you could provide would be appreciated.

Thanks,
Chase Davis


>
> From: stan <[hidden email]>
> To: Stuart Henderson <[hidden email]>
> Subject: Re: FW: Re: watchdog suport for new hardware
> Date: Tue, 26 Apr 2016 11:57:48 -0400
> User-Agent: Mutt/1.5.4i
> X-Operating-System: Debian GNU/Linux
> X-Kernel-Version: 2.4.23
> X-Uptime: 11:51:45 up 91 days, 10:53,  1 user,  load average: 0.00, 0.00,
> 0.00
> X-Editor: gVim
>
> On Tue, Apr 26, 2016 at 03:44:46PM +0000, Stuart Henderson wrote:
>
> On 2016-04-26, Theo de Raadt <[hidden email]> wrote:
>
> int
>
> selwd_probe(struct device *parent, void *match, void *aux)
>
> {
>
>    struct isa_attach_args *ia = aux;
>
>    bus_space_tag_t iot;
>
>    bus_space_handle_t ioh;
>
>
>
>    /* Match by device ID */
>
>    iot = ia->ia_iot;
>
>    if (bus_space_map(iot, ia->ipa_io[0].base, SELWD_IOSIZE, 0, &ioh))
>
>        return 0;
>
>
>
> ...
>
>
>
>    /* read model number */
>
>    char *model = malloc(sizeof(char)*16, M_DEVBUF, M_WAITOK | M_ZERO);
>
>    selwd_read_modelno(iot, ioh, model);
>
>
>
> This is worrying.  It assumes that all systems have this hardware.
>
>
>
> And it starts by doing a "write".
>
>
>
> Is there no WDRT or WDAT table in ACPI on this hardware? Most "modern"
>
> (2006-on) watchdogs on PCs with ACPI support have the WDRT table described
>
> in https://msdn.microsoft.com/en-us/windows/hardware/gg463320.aspx
>
>
>
> Check for /tmp/acpi.WD[AR]T.* files after running acpidump -o /tmp/acpi ..
>
>
>
>
> Acording to the vendor documentation, yes we should be able to find SEL0002
> in the DSDT table. I am afrid I do not understand how to chek this. Could
> you point me to some documentation as to how to do this?
>
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> ----- End forwarded message -----
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
>
> ------------------------------
>
> Confidentiality Notice:
>
> The information contained in this message is private and confidential.
> This information is intended only for the individual or entity named above.
> If the reader of this message is not the intended recipient, you are hereby
> notified that any use, review, dissemination, distribution, copying or
> action taken based on this message or its attachments, if any, is strictly
> prohibited. If you are not the intended recipient, please contact the
> sender by reply email and delete or destroy all copies of this message and
> any attachments. Thank you.
>



--
Chase Davis