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
..
2018-10-22 02:34:25 +00:00
2017-06-23 00:40:09 +00:00
2017-01-16 03:03:47 +00:00
2017-01-28 02:22:15 +00:00
2017-11-08 08:21:17 +00:00
2019-01-31 19:05:56 +00:00
2019-12-04 16:56:11 +00:00
2019-11-07 18:16:46 +00:00
2019-04-22 17:52:46 +00:00
2016-06-08 10:26:17 +00:00
2017-03-20 04:41:36 +00:00
2019-12-18 01:27:49 +00:00
2019-02-23 09:34:57 +00:00
2017-04-27 16:14:32 +00:00
2019-12-04 16:56:11 +00:00
2018-10-15 18:28:34 +00:00
2018-08-20 22:16:15 +00:00
2019-02-23 09:34:57 +00:00
2019-02-23 09:34:57 +00:00
2019-05-30 13:50:45 +00:00
2017-01-28 02:22:15 +00:00
2019-12-04 16:56:11 +00:00
2018-03-03 21:41:16 +00:00
2019-06-16 05:12:17 +00:00
2018-05-19 20:35:15 +00:00
2017-01-28 02:22:15 +00:00
2019-08-13 20:06:55 +00:00
2019-06-27 15:46:06 +00:00
2019-01-31 19:05:56 +00:00
2017-02-06 08:49:57 +00:00
2017-09-02 11:57:08 +00:00
2018-09-13 17:39:08 +00:00
2019-12-04 16:56:11 +00:00
2020-01-02 17:51:49 +00:00
2019-04-04 18:52:03 +00:00
2017-10-25 23:24:30 +00:00
2019-02-23 09:34:57 +00:00
2017-02-06 08:49:57 +00:00
2019-07-17 01:56:40 +00:00
2019-07-17 01:56:40 +00:00
2018-12-19 21:56:54 +00:00
2017-10-29 08:17:03 +00:00
2017-02-28 23:42:47 +00:00
2017-10-29 08:17:03 +00:00
2020-02-02 04:53:27 +00:00
2017-03-02 06:57:13 +00:00
2017-03-02 06:57:13 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2018-10-22 02:34:10 +00:00
2018-12-06 20:04:01 +00:00
2019-02-23 09:34:57 +00:00
2019-10-17 21:33:01 +00:00
2020-01-23 16:45:48 +00:00
2019-10-20 20:57:57 +00:00
2019-11-10 18:07:02 +00:00
2019-05-19 06:01:11 +00:00
2019-11-07 15:47:05 +00:00
2016-06-08 10:26:17 +00:00
2019-02-23 09:34:57 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2019-12-04 16:56:11 +00:00
2018-08-05 13:54:37 +00:00
2019-04-18 11:06:45 +00:00
2018-12-06 19:27:15 +00:00
2018-05-02 15:59:15 +00:00
2020-02-02 04:53:27 +00:00
2018-12-12 17:05:47 +00:00
2019-11-14 23:31:20 +00:00
2019-06-18 04:32:19 +00:00
2016-06-08 10:26:17 +00:00
2019-06-21 00:16:30 +00:00
2019-11-21 01:24:49 +00:00
2016-09-21 14:15:15 +00:00
2019-01-02 18:30:22 +00:00
2019-01-02 18:30:22 +00:00
2017-08-19 00:37:33 +00:00
2018-10-22 02:34:59 +00:00
2019-11-18 14:12:33 +00:00
2018-11-30 07:10:43 +00:00
2019-11-21 01:24:49 +00:00
2018-04-07 23:31:55 +00:00
2019-10-11 11:31:45 +00:00
2018-10-22 02:36:18 +00:00
2019-11-30 20:10:50 +00:00
2019-05-08 02:32:11 +00:00
2019-02-23 09:34:57 +00:00
2019-02-23 09:34:57 +00:00
2017-10-22 11:40:55 +00:00
2017-02-06 08:49:57 +00:00
2018-08-05 11:14:13 +00:00
2019-12-04 16:56:11 +00:00
2019-02-23 09:34:57 +00:00
2019-02-23 09:34:57 +00:00
2019-02-23 09:34:57 +00:00
2019-02-23 09:34:57 +00:00
2020-01-28 00:36:46 +00:00
2018-04-26 17:36:48 +00:00
2019-02-23 09:34:57 +00:00
2016-10-31 05:58:11 +00:00
2019-02-23 09:34:57 +00:00
2019-05-27 00:51:27 +00:00
2018-05-08 21:14:29 +00:00
2019-02-23 09:34:57 +00:00
2019-02-23 09:34:57 +00:00
2019-07-17 01:56:40 +00:00
2018-12-06 20:04:01 +00:00
2018-01-03 00:56:30 +00:00
2019-10-16 14:46:04 +00:00
2019-02-23 09:34:57 +00:00
2019-01-27 15:10:20 +00:00
2019-02-23 09:34:57 +00:00