Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

aibs(4): ASUSTeK AI Booster (ACPI ATK0110) Hardware Monitor

12 views
Skip to first unread message

Constantine A. Murenin

unread,
Apr 5, 2010, 1:59:47 AM4/5/10
to freebs...@freebsd.org, freebsd...@freebsd.org, freebsd-...@freebsd.org, Constantine A. Murenin
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.

Ian Smith

unread,
Apr 5, 2010, 3:22:41 AM4/5/10
to Constantine A. Murenin, freebs...@freebsd.org
Constantine, I've dropped freebsd-drivers and freebsd-hardware from ccs,
I'm not subscribed. Please re-add if it's useful, or ignore if not :)

On Mon, 5 Apr 2010, Constantine A. Murenin wrote:
[..]


> * the supposed range specifications are now reported for each input that is
> being sensed

[..]


> > 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

I'm curious about these. Are the high and low ranges being reported by
the device/s, or from specifications? At least 3.3 and 5.0V specs are
more commonly +/-5%, these are +/-10%, and the 12V range is +/-15%!

> hw.acpi.aibs0.temp.0: 31.0C 80.0C 95.0C
> hw.acpi.aibs0.temp.1: 58.0C 60.0C 95.0C

Obviously the 95C are maxima, but what do the 80C and 60C represent?

> 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.

cheers, Ian

Constantine A. Murenin

unread,
Apr 5, 2010, 12:28:50 PM4/5/10
to Ian Smith, freebs...@freebsd.org, Constantine A. Murenin
On 5 April 2010 03:22, Ian Smith <smi...@nimnet.asn.au> wrote:
> Constantine, I've dropped freebsd-drivers and freebsd-hardware from ccs,
> I'm not subscribed.  Please re-add if it's useful, or ignore if not :)

Ian, should you have used a mailer with support for Mail-Followup-To,
you wouldn't have to do that manually. :-)


> On Mon, 5 Apr 2010, Constantine A. Murenin wrote:
> [..]
>  > * the supposed range specifications are now reported  for each input that is
>  > being sensed
> [..]
>  > > 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
>
> I'm curious about these.  Are the high and low ranges being reported by
> the device/s, or from specifications?  At least 3.3 and 5.0V specs are
> more commonly +/-5%, these are +/-10%, and the 12V range is +/-15%!

This is what ASUSTeK has in the ACPI DSDT of the specific motherboard
where the test was run.


>  > hw.acpi.aibs0.temp.0: 31.0C 80.0C 95.0C
>  > hw.acpi.aibs0.temp.1: 58.0C 60.0C 95.0C
>
> Obviously the 95C are maxima, but what do the 80C and 60C represent?

It's all documented in the manual page for aibs(4) — two upper limits
for temperatures are provided. On OpenBSD, DragonFly and NetBSD,
readings above these values generate WARN and CRIT states.


>  > 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.
>
> cheers, Ian

br,
cnst.su.

Takanori Watanabe

unread,
Apr 5, 2010, 4:33:58 PM4/5/10
to Constantine A. Murenin, freebs...@freebsd.org
In message <2010040505...@hita.home.const.name>, "Constantine A. Mureni
n" さんいわく:
>
>--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

I don't think there is not so large advantage, but
I will not make an objection in that you want to
maintain your driver long time. (I don't have access
to motherboard with ATK0110 any more.)

Rui Paulo

unread,
Apr 6, 2010, 6:14:19 AM4/6/10
to Constantine A. Murenin, freebs...@freebsd.org, freebsd...@freebsd.org, freebsd-...@freebsd.org
Hi,

On 5 Apr 2010, at 06:59, Constantine A. Murenin wrote:

> 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

I was under the impression that this the right way in FreeBSD.

Regards,
--
Rui Paulo

M. Warner Losh

unread,
Apr 6, 2010, 9:43:13 AM4/6/10
to rpa...@freebsd.org, freebs...@freebsd.org, freebsd-...@freebsd.org, freebsd...@freebsd.org, cn...@freebsd.org
In message: <DE573364-A7A7-4805...@freebsd.org>
Rui Paulo <rpa...@freebsd.org> writes:
: Hi,

To be clear, this is a regression. They should be through the dev
tree. We've been migrating exposed functionality from the hw. tree to
the dev. tree for quite some time now. hw. isn't any more
user-serviceable than dev. is.

Warner

Constantine A. Murenin

unread,
Apr 11, 2010, 3:24:49 PM4/11/10
to M. Warner Losh, freebs...@freebsd.org, Constantine A. Murenin, rpa...@freebsd.org, freebsd...@freebsd.org, freebsd-...@freebsd.org

Thanks for your comments.
But what about the %desc, %driver, %location, %pnpinfo and %parent leaves
that, for example, appear under the dev.aibs.0 tree? Don't they introduce
the perception that the dev tree is not really user-serviceable, as most of
the tree is practically entirely useless for the end-user?
Is there, or should there be, a way to tell sysctl(8) to not print such
%driver leaves under the dev tree?
I've simply used acpi_thermal.c as the exemplar for hw.acpi attachment, as
I've found it to produce more elegant results than the dev attachment.
Should acpi_thermal be also converted to use the dev tree? I can write
a patch.

In any case, I've modified aibs(4) to now use its dev tree (see the patch
inline); aibs(4) is now even smaller than it was before, still supporting
several additional features:

> 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 8299 Apr 11 12:29 /usr/c/src/sys/dev/acpi_support/atk0110.c
> ll /boot/kernel/*aib*s*
-r-xr-xr-x 1 root wheel 11581 Apr 11 12:57 /boot/kernel/acpi_aiboost.ko
-r-xr-xr-x 1 root wheel 24504 Apr 11 12:57 /boot/kernel/acpi_aiboost.ko.symbols
-r-xr-xr-x 1 root wheel 9801 Apr 11 12:57 /boot/kernel/aibs.ko
-r-xr-xr-x 1 root wheel 21203 Apr 11 12:57 /boot/kernel/aibs.ko.symbols
> sysctl dev.aibs.0.{volt,temp,fan}
dev.aibs.0.volt.0: 1240 850 1600
dev.aibs.0.volt.1: 3312 2970 3630
dev.aibs.0.volt.2: 5017 4500 5500
dev.aibs.0.volt.3: 12302 10200 13800
dev.aibs.0.temp.0: 30.0C 80.0C 95.0C
dev.aibs.0.temp.1: 56.0C 60.0C 95.0C
dev.aibs.0.fan.0: 878 600 7200
dev.aibs.0.fan.1: 0 700 7200

Best regards,
Constantine.

svn_diff.aibs.r0.2010-04-11T123857-0400.dev.patch

M. Warner Losh

unread,
Apr 11, 2010, 4:00:47 PM4/11/10
to cn...@freebsd.org, freebs...@freebsd.org, rpa...@freebsd.org, freebsd...@freebsd.org, freebsd-...@freebsd.org
In message: <2010041119...@dale.cnst.cs.uwaterloo.ca>
"Constantine A. Murenin" <cn...@FreeBSD.org> writes:

Yes. They do.

: Don't they introduce the perception that the dev


: tree is not really user-serviceable, as most of the tree is
: practically entirely useless for the end-user?

No, they shouldn't. There's documented APIs for hooking into this
tree. That sounds like it would be user-serviceable. That certainly
was the intent when DES added them.

: Is there, or should


: there be, a way to tell sysctl(8) to not print such %driver leaves
: under the dev tree?

sysctl dev.acpi | grep -v %

will do the trick.

: I've simply used acpi_thermal.c as the exemplar


: for hw.acpi attachment, as I've found it to produce more elegant
: results than the dev attachment. Should acpi_thermal be also
: converted to use the dev tree? I can write a patch.

I think it should be.

: In any case, I've modified aibs(4) to now use its dev tree (see the


: patch inline); aibs(4) is now even smaller than it was before, still
: supporting several additional features:

Woo Hoo!

: > 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 8299 Apr 11 12:29
: -/usr/c/src/sys/dev/acpi_support/atk0110.c
: > ll /boot/kernel/*aib*s*


: -r-xr-xr-x 1 root wheel 11581 Apr 11 12:57 /boot/kernel/acpi_aiboost.ko
: -r-xr-xr-x 1 root wheel 24504 Apr 11 12:57

: -/boot/kernel/acpi_aiboost.ko.symbols
: -r-xr-xr-x 1 root wheel 9801 Apr 11 12:57 /boot/kernel/aibs.ko


: -r-xr-xr-x 1 root wheel 21203 Apr 11 12:57 /boot/kernel/aibs.ko.symbols
: > sysctl dev.aibs.0.{volt,temp,fan}
: dev.aibs.0.volt.0: 1240 850 1600
: dev.aibs.0.volt.1: 3312 2970 3630
: dev.aibs.0.volt.2: 5017 4500 5500
: dev.aibs.0.volt.3: 12302 10200 13800
: dev.aibs.0.temp.0: 30.0C 80.0C 95.0C
: dev.aibs.0.temp.1: 56.0C 60.0C 95.0C
: dev.aibs.0.fan.0: 878 600 7200
: dev.aibs.0.fan.1: 0 700 7200

Cool.

Warner

0 new messages