freebsd-skq/sys/dev/acpica
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
..
Osd Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
acpi_acad.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_battery.c Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpi_bus_if.m Add the start of INTRNG support for ACPI. 2018-01-11 17:09:12 +00:00
acpi_button.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_cmbat.c Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpi_container.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_cpu.c Distinguish _CID match and _HID match and make lower priority probe 2018-10-26 00:05:46 +00:00
acpi_dock.c acpi_dock(4): Notify devd(8) on dock status change. 2019-05-31 15:44:33 +00:00
acpi_ec.c Include ktr.h in more compilation units 2019-05-21 20:38:48 +00:00
acpi_hpet.c acpi_hpet: Add Hygon Dhyana support. 2020-02-07 22:26:11 +00:00
acpi_hpet.h
acpi_if.m Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpi_isab.c Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
acpi_lid.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
acpi_package.c Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpi_pci_link.c Detect invalid PCI devices more correctly in PCI interrupt router drivers. 2019-08-06 23:15:04 +00:00
acpi_pci.c Install an ACPI PCI bus notify handler. 2019-10-15 19:12:09 +00:00
acpi_pcib_acpi.c Announce PCI Segment Groups supported to PCI host _OSC. 2019-08-26 17:54:19 +00:00
acpi_pcib_pci.c
acpi_pcib.c acpica: rework INTRNG interrupts 2018-11-19 03:02:47 +00:00
acpi_pcibvar.h
acpi_pcivar.h Drop "All rights reserved" from my copyright statements. 2019-03-06 22:11:45 +00:00
acpi_perf.c
acpi_powerres.c
acpi_pxm.c Allocate all per-cpu datastructures in domain correct memory. 2019-08-18 23:44:23 +00:00
acpi_quirk.c Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
acpi_quirks
acpi_resource.c acpi_resource.c: mention ThunderX2 firmware revision with issue 2019-08-01 14:02:59 +00:00
acpi_smbat.c Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpi_smbus.h
acpi_thermal.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
acpi_throttle.c
acpi_timer.c
acpi_video.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
acpi.c Use EARLY_DRIVER_MODULE in the acpi bus. 2020-02-17 15:32:21 +00:00
acpiio.h Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpivar.h Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00