freebsd-skq/sys
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
..
amd64 amd64: keep PTE bitmasks in sync with target pmap during pv reclaim 2020-02-18 00:02:20 +00:00
arm Fix the following -Werror warning from clang 10.0.0: 2020-02-18 17:55:24 +00:00
arm64 arm64: remove no longer needed atomic_load_ptr casts 2020-02-14 23:17:18 +00:00
bsm
cam Add rudamentary support for UFS to probe whether a block device supports the 2020-02-16 23:10:59 +00:00
cddl
compat Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many) 2020-02-15 18:54:59 +00:00
conf Add chacha20poly1305 support to crypto build 2020-02-16 00:03:09 +00:00
contrib Add chacha20poly1305 support to crypto build 2020-02-16 00:03:09 +00:00
crypto
ddb
dev Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
dts
fs Add a EXT2FS-specific implementation for lseek(SEEK_DATA). 2020-02-18 16:39:57 +00:00
gdb
geom
gnu
i386 i386: remove no longer needed atomic_load_ptr casts 2020-02-14 23:17:37 +00:00
isa
kern refcount: update comments about fencing when releasing counts after r357989 2020-02-16 18:20:09 +00:00
kgssapi
libkern
mips mips: fix kernel build after r357804 2020-02-14 20:25:04 +00:00
modules Fix build of some modules for some kernel configs. 2020-02-16 15:43:28 +00:00
net Partially revert VNET change and expand VNET structure. 2020-02-17 11:08:50 +00:00
net80211
netgraph
netinet Epochify SCTP. 2020-02-18 21:25:17 +00:00
netinet6 Epochify SCTP. 2020-02-18 21:25:17 +00:00
netipsec netipsec: fix a mismatched uma_zfree -> uma_zfree_pcpu 2020-02-12 20:18:29 +00:00
netpfil Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process 2020-02-18 19:53:36 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
powerpc powerpc: unconditionally mark SLB zones UMA_ZONE_CONTIG 2020-02-19 04:46:41 +00:00
riscv Implement vm.pmap.kernel_maps for RISC-V 2020-02-12 14:06:02 +00:00
rpc
security Merge audit and systrace checks 2020-02-14 13:09:41 +00:00
sys Partially revert VNET change and expand VNET structure. 2020-02-17 11:08:50 +00:00
teken
tests
tools
ufs Additional KASSERTs to ensure the consistency of the soft updates 2020-02-18 23:56:23 +00:00
vm Remove swblk_t. 2020-02-17 15:11:07 +00:00
x86 Make atomic_load_ptr type-aware 2020-02-14 23:15:41 +00:00
xdr
xen
Makefile