On 2016-04-26, Theo de Raadt <dera...@cvs.openbsd.org> 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 ..