Watchdog Function Description Super Micro Computer, Inc. 03/20/2002 Supported Board: P4SBx, P4DPx To enable Watchdog function: 1. BIOS For P4SBx: BIOS setup --> Advanced --> Integrated Peripherals --> Watch Dog Feature For P4DPx: BIOS setup --> Advanced --> I/O Device Configuration --> Watch Dog This setting enables or disables Watchdog function. When enabled, the default watchdog timer is set to be 5 minutes (about 4’35”). It is enough to load and run the OS. The application (service or driver) has to take over the control once OS is running up and before watchdog expires. 2. JUMPER For P4SBx: JP39 For P4DPx: JP37 This jumper is used for safety. Closed is enabled. This jumper prevents user enables watchdog in BIOS by accident. To enable Watch Dog function, both BIOS and JUMPER must be enabled. I/O port Description: Port 0x2e: Register Index Port 0x2f: Data Input/Output Control Registers Description (all the following registers can be read or written): Register 0x07: Control Page Switch. Default value (unknown) Value == 0x08 --> Switches to Watchdog Control Page Register 0x30 (bit 0): Hardware Output Enable/Disable. Default value 0x01 Value == 0x00 --> Disables watchdog. Application may write 0x00 to this register to disable watchdog function on purpose. Value == 0x01 --> Enables watchdog. Register 0xf5 (bit 3): Count Mode selection. Default value 0x08 Value == 0x00 --> Timer counts in unit of second. Value == 0x08 --> Timer counts in unit of minute. When the value in this port counts down to zero, it will reload the value from port 0x461 automatically, and set the flag in port 0x464. Write any value to this port will cause the value be reloaded from port 0x461. Register 0xf6 (bit 0 - bit 7): Watchdog timer. Default value 0x05 Watchdog timer time-out value. Read: current value in watchdog counter. Write: pre-defined time-out value. This register will be re-loaded dependents on the setting of register 0xf7 below. Register 0xf7 (bit 6 & bit 7): Watchdog reset control. Default value 0xc0 Bit 7 == 1 --> Watchdog timer is reset upon a mouse interrupt. Bit 7 == 0 --> Watchdog timer is not affected by mouse interrupt. Bit 6 == 1 --> Watchdog timer is reset upon a keyboard interrupt. Bit 6 == 0 --> Watchdog timer is not affected by keyboard interrupt. Note: although OS crashed, user keeps hitting the keyboard or mouse, then system won’t reboot if bit7 and/or bit6 is set. In application (service, or driver): A particular procedure must be executed to control Watchdog every time. Before control Watchdog: Out 0x87 to Port 0x2e twice. Out 0x08 to Register 0x07. After control Watchdog: Out 0xaa to Port 0x2e once. Periodic Routine: Write time-out value to register 0xf6 before timer expires. Examples: (time-out value is 5) mov dx, 2eh mov al, 87h out dx, al out dx, al ; write 0x87 to port 0x2e twice mov al, 07h out dx, al ; set Register 0x07 to Index Port mov dx, 2fh mov al, 08h out dx, al ; switch to Watchdog control page mov dx, 2eh mov al, f6h out dx, al ; set Register 0xf7 to Index Port mov dx, 2fh mov al, 5h out dx, al ; write time-out value 0x5 to Data Port mov dx, 2eh mov al, aah out dx, al ; write 0xaa to port 0x2e once Examples: Disable Keyboard Reset Control: mov dx, 2eh mov al, 87h out dx, al out dx, al ; write 0x87 to port 0x2e twice mov al, 07h out dx, al ; set Register 0x07 to Index Port mov dx, 2fh mov al, 08h out dx, al ; switch to Watchdog control page mov dx, 2eh mov al, f7h out dx, al ; set Register 0xf7 to Index Port mov dx, 2fh in al, dx ; read current setting from Register 0xf7 and al, 10111111b ; disable keyboard reset flag out dx, al ; write back setting to Data Port mov dl, 2eh mov al, aah out dx, al ; write 0xaa to port 0x2e once