<commit_before>.\"
.\" Copyright (c) 2001 <NAME>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 13, 2005
.Dt ACPI 4
.Os
.Sh NAME
.Nm acpi
.Nd Advanced Configuration and Power Management support
.Sh SYNOPSIS
.Cd "device acpi"
.Pp
.Cd "options ACPI_DEBUG"
.Sh DESCRIPTION
The
.Nm
driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
standard.
This support includes platform hardware discovery (superseding the
PnP and PCI BIOS), as well as power management (superseding APM) and
other features.
ACPI core support is provided by the ACPI CA reference implementation
from Intel.
.Pp
Note that the
.Nm
driver is automatically loaded by the
.Xr loader 8 ,
and should only be
compiled into the kernel on platforms where ACPI is mandatory.
.Sh SYSCTL VARIABLES
The
.Nm
driver is intended to provide power management without user intervention.
Thus, some of these sysctls are controlled automatically by the
.Pa power_profile
.Xr rc 8
script, which can be configured via
.Xr rc.conf 5 .
If values are specified manually, they may be overridden.
.Bl -tag -width indent
.It Va hw.acpi.cpu.cx_usage
Debugging information listing the percent of total usage for each sleep state.
The values are reset when
.Va hw.acpi.cpu.cx_lowest
is modified.
.It Va hw.acpi.cpu.cx_lowest
Lowest Cx state to use for idling the CPU.
A scheduling algorithm will select states between C1 and this setting
as system load dictates.
To enable ACPI CPU idling control,
.Va machdep.cpu_idle_hlt
must be set to 1.
.It Va hw.acpi.cpu.cx_supported
List of supported CPU idle states and their transition latency
in microseconds.
Each state has a type (e.g., C2).
C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper
sleep with the same semantics, and C3 provides the deepest sleep
but additionally requires bus mastering to be disabled.
States greater than C3 provide even more power savings with the same
semantics as the C3 state.
Deeper sleeps provide more power savings but increased transition
latency when an interrupt occurs.
.El
.Sh LOADER TUNABLES
Tunables can be set at the
.Xr loader 8
prompt before booting the kernel or stored in
.Pa /boot/loader.conf .
.Bl -tag -width indent
.It Va acpi_dsdt_load
Enables loading of a custom ACPI DSDT.
.It Va acpi_dsdt_name
Name of the DSDT table to load, if loading is enabled.
.It Va debug.acpi.disabled
Selectively disables portions of ACPI for debugging purposes.
.It Va debug.acpi.max_threads
Specify the number of task threads that are started on boot.
Limiting this to 1 may help work around various BIOSes that cannot
handle parallel requests.
The default value is 3.
.It Va debug.acpi.quirks
Override any automatic quirks completely.
.It Va hint.acpi.0.disabled
Set this to 1 to disable all of ACPI.
If ACPI has been disabled on your system due to a blacklist entry for your
BIOS, you can set this to 0 to re-enable ACPI for testing.
.It Va hw.acpi.ec.poll_timeout
Delay in milliseconds to wait for the EC to respond.
Try increasing this number if you get the error
.Qq Li AE_NO_HARDWARE_RESPONSE .
.It Va hw.acpi.host_mem_start
Override the assumed memory starting address for PCI host bridges.
.It Va hw.acpi.pci.link.%d.%d.%d.irq
Override the interrupt to use.
.It Va hw.acpi.reset_video
Enables calling the VESA reset BIOS vector on the resume path.
Some graphic chips have problems such as LCD white-out after resume.
Try setting this to 0 if this causes problems for you.
.It Va hw.acpi.serialize_methods
Allow override of whether methods execute in parallel or not.
Enable this for serial behavior, which fixes
.Qq Li AE_ALREADY_EXISTS
errors for
AML that really cannot handle parallel method execution.
It is off by default since this breaks recursive methods and some IBMs use
such code.
.It Va hw.acpi.verbose
Turn on verbose debugging information about what ACPI is doing.
.El
.Sh DISABLING ACPI
Since ACPI support on different platforms varies greatly, there are many
debugging and tuning options available.
.Pp
For machines known not to work with
.Nm
enabled, there is a BIOS blacklist.
Currently, the blacklist only controls whether
.Nm
should be disabled or not.
In the future, it will have more granularity to control features (the
infrastructure for that is already there).
.Pp
To enable
.Nm
(for debugging purposes, etc.) on machines that are on the blacklist, set the
kernel environment variable
.Va hint.acpi.0.disabled
to 0.
Before trying this, consider updating your BIOS to a more recent version that
may be compatible with ACPI.
.Pp
To disable the<commit_msg>MFC: rev. 1.55<commit_after>.\"
.\" Copyright (c) 2001 <NAME>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd May 1, 2006
.Dt ACPI 4
.Os
.Sh NAME
.Nm acpi
.Nd Advanced Configuration and Power Management support
.Sh SYNOPSIS
.Cd "device acpi"
.Pp
.Cd "options ACPI_DEBUG"
.Sh DESCRIPTION
The
.Nm
driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
standard.
This support includes platform hardware discovery (superseding the
PnP and PCI BIOS), as well as power management (superseding APM) and
other features.
ACPI core support is provided by the ACPI CA reference implementation
from Intel.
.Pp
Note that the
.Nm
driver is automatically loaded by the
.Xr loader 8 ,
and should only be
compiled into the kernel on platforms where ACPI is mandatory.
.Sh SYSCTL VARIABLES
The
.Nm
driver is intended to provide power management without user intervention.
Thus, some of these sysctls are controlled automatically by the
.Pa power_profile
.Xr rc 8
script, which can be configured via
.Xr rc.conf 5 .
If values are specified manually, they may be overridden.
.Bl -tag -width indent
.It Va hw.acpi.cpu.cx_usage
Debugging information listing the percent of total usage for each sleep state.
The values are reset when
.Va hw.acpi.cpu.cx_lowest
is modified.
.It Va hw.acpi.cpu.cx_lowest
Lowest Cx state to use for idling the CPU.
A scheduling algorithm will select states between C1 and this setting
as system load dictates.
To enable ACPI CPU idling control,
.Va machdep.cpu_idle_hlt
must be set to 1.
.It Va hw.acpi.cpu.cx_supported
List of supported CPU idle states and their transition latency
in microseconds.
Each state has a type (e.g., C2).
C1 is equivalent to the ia32 HLT instruction, C2 provides a deeper
sleep with the same semantics, and C3 provides the deepest sleep
but additionally requires bus mastering to be disabled.
States greater than C3 provide even more power savings with the same
semantics as the C3 state.
Deeper sleeps provide more power savings but increased transition
latency when an interrupt occurs.
.El
.Sh LOADER TUNABLES
Tunables can be set at the
.Xr loader 8
prompt before booting the kernel or stored in
.Pa /boot/loader.conf .
.Bl -tag -width indent
.It Va acpi_dsdt_load
Enables loading of a custom ACPI DSDT.
.It Va acpi_dsdt_name
Name of the DSDT table to load, if loading is enabled.
.It Va debug.acpi.disabled
Selectively disables portions of ACPI for debugging purposes.
.It Va debug.acpi.max_threads
Specify the number of task threads that are started on boot.
Limiting this to 1 may help work around various BIOSes that cannot
handle parallel requests.
The default value is 3.
.It Va debug.acpi.quirks
Override any automatic quirks completely.
.It Va hint.acpi.0.disabled
Set this to 1 to disable all of ACPI.
If ACPI has been disabled on your system due to a blacklist entry for your
BIOS, you can set this to 0 to re-enable ACPI for testing.
.It Va hw.acpi.ec.poll_timeout
Delay in milliseconds to wait for the EC to respond.
Try increasing this number if you get the error
.Qq Li AE_NO_HARDWARE_RESPONSE .
.It Va hw.acpi.host_mem_start
Override the assumed memory starting address for PCI host bridges.
.It Va hw.acpi.reset_video
Enables calling the VESA reset BIOS vector on the resume path.
Some graphic chips have problems such as LCD white-out after resume.
Try setting this to 0 if this causes problems for you.
.It Va hw.acpi.serialize_methods
Allow override of whether methods execute in parallel or not.
Enable this for serial behavior, which fixes
.Qq Li AE_ALREADY_EXISTS
errors for
AML that really cannot handle parallel method execution.
It is off by default since this breaks recursive methods and some IBMs use
such code.
.It Va hw.acpi.verbose
Turn on verbose debugging information about what ACPI is doing.
.It Va hw.pci.link.%s.%d.irq
Override the interrupt to use.
.It Va hw.pci.link.%s.irq
Override the interrupt to use.
.El
.Sh DISABLING ACPI
Since ACPI support on different platforms varies greatly, there are many
debugging and tuning options available.
.Pp
For machines known not to work with
.Nm
enabled, there is a BIOS blacklist.
Currently, the blacklist only controls whether
.Nm
should be disabled or not.
In the future, it will have more granularity to control features (the
infrastructure for that is already there).
.Pp
To enable
.Nm
(for debugging purposes, etc.) on machines that are on the blacklist, set the
kernel environment variable
.Va hint.acpi.0.disabled
to 0.
Before trying this, consider updating your BIOS to a more recent version that
may be compatible with ACPI.
.Pp
To disable the
{'fraction_non_alphanumeric': 0.05560286103542234, 'fraction_numerical': 0.006130790190735695, 'mean_word_length': 4.0646830530401035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '474206', 'n_tokens_mistral': 3484, 'n_tokens_neox': 3194, 'n_words': 1799}