aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichwd
Commit message (Collapse)AuthorAgeFilesLines
* ichwd: Add Atom C3000 watchdog ID.Justin Hibbits2020-03-242-0/+2
| | | | | | | | MFC after: 3 days Sponsored by: Juniper Networks, Inc Notes: svn path=/head/; revision=359285
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Notes: svn path=/head/; revision=347984
* ichwd: add a few assertions about tco_versionAndriy Gapon2018-12-181-0/+7
| | | | | | | | | | | | | | Those should ensure correctness of ichwd_find_ich_lpc_bridge() and ichwd_find_ich_lpc_bridge() as well as make it easier for both humans and static analyzers to see the relation between tco_version and ich and smb variables in ichwd_identify(). Reported by: Coverity CID: 1396314, 1396317 MFC after: 10 days Notes: svn path=/head/; revision=342193
* ichwd: add Sunrise Point-LP IDAndriy Gapon2018-12-142-0/+2
| | | | | | | | | | Submitted by: Tetsuya Uemura <t_uemura@macome.co.jp> Tested by: Tetsuya Uemura <t_uemura@macome.co.jp> MFC after: 2 weeks Relnotes: maybe Notes: svn path=/head/; revision=342073
* ichwd: add support for clearing No Reboot bit in TCOv4Andriy Gapon2018-12-142-4/+76
| | | | | | | | | | | | | This is based on a patch developed by Tetsuya Uemura <t_uemura@macome.co.jp>. Many thanks! Submitted by: Tetsuya Uemura <t_uemura@macome.co.jp> (earlier version) Tested by: Tetsuya Uemura <t_uemura@macome.co.jp> MFC after: 2 weeks Notes: svn path=/head/; revision=342072
* ichwd: add support for TCO watchdog timer in Lewisburg PCH (C620)Andriy Gapon2018-10-222-16/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change is based on public documents listed below as well as Linux changes and the code developed by Kostik. The documents: - Intel® C620 Series Chipset Platform Controller Hub Datasheet - Intel® 100 Series and Intel® C230 Series Chipset Family Platform Controller Hub (PCH) Datasheet - Volume 2 of 2 Interesting Linux commits: - https://github.com/torvalds/linux/commit/9424693035a57961a8eb09e96aab315a7096535d - https://github.com/torvalds/linux/commit/2a7a0e9bf7b32e838d873226808ab8a6c00148f7 The peculiarity of the new chipsets is that the watchdog resources are configured in PCI registers of SMBus controller and Power Management function as opposed to the LPC bridge. I took a simplistic approach of querying the resources from the respective PCI devices. ichwd is still a device on isa bus. The PCI devices are found by their slot and function defined in the datasheets as siblings of the upstream LPC bridge. There are some shortcuts and missing features. First of all, I have not implemented the functionality required to clear the no-reboot bit. That would require writing to a special PCI configuration register of a hidden / invisible PCI device after which the device would start responding to accesses to other registers. The no-reboot bit was not set on my test hardware, so I decided to leave its handling for the later time. Also, I did not try to handle the case where the watchdog resources are not configured by the hardware as well as the case where ACPI defined operational region conflicts with the watchdog resources. My test system did not have either of those problem, so, again, I decided to leave those cases until later. See this Linux commit for some details of the ACPI problem: https://github.com/torvalds/linux/commit/a7ae81952cdab56a1277bd2f9ed7284c0f575120 Finally, I have added only the PCI ID found on my test system. I think that more IDs can be added as the change gets tested. Tested on Dell PowerEdge R740. PR: 222079 Reviewed by: mav, kib MFC after: 3 weeks Relnotes: maybe Sponsored by: Panzura Differential Revision: https://reviews.freebsd.org/D17585 Notes: svn path=/head/; revision=339591
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-0/+4
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Fix typo, TC0->TCO.Konstantin Belousov2017-09-101-1/+1
| | | | | | | | Submitted by: jhb MFC after: 1 week Notes: svn path=/head/; revision=323388
* Add definitions of (new) bits for TCO registers from theKonstantin Belousov2017-09-101-8/+38
| | | | | | | | | | Lewisburg/Sunrise Point documentation. Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=323387
* Style: tab after #define.Konstantin Belousov2017-09-101-259/+259
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=323386
* Add explicit check for PCI bus to r321720.Alexander Motin2017-08-011-1/+4
| | | | | | | | Reported by: jhb MFC after: 6 days Notes: svn path=/head/; revision=321856
* Attach ichwd(4) only to ISA bus of the LPC bridge.Alexander Motin2017-07-301-19/+20
| | | | | | | | | | | | | Resource allocation for parent device does not look good by itself, but attempt to allocate them for unrelated device just does not end up good. On Asus X99-E WS/USB3.1 system reporting ISA bridge via both PCI and ACPI this reported to cause kernel panic on shutdown due to messed resources: https://bugs.freenas.org/issues/25237. MFC after: 1 week Notes: svn path=/head/; revision=321720
* Fixed TCO v3 tick convertWarner Losh2017-03-012-2/+10
| | | | | | | | | | | TCO v3's internal timer is stored as seconds. Submitted by: Denir Li <denir-li@users.noreply.github.com> Pull Request: https://github.com/freebsd/freebsd/pull/51 Pull Request: https://github.com/freebsd/freebsd/pull/52 Notes: svn path=/head/; revision=314477
* Unify ichwd(4) attachment messages in dmesg.Alexander Motin2016-03-241-8/+6
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=297255
* Add ichwd TCO version 3 support (Bay Trail / Rangeley...)Fabien Thomas2015-08-182-170/+335
| | | | | | | | | Reviewed by: jhb Obtained from: Cas-well Sponsored by: Stormshield Notes: svn path=/head/; revision=286890
* Actually recognize all Intel Lynx Point devices we have device IDs for.Christian Brueffer2015-07-161-0/+29
| | | | | | | | | PR: 195851 Submitted by: ftigeot@wolfpond.org MFC after: 1 week Notes: svn path=/head/; revision=285628
* Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.Alexander Motin2014-11-262-0/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=275101
* Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.Jack F Vogel2013-07-192-0/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=253475
* Don't log a message when the watchdog is reloaded. It's not useful to do soMark Johnston2013-03-091-2/+0
| | | | | | | | | and these messages flood the log when bootverbose is enabled. Approved by: rstone (co-mentor) Notes: svn path=/head/; revision=248104
* Add support for new Intel Lynx Point PCH - Watchdog Timer Device IDsJack F Vogel2013-01-022-0/+35
| | | | Notes: svn path=/head/; revision=244977
* Remove use of explicit bus space tags and handles and use methods thatJohn Baldwin2012-01-052-26/+10
| | | | | | | | | operate on resource objects instead. MFC after: 1 week Notes: svn path=/head/; revision=229598
* Fix a bug in ichwd(4) which prevents it from beig enabled if the newXin LI2011-09-021-4/+3
| | | | | | | | | | | | timeout is the same timeout. Submitted by: Dmitrij Tejblum <tejblum yandex-team.ru> PR: kern/139604 MFC after: 2 weeks Approved by: re (kib) Notes: svn path=/head/; revision=225340
* Chipset support for the new Intel Panther Point PCH, thanksJack F Vogel2011-05-112-1/+65
| | | | | | | to Seth Heasley for preparing the changes. Notes: svn path=/head/; revision=221789
* Add missing bit in r221015.Attilio Rao2011-04-251-1/+12
| | | | | | | | | | Sponsored by: Sandvine Incorporated Reviewed by: des MFC after: 1 week X-MFC: r221015 Notes: svn path=/head/; revision=221016
* Don't assume that SMI are enabled when attaching ichwd and then doAttilio Rao2011-04-251-0/+1
| | | | | | | | | | | correct unwind based on former state. Sponsored by: Sandvine Incorporated Reviewed by: des MFC after: 1 week Notes: svn path=/head/; revision=221015
* Whitespace nitDag-Erling Smørgrav2011-04-251-2/+2
| | | | Notes: svn path=/head/; revision=221010
* Add some more bit definitions:Attilio Rao2011-04-211-2/+8
| | | | | | | | | | | | | | - TCO_MESSAGEx: TCO specific regs providing the ability to monitor BIOS bootup activity. - TCO_NEWCENTURY: reporting RTC year roll over. - TCO_NMI2SMI_EN, TCO_NMI_NOW: controlling SMIs conversion to NMIs and NMI trigger. - SMI_GBL_EN: Enabling SMI delivery for all the northbridge controller. MFC after: 10 days Notes: svn path=/head/; revision=220925
* Support for the new Patsburg PCH chipset:Jack F Vogel2011-02-012-1/+5
| | | | | | | | | | | | | | - SMBus Controller - SATA Controller - HD Audio Controller - Watchdog Controller Thanks to Seth Heasley (seth.heasley@intel.com) for providing us code. MFC after 3 days Notes: svn path=/head/; revision=218149
* Support for the new DH89xxCC PCH chipset including:Jack F Vogel2011-01-312-0/+2
| | | | | | | | | - SATA controller - Watchdog timer - SMBus controller Notes: svn path=/head/; revision=218140
* Use convenience macro for minimum and maximum value capping whenAttilio Rao2010-12-082-15/+19
| | | | | | | | | | | | re-arming the watchdog timeout. Sponsored by: Sandvine Incorporated Submitted by: Mark Johnston <mjohnston at sandvine dot com> Reviewed by: des MFC after: 10 days Notes: svn path=/head/; revision=216298
* Add a comment to clarify that some BIOSes may clear the hw watchdogEd Maste2010-12-071-2/+3
| | | | | | | | | indicator bit, preventing us from reporting in that case. X-MFC-with: r215868 Notes: svn path=/head/; revision=216266
* Fix build by correcting function name. Pointed out by dougb.Ed Maste2010-11-271-1/+1
| | | | Notes: svn path=/head/; revision=215918
* - Advertise when the reboot came from a watchdog-induced reset.Attilio Rao2010-11-261-8/+9
| | | | | | | | | | | | | - Fix a bug where TCO_BOOT_STS was supposed to be cleared after TCO_SECOND_TO_STS and not before. Sponsored by: Sandvine Incorporated Submitted by: Mark Johnston <mjohnston at sandvine dot com> Reviewed by: des MFC after: 10 days Notes: svn path=/head/; revision=215868
* Add Intel Cougar Point PCH LPC Controller Device IDsJack F Vogel2010-08-282-0/+92
| | | | | | | | | | for watchdog support. Also add additional Intel Ibex Peak (5 Series/3400 Series) PCH IDs. MFC after a week Notes: svn path=/head/; revision=211908
* ichwd: correct range check for timeout valueAndriy Gapon2010-07-241-2/+2
| | | | | | | | | | | This is similar to a fix in r189305 but for earlier ICH versions (<= 5). Reported by: someone via attilio Discussed with: des, attilio MFC after: 1 week Notes: svn path=/head/; revision=210454
* Add support for the NM10 chipset.Remko Lodder2010-01-242-0/+2
| | | | | | | | | | PR: kern/143118 Submitted by: Koshin sumitani <ksumitani at mui dot biglobe dot ne dot jp> Approved by: imp (mentor, implicit) MFC after: 3 days Notes: svn path=/head/; revision=202917
* Add H55 ID from Mike Tancsa, with minor rewording from avg@.Ed Maste2010-01-222-0/+2
| | | | | | | | | PR: kern/143068 Submitted by: Mike Tancsa (Sentex) MFC after: 1 week Notes: svn path=/head/; revision=202812
* ichwd: don't attach to isa pnp device(s) by accidentAndriy Gapon2009-11-071-1/+4
| | | | | | | | Reviewed by: imp, des MFC after: 1 week Notes: svn path=/head/; revision=199015
* Don't print out a message on loading a module. 'kldload -v' and 'kldstatNick Hibma2009-09-101-21/+2
| | | | | | | | | | | | | | | | | grep <modname>' can be used instead. Put a message behind bootverbose as ichwd0: <Intel ICH6M watchdog timer> on isa0 ichwd0: Intel ICH6M watchdog timer (ICH6 or equivalent) does not make a lot of sense. MFC after: 1 week Notes: svn path=/head/; revision=197072
* Rename two functions to make their purpose clearer. Add tons of comments.Dag-Erling Smørgrav2009-03-191-7/+56
| | | | | | | | | | Generated code is identical after stripping .comment section. Suggested by: Andriy Gapon <avg@icyb.net.ua> MFC after: 2 weeks Notes: svn path=/head/; revision=190030
* ichwd: correct range check for timeout valueAndriy Gapon2009-03-031-2/+2
| | | | | | | Approved by: jhb (mentor) Notes: svn path=/head/; revision=189305
* Add more PCI IDs including those for ICH10.John Baldwin2008-08-252-5/+23
| | | | | | | | | PR: kern/126736 Submitted by: Olivier Smedts olivier of gid0 org MFC after: 1 week Notes: svn path=/head/; revision=182161
* Add support for ICH8M.Dag-Erling Smørgrav2008-01-072-0/+2
| | | | | | | | | PR: kern/119351 Submitted by: Takeharu KATO <takeharu1219@ybb.ne.jp> MFC after: 1 week Notes: svn path=/head/; revision=175128
* Add device IDs for the ICH9 family.Dag-Erling Smørgrav2007-12-312-0/+8
| | | | | | | | | PR: i386/119126 Submitted by: Dan Lukes <dan@obluda.cz> MFC after: 1 week Notes: svn path=/head/; revision=175013
* Tabify.Dag-Erling Smørgrav2007-12-312-20/+20
| | | | Notes: svn path=/head/; revision=175012
* Add PCI device support for Intel S7000FC4UR in usb and ichwd, systemsJack F Vogel2007-11-152-0/+2
| | | | | | | | | | will not install without the usb changes in the install kernel, so I would like to MFC this in time for 7.0 RC MFC: 3 days Notes: svn path=/head/; revision=173661
* Update to support ICH[678] chipsets (based on a patch by Takeharu KATO)Dag-Erling Smørgrav2007-08-132-75/+228
| | | | | | | | | | | Fix a resource allocation bug (explained by jhb on -acpi) Thanks for Mike Tancsa for testing and helping track down the bug. Approved by: re (kensmith) MFC after: 3 weeks Notes: svn path=/head/; revision=171820
* Revisit the watchdogs: Resetting the error to EINVAL after failing to set theNick Hibma2007-03-271-2/+0
| | | | | | | | | | | watchdog might hide the succesful arming of an earlier one. Accept that on failing to arm any watchdog (because of non-supported timeouts) EOPNOTSUPP is returned instead of the more appropriate EINVAL. MFC after: 3 days Notes: svn path=/head/; revision=167950
* In one of the previous commits I accidentally removed the enabling of theNick Hibma2007-03-131-1/+4
| | | | | | | | | | | watchdog chip. Noticed by: Mike Tancsa Tested by: Mike Tancsa MFC after: 1 week Notes: svn path=/head/; revision=167503
* Align the interfaces for the various watchdogs and make the interfaceNick Hibma2006-12-151-30/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | behave as expected. Also: - Return an error if WD_PASSIVE is passed in to the ioctl as only WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an explanation of the difference between WD_ACTIVE and WD_PASSIVE. - Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've lost your sense of humor, than don't add a define. Specific changes: i80321_wdog.c Don't roll your own passive watchdog tickle as this would defeat the purpose of an active (userland) watchdog tickle. ichwd.c / ipmi.c: WD_ACTIVE means active patting of the watchdog by a userland process, not whether the watchdog is active. See sys/watchdog.h. kern_clock.c: (software watchdog) Remove a check for WD_ACTIVE as this does not make sense here. This reverts r1.181. Notes: svn path=/head/; revision=165260