Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/intel-public/acpica/dist/include/platform In pr...



details:   https://anonhg.NetBSD.org/src/rev/1a911d7e01be
branches:  trunk
changeset: 752513:1a911d7e01be
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Feb 28 12:57:11 2010 +0000

description:
In preparation for partial modularization of the acpi(4) subtree.

* * *

XXX:    The internal memory tracking of ACPICA, available when
        ACPI_DBG_TRACK_ALLOCATIONS is defined, has been removed
        from ACPI_DEBUG.

        This is due to the instability of the ABI of ACPICA.

        If the memory tracking is enabled, ACPICA will insert a header
        to each memory allocation. As a consequence, when ACPI specific
        code is loaded as a kernel module and the running kernel has
        been compiled with ACPI_DEBUG, the result is an instant panic.
        This happens because of unaligned memory access when the code
        tries to use ACPI_FREE for a buffer obtained via ACPI_ALLOCATE,
        AcpiEvaluateObject(), and related calls.

        If the involved memory statistics are required, a separate constant
        ACPI_DEBUG_ALLOC is available in options(4) for ACPI_DEBUG kernels.

* * *

Discussed with, and ok'ed by, jmcneill@ and pooka@.

diffstat:

 sys/external/intel-public/acpica/dist/include/platform/acnetbsd.h |  25 +++++++++-
 1 files changed, 23 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r 18ad61a8dd7d -r 1a911d7e01be sys/external/intel-public/acpica/dist/include/platform/acnetbsd.h
--- a/sys/external/intel-public/acpica/dist/include/platform/acnetbsd.h Sun Feb 28 12:40:46 2010 +0000
+++ b/sys/external/intel-public/acpica/dist/include/platform/acnetbsd.h Sun Feb 28 12:57:11 2010 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acnetbsd.h - OS specific defines, etc.
- *       $Revision: 1.2 $
+ *       $Revision: 1.3 $
  *
  *****************************************************************************/
 
@@ -135,7 +135,7 @@
 #define COMPILER_DEPENDENT_UINT64 uint64_t
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-#ifdef _KERNEL
+#ifdef _KERNEL_OPT
 #include "opt_acpi.h"           /* collect build-time options here */
 #endif /* _KERNEL */
 
@@ -155,9 +155,30 @@
 #define ACPI_INTERNAL_XFACE
 #define ACPI_INTERNAL_VAR_XFACE
 
+/*
+ * XXX: The internal memory tracking of ACPICA, available when
+ *      ACPI_DBG_TRACK_ALLOCATIONS is defined, has been removed
+ *      from ACPI_DEBUG.
+ *
+ *      This is due to the instability of the ABI of ACPICA.
+ *
+ *      If the memory tracking is enabled, ACPICA will insert a header
+ *      to each memory allocation. As a consequence, when ACPI specific
+ *      code is loaded as a kernel module and the running kernel has
+ *      been compiled with ACPI_DEBUG, the result is an instant panic.
+ *      This happens because of unaligned memory access when the code
+ *      tries to use ACPI_FREE for a buffer obtained via ACPI_ALLOCATE,
+ *      AcpiEvaluateObject(), and related calls.
+ *
+ *      If the involved memory statistics are required, a separate constant
+ *      ACPI_DEBUG_ALLOC is available in options(4) for ACPI_DEBUG kernels.
+ */
+
 #ifdef ACPI_DEBUG
 #define ACPI_DEBUG_OUTPUT
+#ifdef ACPI_DEBUG_ALLOC
 #define ACPI_DBG_TRACK_ALLOCATIONS
+#endif
 #ifdef DEBUGGER_THREADING
 #undef DEBUGGER_THREADING
 #endif /* DEBUGGER_THREADING */



Home | Main Index | Thread Index | Old Index