History log of /freebsd/sys/dev/acpica/acpi_cmbat.c (Results 1 – 25 of 124)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cd8c3af7 02-Oct-2024 Bartosz Fabianowski <freebsd@chillt.de>

ACPI: Treat all 20-element _BIX entires as revision 0

Some Fujitsu Lifebooks return an invalid _BIX object. The first element
of _BIX is a revision number, which indicates what elements will follow:

ACPI: Treat all 20-element _BIX entires as revision 0

Some Fujitsu Lifebooks return an invalid _BIX object. The first element
of _BIX is a revision number, which indicates what elements will follow:
* ACPI 4.0 defined _BIX revision 0 with 20 elements.
* ACPI 6.0 introduced _BIX revision 1 with 21 elements.
The problem is that the offending Lifebooks have the a non-zero _BIX
revision, but provide 20 fields only.

The ACPICA parser chokes on this [1], but that seems to be
inconsequential. More importantly, our own battery info handling code
also verifies that for revision > 0, there are at least 21 fields - and
refuses to process the invalid _BIX. One workaround would be to
introduce special case / quirk handling for Fujitsu Lifebooks. A better
one is to relax the requirements check: If there are only 20 elements,
treat the _BIX as revision 0, no matter what revision number was
provided by the device.

Linux doesn't run into this problem by the way because it only supports
the 20 fields defined in the ACPI 4.0 spec [3]. It never looks at the
revision number or the 21st field added in ACPI 6.0.

[1] https://cgit.freebsd.org/src/tree/sys/contrib/dev/acpica/components/namespace/nsprepkg.c#n815
[2] https://cgit.freebsd.org/src/tree/sys/dev/acpica/acpi_cmbat.c#n371
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/acpi/battery.c#n418

PR: 252030
Reviewed by: imp
MFC After: 2 weeks

show more ...


Revision tags: release/13.4.0, release/14.1.0
# d0cc25f7 20-Apr-2024 Ahmad Khalifa <ahmadkhalifa570@gmail.com>

acpi_cmbat: Use nitems instead of sizeof

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125


Revision tags: release/13.3.0, release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0
# f63aaffe 23-Mar-2023 Gordon Bergling <gbe@FreeBSD.org>

acpi(4): Fix a typo in a kernel message

- s/enitialization/initialization/

MFC afer: 5 days


Revision tags: release/12.4.0, release/13.1.0
# 916a5d8a 19-Apr-2022 John Baldwin <jhb@FreeBSD.org>

acpi: Remove unused devclass arguments to DRIVER_MODULE.


Revision tags: release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0
# 75dfc66c 27-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r358269 through r358399.


# ff29a952 27-Feb-2020 Hiroki Sato <hrs@FreeBSD.org>

Add workaround for models which do not follow the ACPI specification strictly.
Extra objects are now simply ignored instead of rejecting everything.


# 43c7dd6b 19-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r358075 through r358130.


# 294de6bb 19-Feb-2020 Hiroki Sato <hrs@FreeBSD.org>

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
suppor

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

show more ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0
# fda9adaf 27-Oct-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r339670 through r339812.


# 5efca36f 26-Oct-2018 Takanori Watanabe <takawata@FreeBSD.org>

Distinguish _CID match and _HID match and make lower priority probe
when _CID match.

Reviewed by: jhb, imp
Differential Revision:https://reviews.freebsd.org/D16468


# 14b841d4 11-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

MFH @ r337607, in preparation for boarding


# bbd7a929 04-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r336870 through r337285, and resolve conflicts.


# 6040822c 30-Jul-2018 Alan Somers <asomers@FreeBSD.org>

Make timespecadd(3) and friends public

The timespecadd(3) family of macros were imported from NetBSD back in
r35029. However, they were initially guarded by #ifdef _KERNEL. In the
meantime, we have

Make timespecadd(3) and friends public

The timespecadd(3) family of macros were imported from NetBSD back in
r35029. However, they were initially guarded by #ifdef _KERNEL. In the
meantime, we have grown at least 28 syscalls that use timespecs in some
way, leading many programs both inside and outside of the base system to
redefine those macros. It's better just to make the definitions public.

Our kernel currently defines two-argument versions of timespecadd and
timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define
three-argument versions. Solaris also defines a three-argument version, but
only in its kernel. This revision changes our definition to match the
common three-argument version.

Bump _FreeBSD_version due to the breaking KPI change.

Discussed with: cem, jilles, ian, bde
Differential Revision: https://reviews.freebsd.org/D14725

show more ...


Revision tags: release/11.2.0, release/10.4.0, release/11.1.0
# be649680 28-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r314270 through r314419.


# a26871e7 27-Feb-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix startup race initialising ACPI CM battery structures on MacBookPro.

During acpi_cmbat_attach() the acpi_cmbat_init_battery() notification
handler is registered. It has been observed this notific

Fix startup race initialising ACPI CM battery structures on MacBookPro.

During acpi_cmbat_attach() the acpi_cmbat_init_battery() notification
handler is registered. It has been observed this notification handler
can be called instantly, before the attach routine has returned. In
the notification handler there is a call to device_is_attached() which
returns false. Because the softc is set we know an attach is in
progress and the fix is simply to wait and try again in this case.

Reviewed by: avg @
MFC after: 1 week

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0
# cfe30d02 19-Jun-2013 Gleb Smirnoff <glebius@FreeBSD.org>

Merge fresh head.


Revision tags: release/8.4.0
# d241a0e6 26-Feb-2013 Xin LI <delphij@FreeBSD.org>

IFC @247348.


# d9a44755 08-Feb-2013 David E. O'Brien <obrien@FreeBSD.org>

Sync with HEAD.


# 61bfd867 30-Jan-2013 Sofian Brabez <sbz@FreeBSD.org>

Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays

Reviewed by: cognet
Approved by: cognet


Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0
# 8fa0b743 23-Jan-2012 Xin LI <delphij@FreeBSD.org>

IFC @230489 (pending review).


Revision tags: release/9.0.0
# 3ee1a36e 22-Nov-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r227804

Pull in the virtio drivers from head.


# d745c852 07-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# 9b4fcf85 18-Feb-2011 Marcel Moolenaar <marcel@FreeBSD.org>

Merge svn+ssh://svn.freebsd.org/base/head@218816


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# 766d7e65 17-Dec-2010 Andriy Gapon <avg@FreeBSD.org>

small cleanup of acpi battery status setting and checking

This is based on the patch submitted by Yuri Skripachov.
Overview of the changes:
- clarify double-use of some ACPI_BATT_STAT_* definitions

small cleanup of acpi battery status setting and checking

This is based on the patch submitted by Yuri Skripachov.
Overview of the changes:
- clarify double-use of some ACPI_BATT_STAT_* definitions
- clean up undefined/extended status bits returned by _BST
- warn about charging+discharging bits being set at the same time

PR: kern/124744
Submitted by: Yuri Skripachov <y.skripachov@gmail.com>
Tested by: Yuri Skripachov <y.skripachov@gmail.com>
MFC after: 2 weeks

show more ...


12345