Bug 252021 - ichwd(4) does not clear the NO_REBOOT flag correctly on Lewisburg chipsets
Summary: ichwd(4) does not clear the NO_REBOOT flag correctly on Lewisburg chipsets
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-21 17:13 UTC by Jan Martin Mikkelsen
Modified: 2020-12-27 00:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Martin Mikkelsen 2020-12-21 17:13:52 UTC
Loading ichwd(4) on a Supermicro X11SPA-T motherboard with 12.2 gives this response:

ichwd0: <Lewisburg watchdog timer> at port 0x400-0x41f iomem 0xfdc6000c-0xfdc6000f on isa0
ichwd0: ICH WDT present but disabled in BIOS or hardware

The motherboard jumpers are enabled.

In ichwd(4), Lewisburg is configured with TCO version 4. The Linux driver configures Lewisburg with TCO version 2.

In src/sys/dev/ichwd/ichwd.c, ichwd_clear_noreboot() uses SMB_GC_NO_REBOOT (0x02) as the the mask for clearing the NO_REBOOT flag for TCO version 4 devices.

Changing this mask to ICH_GCS_NO_REBOOT (0x20, as used in the TCO version 2 case) successfully clears the NO_REBOOT big on restart and makes the watchdog work correctly.

"TCO version" seems a bit overloaded here, I'm not exactly sure what a correct fix should look like.