ACPI(4) | Kernel Interfaces Manual | ACPI(4) |
options ACPI_DEBUG
options ACPIVERBOSE
options ACPI_ACTIVATE_DEV
options ACPI_DSDT_OVERRIDE
options ACPI_DSDT_FILE=""
options ACPI_BLACKLIST_YEAR=2000
The NetBSD implementation of ACPI integrates Intel's ACPI Component Architecture (ACPI-CA) for the OS-independent part. The ACPI-CA provides OS-neutral ACPI functionalities such as ACPI BIOS table support, an ACPI event framework and an ACPI Machine Language (AML) interpreter.
Options:
If the system has problems in resuming from the S3 state, experimenting with different values may provide a solution.
To ease the task of diagnosing and fixing different problems, the ACPICA reference implementation provides a rich facility of different debugging methods. In NetBSD these are generally only available if the kernel has been compiled with the ACPI_DEBUG option.
The following steps can be used to override the DSDT:
src/sys/dev/acpi/acpica/Osd/custom_dsdt.hex
or use the option
ACPI_DSDT_FILE="/some/directory/custom_dsdt.hex"
in the kernel configuration file.
For the first two variables, the possible values are:
LAYER | LEVEL |
ACPI_DEBUG_NONE |
ACPI_DEBUG_NONE |
ACPI_UTILITIES |
ACPI_LV_INIT |
ACPI_HARDWARE |
ACPI_LV_DEBUG_OBJECT |
ACPI_EVENTS |
ACPI_LV_INFO |
ACPI_TABLES |
ACPI_LV_ALL_EXCEPTIONS * |
ACPI_NAMESPACE |
|
ACPI_PARSER |
ACPI_LV_INIT_NAMES |
ACPI_DISPATCHER |
ACPI_LV_PARSE |
ACPI_EXECUTER |
ACPI_LV_LOAD |
ACPI_RESOURCES |
ACPI_LV_DISPATCH |
ACPI_CA_DEBUGGER |
ACPI_LV_EXEC |
ACPI_OS_SERVICES |
ACPI_LV_NAMES |
ACPI_CA_DISASSEMBLER |
ACPI_LV_OPREGION |
ACPI_COMPILER |
ACPI_LV_BFIELD |
ACPI_TOOLS |
ACPI_LV_TABLES |
ACPI_EXAMPLE |
ACPI_LV_VALUES |
ACPI_DRIVER |
ACPI_LV_OBJECTS |
ACPI_ALL_COMPONENTS * |
ACPI_LV_RESOURCES |
ACPI_LV_USER_REQUESTS | |
ACPI_BUS_COMPONENT |
ACPI_LV_PACKAGE |
ACPI_ACAD_COMPONENT |
ACPI_LV_VERBOSITY1 * |
ACPI_BAT_COMPONENT |
|
ACPI_BUTTON_COMPONENT |
ACPI_LV_ALLOCATIONS |
APCI_EC_COMPONENT |
ACPI_LV_FUNCTIONS |
ACPI_LID_COMPONENT |
ACPI_LV_OPTIMIZATIONS |
ACPI_RESOURCE_COMPONENT |
ACPI_LV_VERBOSITY2 * |
ACPI_TZ_COMPONENT |
|
ACPI_DISPLAY_COMPONENT |
|
ACPI_ALL_DRIVERS * |
ACPI_LV_MUTEX |
ACPI_LV_THREADS | |
ACPI_LV_IO | |
ACPI_LV_AML_INTERRUPTS | |
* This is a compound |
ACPI_LV_VERBOSITY3 * |
constant, including |
|
all previous elements. |
ACPI_LV_AML_DISASSEMBLE |
ACPI_LV_VERBOSE_INFO | |
ACPI_LV_FULL_TABLES | |
ACPI_LV_EVENTS | |
ACPI_LV_VERBOSE * |
In addition, there is ACPI_DEBUG_DEFAULT that is used by ACPICA as the default debug level. It includes ACPI_LV_INIT and ACPI_LV_DEBUG_OBJECT.
The debug layer can be divided into two groups: the first one is specific to the ACPICA interpreter and the second one contains the internal ACPI components of NetBSD. The constant ACPI_ALL_DRIVERS includes all NetBSD specific parts.
The ACPICA interpreter uses several debug levels internally, but the NetBSD specific parts are typically limited to ACPI_LV_DEBUG_OBJECT and ACPI_LV_INFO. The debug output can be stopped by setting hw.acpi.debug.level to ACPI_DEBUG_NONE.
#define _COMPONENT ACPI_BUS_COMPONENT ACPI_MODULE_NAME ("acpi_example")
The driver may also utilize the debug facility:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Failed to evaluate _STA\n"));
With these options the debug message from the ACPI_DEBUG_PRINT macro is only visible when hw.acpi.debug.layer is either ACPI_BUS_COMPONENT or a compound constant including it, and hw.acpi.debug.level is ACPI_LV_INFO or some constant that includes it. Finally, it can be noted that the ACPI implementation uses the prefix ACPI_DB, whereas the debug level sysctl(8) variable is always specified with the prefix ACPI_LV.
Another example can be mentioned for the use of hw.acpi.debug.object. The following could appear in an ASL code:
Method(_Q19, 0, NotSerialized) { Store("_Q19 invoked", Debug) Notify(ACAD, 0x80) }
When hw.acpi.debug.object is set to 1, the message stored to the debug object is printed every time the method is called by the interpreter.
Hewlett-Packard Corporation, Intel Corporation, Microsoft Corporation, Phoenix Technologies Ltd., and Toshiba Corporation, Advanced Configuration and Power Interface Specification, Revision 4.0, June 16, 2009, http://www.acpi.info/spec.htm.
Intel Corporation, ACPI Component Architecture,, Programmer Reference,, OS-Independent Subsystem, Debugger, and Utilities, Revision 1.27, January 20, 2010, http://www.acpica.org/download/acpica-reference.pdf.
Len Brown, ACPI in Linux - Myths vs. Reality, 65-74, June 27-30, 2007, Proceedings of the Linux Symposium, http://www.linuxsymposium.org/archives/OLS/Reprints-2007/brown_1-Reprint.pdf.
Joerg Sonnenberger and Jared D. McNeill, Sleeping Beauty - NetBSD on Modern Laptops, 127-134, February 3, 2008, Proceedings of AsiaBSDCon 2008, http://2008.asiabsdcon.org/papers/P9A-paper.pdf.
Takanori Watanabe, ACPI Implementation on FreeBSD, Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference, USENIX Association, 121-131, June 10-15, 2002, http://www.usenix.org/event/usenix02/tech/freenix/full_papers/watanabe/watanabe.pdf.
October 5, 2011 | NetBSD 6.1 |