Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Need driver for hardware watchdog

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    64 Posts 8 Posters 41.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      Cino
      last edited by

      I checked SM website real quick and didn't see anything for FreeBSD :-( There is a BIOS update 1.1a for the boards tho…

      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        Isn't the watchdog part of the ICH9 southbridge on this board?
        In which case have you tried the ichwd driver?

        Steve

        Edit: Looks like it should work, see here.

        Another edit: It looks like the watchdog set in the bios is probably on the Winbond SuperIO chip for which no drivers exist, yet. You could write your own code to 'pat' it though.

        1 Reply Last reply Reply Quote 0
        • _ Offline
          _igor_
          last edited by

          I have the same X7SPA-HF and entered an ipmi_load="YES" at /boot/loader.conf.local.
          Now dmesg shows that:

          ipmi0: IPMI device rev. 1, firmware rev. 2.2, version 2.0
          ipmi0: Number of channels 2
          ipmi0: Attached watchdog
          

          Tested without getting the watchdog resets. But the ugly thing is that you have at several points watchdog-entries in the BIOS. I have to look back where i activated the watchdog here…
          So that will only work with the HF boards i think.

          ichwd seems not to work on my board, a "kldload ichwd" gave this:
          kldload: can't load ichwd: No such file or directory

          But by the way, does anyone have kvm AND console redirected via com1? Say KVM or console via serial at the same time?

          1 Reply Last reply Reply Quote 0
          • stephenw10S Offline
            stephenw10 Netgate Administrator
            last edited by

            I am still using beta5 but the module exists for me in /boot/kernel.

            
            [2.0-BETA5][root@pfSense.localdomain]/boot/kernel(29): kldload ichwd
            ichwd module loaded
            ichwd0: <intel ich6m="" watchdog="" timer="">on isa0
            ichwd0: unable to reserve SMI registers
            device_attach: ichwd0 attach returned 6</intel> 
            

            Steve

            1 Reply Last reply Reply Quote 0
            • C Offline
              Cino
              last edited by

              I have the HF board. I created the loader.conf.local file and now i see this in dmeg :-)

              ipmi0: <ipmi system="" interface="">on isa0
              ipmi0: KCS mode found at io 0xca2 alignment 0x1 on isa
              ipmi0: IPMI device rev. 1, firmware rev. 2.2, version 2.0
              ipmi0: Number of channels 2
              ipmi0: Attached watchdog</ipmi> 
              

              I'm thinking this watchdog is under the IPMI settings. I can't access the BIOS right now but will later and see if this works.

              For the ichwd driver:
              I'm running 2.0-RC1 (i386) built on Thu Mar 3 17:43:05 EST 2011 and don't have ichwd driver… I would be looking for ichwd.ko, under /boot/kernel?

              1 Reply Last reply Reply Quote 0
              • stephenw10S Offline
                stephenw10 Netgate Administrator
                last edited by

                Hmm, OK.
                Well here are mine from beta5. Obviously rename by removing the .png extension.
                Don't know if you need ichwd.ko.symbols or not.

                Steve

                ichwd.ko.png
                ichwd.ko.symbols.png

                1 Reply Last reply Reply Quote 0
                • C Offline
                  Cino
                  last edited by

                  @stephenw10:

                  Hmm, OK.
                  Well here are mine from beta5. Obviously rename by removing the .png extension.
                  Don't know if you need ichwd.ko.symbols or not.

                  Steve

                  Thanks Steve!! I copied them over to my box and it loaded… Now i'll have to change the bios settings... Which beta5 snapshot did these come from? i looked at a couple of the upgrades and didn't see them...

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S Offline
                    stephenw10 Netgate Administrator
                    last edited by

                    Now I think about it I may have copied them onto my box from a FreeBSD 8.1_rel install when I was playing with ICH drivers a while ago.  :P

                    As I said above, from reading the blog post it looks likely that the bios settings will be for the SuperIO watchdog not the ICH one. If that is the case you should leave everything turned off in the bios if you're experimenting with ichwd and watchdogd.

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      Cino
                      last edited by

                      thanks again Steve.. I did some experimenting this evening based on the blog post and it seems to work. I added  '/etc/rc.d/watchdogd forcestart' as a shellcmd… rebooted the box... left it for an hour then ran 'killall -9 watchdogd'  less then a minute later, the box rebooted on its own.

                      igor, If you remember what you did, please share.. I'm curious about the ipmi watchdog..

                      1 Reply Last reply Reply Quote 0
                      • _ Offline
                        _igor_
                        last edited by

                        @cino: yep. I'm outside this week, but then i will report back. Got a new bios and that will give me time to test it.

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          clarknova
                          last edited by

                          @stephenw10:

                          Well here are mine from beta5.

                          
                          kldload ichwd
                          kldload: can't load ichwd: Exec format error
                          
                          

                          I'm guessing yours is a 32-bit system? I'm running amd64.

                          db

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S Offline
                            stephenw10 Netgate Administrator
                            last edited by

                            Indeed, 32bit. Sorry.

                            Just to set the record straight they came from a standard install of FreeBSD 8.1_rel I use for compiling stuff for pfSense.

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              Cino
                              last edited by

                              @clarknova, if you don't have FreeBSD AMD64 installed on a PC.. Go to PC-BSD website and download their DVD ISO. You can run it LIVE without installing it to a harddrive. If the files are there, copy them to a USB stick then transfer them to your pfsense box. Its long shot, but it worked for me on a different issue. I needed cdcontrol to get my 3G USB Modem working.. Worked like a charm… I used there 8.0 release if I remember correctly.

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                MrKoen
                                last edited by

                                I got myself a SuperMicro X7SPA-HF-D525 board for my pfSense 2 RC1 AMD64 server. It tends to hang every now and then so I would like to use the watchdog feature so it will reboot. I found this topic and did as told:

                                1. In the BIOS I went to Advanced -> IPMI configuration and set BMC Watch Dog Timer Action to "Reset System" and BMC WatchDog TimeOut to 5 minutes
                                2. I booted pfSense and updated /boot/loader.conf.local and added ipmi_load="YES"
                                3. I downloaded ichwd.ko and ichwd.ko.symbols using fetch in the console to /boot/kernel on my pfSense machine

                                I do see the ipmi0 entires in dmesg. It still reboots every 5 minutes though. Did you guys chmod the ichwd.ko and ichwd.ko.symbols files with +x in /boot/kernel? I'm getting the message "Unsupported file layout. Exec format error." when doing a kldload ichwd in the console.

                                I'm using pfSense build 2.0-RC1-IPv6 (amd64)built on Thu Apr 28 03:47:19 EDT 2011.

                                Can anyone provide me with tips what to try?

                                1 Reply Last reply Reply Quote 0
                                • W Offline
                                  wallabybob
                                  last edited by

                                  You probably need to invoke a program to "tickle" the watchdog "often enough".

                                  See the FreeBSD man page for ichwd (http://www.freebsd.org/cgi/man.cgi?query=ichwd&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&format=html ) and the links in the See Also section.

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S Offline
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    There are at least two watchdogs on this board.
                                    As I said in a previous message the watchdog invoked by the bios is likely the one on the Winbond SuperIO chip and NOT the ich watchdog. Thus the ICH driver will not 'pat' it.
                                    The drivers I posted are for 32bit only so you will need some for 64bit, unless you've already done that.  ;)

                                    Cino's report of success involved loading the ich drivers and starting the watchdog daemon. This will then set the watchdog and keep 'patting' it. You should leave the ipmi watchdog off in the bios.

                                    Good luck!  :)

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      MrKoen
                                      last edited by

                                      Thanks for your pointers guys. I'm fairly new to the worlds of Unix and Linux, so let me rephrase your comments to see if I understand them correctly.

                                      1. This particular board probably has two Watchdogs of which one of them is controlled by the BIOS and one can be controlled by the right driver/software
                                      2. I should not use the BIOS setting since the ichwd driver/software can not tickle that dog to keep it awake and thus it will reboot
                                      3. I should install a new server with FreeBSD 8.1 AMD64 and retrieve the ichwd.ko and ichwd.ko.symbols files from the /boot/kernel folder and copy them to my pfSense installation. After that I should try the kldload ichwd.ko again and I can kill the FreeBSD 8.1 server again.

                                      Makes me wonder.. what sets the timeout on the non-BIOS watchdog? Does it work like when the ichwd software sends the non-BIOS watchdog out of the door to guard the garden and whistle at it at some interval to keep it awake? And when it stops whistling at it, a chip on the mainboard activated by ichwd once it started detects the watchdog has fallen asleep because of the lack of whistles and reboots the system?

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S Offline
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        1. Both are hardware watchdogs and once switched on (by setting a bit on the chip) they will reset the board after a set interval. Both will have adjustable intervals, determined by the contents of a register on the chip. Both require a piece of software to periodically reset a bit in the chip resetting the timer.

                                        2. The BIOS settings set the reisters in the Winbond SuperIO chip to activate it's watchdog and set it's timer interval. You would then need to use the ipmi diver to 'tickle' it.
                                        The ICH watchdog is not set by the bios and is off by default. Loading the ICHWD drivers allows watchdogd (the watchdog daemon) to set the appropriate resisters to switch it on. I've not played with it but it would probably also allow setting the timer interval. (edit: with the -t switch, default is 16s).

                                        3. You will need 64bit versions, that may be the easiest way to get them. There is a 64bit version of pc-bsd which I believe will run as a live cd. You can copy the files from that.

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          MrKoen
                                          last edited by

                                          Still no go here. I couldn't find out where and how to get the live bootable FreeBSD CD, so I went a head and installed a FreeBSD 8.2 AMD64 installation within VirtualBox. After finally having done that, I used the FTP command to upload the ichwd.ko and ichwd.ko.symbols files to my FTP server. Next from the console on my pfSense installation I used the same FTP command to retrieve them from my FTP server (using binary mode). I placed the files within /boot/kernel. Now when I run kldload ichwd from within /boot/kernel, I still get the same error:

                                          KLD ichwd.ko: depends on kernel - not available or version mismatch
                                          linker_load_file: Unsupported file type
                                          kldload: can't load ichwd: Exec format error

                                          I also tried chmod +x ichwd.ko but that makes no difference.

                                          I have attached the ichwd files I retrieved from FreeBSD 8.2 AMD64 to this post. Anyone knows what else I can try?

                                          ichwd.ko.png
                                          ichwd.ko.symbols.png

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S Offline
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            Hmmm, I thought that 2.0 was based on 8.1.
                                            What does it show if you type:

                                            uname -a
                                            

                                            Obviously this has to match.

                                            Steve

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.