From owner-freebsd-drivers@FreeBSD.ORG Mon Apr 5 06:12:11 2010 Return-Path: Delivered-To: freebsd-drivers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51999106566B; Mon, 5 Apr 2010 06:12:11 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from hita.home.const.name (dale.cnst.cs.uwaterloo.ca [129.97.7.219]) by mx1.freebsd.org (Postfix) with ESMTP id A286E8FC08; Mon, 5 Apr 2010 06:12:10 +0000 (UTC) Received: from hita.home.const.name (localhost [127.0.0.1]) by hita.home.const.name (8.14.3/8.14.3) with ESMTP id o355xmup004035; Mon, 5 Apr 2010 01:59:48 -0400 (EDT) (envelope-from cnst@FreeBSD.org) Received: (from constant@localhost) by hita.home.const.name (8.14.3/8.14.3/Submit) id o355xmnn004034; Mon, 5 Apr 2010 01:59:48 -0400 (EDT) (envelope-from cnst@FreeBSD.org) X-Authentication-Warning: hita.home.const.name: constant set sender to cnst@FreeBSD.org using -f Date: Mon, 5 Apr 2010 01:59:47 -0400 From: "Constantine A. Murenin" To: freebsd-acpi@FreeBSD.org, freebsd-drivers@FreeBSD.org, freebsd-hardware@FreeBSD.org Message-ID: <20100405055947.GA3544@hita.home.const.name> Mail-Followup-To: freebsd-acpi@FreeBSD.org, cnst@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Organization: David R. Cheriton School of Computer Science, Faculty of Mathematics, University of Waterloo X-Postal-Address: Constantine A. Murenin, David R. Cheriton School of Computer Science, University of Waterloo, 200 University Avenue West, Waterloo, Ontario N2L 3G1 Canada X-Office-Phone: +1-519-888-4567 x33581 X-Mobile-Phone: +1-K1W-ST1-CNST X-WWW: http://Constantine.SU/ X-LinkedIn: http://www.linkedin.com/in/mureninc X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "Constantine A. Murenin" Subject: aibs(4): ASUSTeK AI Booster (ACPI ATK0110) Hardware Monitor X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 06:12:11 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Dear freebsd-{acpi,drivers,hardware}@, Attached patch provides support for the hardware monitoring capabilities that are present in many modern desktop motherboards from ASUS featuring the ATK0110 ACPI device. This driver, aibs(4), is a fresh replacement for FreeBSD's existing acpi_aiboost(4). The new aibs(4) driver has the following advantages when compared to the old acpi_aiboost(4): * the sensors are now provided through the user-serviceable hw.acpi.aibs0 tree (with a subtree for each sensor type), instead of the Newbus-internal dev.acpi_aiboost.0 tree that contains various nonprime data at the same level as the actual sensors * the supposed range specifications are now reported for each input that is being sensed * the nature of the new tree, with "volt", "temp" and "fan" subtrees, allows one to specifically query for the sensors of a certain type * the temperature sensors are exported in the temperature 'K' units through sysctl(9), such that they are pretty-printed by sysctl(8) automatically * more user documentation is provided It is expected that aibs(4) should replace any and all functionality previously provided by acpi_aiboost(4), provide additional features as specified above and decrease the size of both the source and the binary code. Please find the demonstration below. > ll /usr/c/src/sys/dev/acpi_support/{acpi_aiboost,atk0110}.c -rw-r--r-- 1 constant wheel 8919 Apr 3 20:31 /usr/c/src/sys/dev/acpi_support/acpi_aiboost.c -rw-r--r-- 1 constant wheel 8638 Apr 4 17:34 /usr/c/src/sys/dev/acpi_support/atk0110.c > ll /boot/kernel/*aib*s* -r-xr-xr-x 1 root wheel 11581 Apr 4 18:24 /boot/kernel/acpi_aiboost.ko -r-xr-xr-x 1 root wheel 24504 Apr 4 18:24 /boot/kernel/acpi_aiboost.ko.symbols -r-xr-xr-x 1 root wheel 9958 Apr 4 18:24 /boot/kernel/aibs.ko -r-xr-xr-x 1 root wheel 24924 Apr 4 18:24 /boot/kernel/aibs.ko.symbols > sudo kldload acpi_aiboost.ko > sysctl dev.acpi_aiboost.0 dev.acpi_aiboost.0.%desc: ASUStek AIBOOSTER dev.acpi_aiboost.0.%driver: acpi_aiboost dev.acpi_aiboost.0.%location: handle=\_SB_.PCI0.SBRG.ASOC dev.acpi_aiboost.0.%pnpinfo: _HID=ATK0110 _UID=16843024 dev.acpi_aiboost.0.%parent: acpi0 dev.acpi_aiboost.0.temp0: 310 dev.acpi_aiboost.0.temp1: 580 dev.acpi_aiboost.0.volt0: 1192 dev.acpi_aiboost.0.volt1: 3312 dev.acpi_aiboost.0.volt2: 5017 dev.acpi_aiboost.0.volt3: 12302 dev.acpi_aiboost.0.fan0: 912 dev.acpi_aiboost.0.fan1: 0 > sysctl -d dev.acpi_aiboost.0 dev.acpi_aiboost.0: dev.acpi_aiboost.0.%desc: device description dev.acpi_aiboost.0.%driver: device driver name dev.acpi_aiboost.0.%location: device location relative to parent dev.acpi_aiboost.0.%pnpinfo: device identification dev.acpi_aiboost.0.%parent: parent device dev.acpi_aiboost.0.temp0: CPU Temperature dev.acpi_aiboost.0.temp1: MB Temperature dev.acpi_aiboost.0.volt0: Vcore Voltage dev.acpi_aiboost.0.volt1: +3.3 Voltage dev.acpi_aiboost.0.volt2: +5 Voltage dev.acpi_aiboost.0.volt3: +12 Voltage dev.acpi_aiboost.0.fan0: CPU FAN Speed dev.acpi_aiboost.0.fan1: CHASSIS FAN Speed > sudo kldunload acpi_aiboost.ko > sudo kldload aibs.ko > sysctl hw.acpi.aibs0 hw.acpi.aibs0.volt.0: 1192 850 1600 hw.acpi.aibs0.volt.1: 3312 2970 3630 hw.acpi.aibs0.volt.2: 5017 4500 5500 hw.acpi.aibs0.volt.3: 12302 10200 13800 hw.acpi.aibs0.temp.0: 31.0C 80.0C 95.0C hw.acpi.aibs0.temp.1: 58.0C 60.0C 95.0C hw.acpi.aibs0.fan.0: 907 600 7200 hw.acpi.aibs0.fan.1: 0 700 7200 > sysctl -d hw.acpi.aibs0 hw.acpi.aibs0: ASUSTeK AI Booster (ACPI ASOC ATK0110) hw.acpi.aibs0.volt.0: Vcore Voltage hw.acpi.aibs0.volt.1: +3.3 Voltage hw.acpi.aibs0.volt.2: +5 Voltage hw.acpi.aibs0.volt.3: +12 Voltage hw.acpi.aibs0.temp.0: CPU Temperature hw.acpi.aibs0.temp.1: MB Temperature hw.acpi.aibs0.fan.0: CPU FAN Speed hw.acpi.aibs0.fan.1: CHASSIS FAN Speed > sudo kldunload aibs.ko Best regards, Constantine.SU. --SLDf9lqlvOQaIe6s--