Hiroki Sato 294de6bbd6 Add _BIX (Battery Information Extended) object support.
ACPI Control Method Batteries have a _BIF and/or _BIX object which
provide static properties of the battery.  FreeBSD acpi_cmbat module
supported _BIF object only, which was deprecated as of ACPI 4.0.
_BIX is an extended version of _BIF defined in ACPI 4.0 or later.

As of writing, _BIX has two revisions.  One is in ACPI 4.0 (rev.0) and
another is in ACPI 6.0 (rev.1).  It seems that hardware vendors still
stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility.
Microsoft requires _BIX rev.0 for Windows machines, so there are some
laptop machines with _BIX rev.0 only. In this case, FreeBSD does not
recognize the battery information.

After this change, the acpi_cmbat module gets battery information from
_BIX or _BIF object and internally uses _BIX rev.1 data structure as
the primary information store in the kernel.  ACPIIO_BATT_GET_BI[FX]
returns an acpi_bi[fx] structure built by using information obtained
from a _BIF or a _BIX object found on the system.  The revision number
field can be used to check which field is available.  The acpiconf(8)
utility will show additional information if _BIX is available.

Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for
userland utilities are not changed and the backward-compatible ABIs
are provided.  This means that older versions of acpiconf(8) can also
work with the new kernel. The (union acpi_battery_ioctl_arg) was
padded to 256 byte long to avoid another ABI change in the future.
A _BIX object with its revision number >1 will be treated as
compatible with the rev.1 _BIX format.

Reviewed by:	takawata
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23728
2020-02-19 06:28:55 +00:00
..
2019-10-21 17:59:53 +00:00
2019-10-21 18:00:17 +00:00
2019-05-24 06:07:33 +00:00
2020-02-13 19:07:42 +00:00
2019-02-25 21:59:01 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:06:19 +00:00
2019-10-21 18:06:23 +00:00
2019-12-04 16:56:11 +00:00
2019-10-21 18:11:08 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:11:19 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:11:28 +00:00
2020-02-03 17:35:11 +00:00
2019-12-04 16:56:11 +00:00
2019-10-21 18:11:32 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:06:53 +00:00
2020-02-03 17:35:11 +00:00
2019-12-27 04:11:14 +00:00
2020-02-12 00:58:17 +00:00
2020-02-07 22:28:04 +00:00
2020-02-13 19:12:07 +00:00
2020-02-03 17:35:11 +00:00
2020-02-03 17:35:11 +00:00
2020-02-07 19:53:07 +00:00
2019-10-21 18:11:43 +00:00
2019-12-26 17:25:51 +00:00
2020-02-07 19:53:07 +00:00
2019-10-21 18:07:11 +00:00
2019-10-21 18:07:15 +00:00
2020-01-31 10:41:47 +00:00
2020-02-03 17:35:11 +00:00
2020-01-27 00:14:51 +00:00
2020-02-03 17:35:11 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:11:58 +00:00
2019-10-21 18:07:28 +00:00
2020-02-14 19:32:58 +00:00
2019-12-15 21:11:15 +00:00
2020-02-03 17:35:11 +00:00
2019-12-04 16:56:11 +00:00
2020-02-03 17:35:11 +00:00
2020-02-17 13:26:36 +00:00
2020-02-07 19:53:07 +00:00
2020-02-07 19:53:07 +00:00
2020-02-03 17:35:11 +00:00
2020-02-07 19:53:07 +00:00
2019-10-21 18:12:12 +00:00
2020-01-29 04:42:46 +00:00
2019-10-21 18:07:35 +00:00
2020-02-03 17:35:11 +00:00
2019-06-08 16:26:56 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:07:40 +00:00
2019-10-21 18:07:44 +00:00
2019-10-21 18:07:49 +00:00
2019-10-21 18:07:53 +00:00
2019-10-21 18:07:56 +00:00
2020-02-03 17:35:11 +00:00
2020-02-03 17:35:11 +00:00
2019-02-04 21:28:25 +00:00
2019-10-21 18:08:03 +00:00
2020-02-01 23:16:30 +00:00
2019-10-21 18:12:36 +00:00
2020-02-03 17:35:11 +00:00
2019-10-21 18:08:12 +00:00
2020-02-03 19:36:24 +00:00
2019-10-21 18:08:20 +00:00
2019-02-26 19:55:03 +00:00