xref: /freebsd/sys/contrib/dev/acpica/include/acoutput.h (revision 58308fadece25ae4c12bd2f4dce3d73d9c23be43)
1a9f12690SJung-uk Kim /******************************************************************************
2a9f12690SJung-uk Kim  *
3a9f12690SJung-uk Kim  * Name: acoutput.h -- debug output
4a9f12690SJung-uk Kim  *
5a9f12690SJung-uk Kim  *****************************************************************************/
6a9f12690SJung-uk Kim 
70d84335fSJung-uk Kim /******************************************************************************
80d84335fSJung-uk Kim  *
90d84335fSJung-uk Kim  * 1. Copyright Notice
100d84335fSJung-uk Kim  *
11*58308fadSJung-uk Kim  * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
12a9f12690SJung-uk Kim  * All rights reserved.
13a9f12690SJung-uk Kim  *
140d84335fSJung-uk Kim  * 2. License
150d84335fSJung-uk Kim  *
160d84335fSJung-uk Kim  * 2.1. This is your license from Intel Corp. under its intellectual property
170d84335fSJung-uk Kim  * rights. You may have additional license terms from the party that provided
180d84335fSJung-uk Kim  * you this software, covering your right to use that party's intellectual
190d84335fSJung-uk Kim  * property rights.
200d84335fSJung-uk Kim  *
210d84335fSJung-uk Kim  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
220d84335fSJung-uk Kim  * copy of the source code appearing in this file ("Covered Code") an
230d84335fSJung-uk Kim  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
240d84335fSJung-uk Kim  * base code distributed originally by Intel ("Original Intel Code") to copy,
250d84335fSJung-uk Kim  * make derivatives, distribute, use and display any portion of the Covered
260d84335fSJung-uk Kim  * Code in any form, with the right to sublicense such rights; and
270d84335fSJung-uk Kim  *
280d84335fSJung-uk Kim  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
290d84335fSJung-uk Kim  * license (with the right to sublicense), under only those claims of Intel
300d84335fSJung-uk Kim  * patents that are infringed by the Original Intel Code, to make, use, sell,
310d84335fSJung-uk Kim  * offer to sell, and import the Covered Code and derivative works thereof
320d84335fSJung-uk Kim  * solely to the minimum extent necessary to exercise the above copyright
330d84335fSJung-uk Kim  * license, and in no event shall the patent license extend to any additions
340d84335fSJung-uk Kim  * to or modifications of the Original Intel Code. No other license or right
350d84335fSJung-uk Kim  * is granted directly or by implication, estoppel or otherwise;
360d84335fSJung-uk Kim  *
370d84335fSJung-uk Kim  * The above copyright and patent license is granted only if the following
380d84335fSJung-uk Kim  * conditions are met:
390d84335fSJung-uk Kim  *
400d84335fSJung-uk Kim  * 3. Conditions
410d84335fSJung-uk Kim  *
420d84335fSJung-uk Kim  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
430d84335fSJung-uk Kim  * Redistribution of source code of any substantial portion of the Covered
440d84335fSJung-uk Kim  * Code or modification with rights to further distribute source must include
450d84335fSJung-uk Kim  * the above Copyright Notice, the above License, this list of Conditions,
460d84335fSJung-uk Kim  * and the following Disclaimer and Export Compliance provision. In addition,
470d84335fSJung-uk Kim  * Licensee must cause all Covered Code to which Licensee contributes to
480d84335fSJung-uk Kim  * contain a file documenting the changes Licensee made to create that Covered
490d84335fSJung-uk Kim  * Code and the date of any change. Licensee must include in that file the
500d84335fSJung-uk Kim  * documentation of any changes made by any predecessor Licensee. Licensee
510d84335fSJung-uk Kim  * must include a prominent statement that the modification is derived,
520d84335fSJung-uk Kim  * directly or indirectly, from Original Intel Code.
530d84335fSJung-uk Kim  *
540d84335fSJung-uk Kim  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
550d84335fSJung-uk Kim  * Redistribution of source code of any substantial portion of the Covered
560d84335fSJung-uk Kim  * Code or modification without rights to further distribute source must
570d84335fSJung-uk Kim  * include the following Disclaimer and Export Compliance provision in the
580d84335fSJung-uk Kim  * documentation and/or other materials provided with distribution. In
590d84335fSJung-uk Kim  * addition, Licensee may not authorize further sublicense of source of any
600d84335fSJung-uk Kim  * portion of the Covered Code, and must include terms to the effect that the
610d84335fSJung-uk Kim  * license from Licensee to its licensee is limited to the intellectual
620d84335fSJung-uk Kim  * property embodied in the software Licensee provides to its licensee, and
630d84335fSJung-uk Kim  * not to intellectual property embodied in modifications its licensee may
640d84335fSJung-uk Kim  * make.
650d84335fSJung-uk Kim  *
660d84335fSJung-uk Kim  * 3.3. Redistribution of Executable. Redistribution in executable form of any
670d84335fSJung-uk Kim  * substantial portion of the Covered Code or modification must reproduce the
680d84335fSJung-uk Kim  * above Copyright Notice, and the following Disclaimer and Export Compliance
690d84335fSJung-uk Kim  * provision in the documentation and/or other materials provided with the
700d84335fSJung-uk Kim  * distribution.
710d84335fSJung-uk Kim  *
720d84335fSJung-uk Kim  * 3.4. Intel retains all right, title, and interest in and to the Original
730d84335fSJung-uk Kim  * Intel Code.
740d84335fSJung-uk Kim  *
750d84335fSJung-uk Kim  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
760d84335fSJung-uk Kim  * Intel shall be used in advertising or otherwise to promote the sale, use or
770d84335fSJung-uk Kim  * other dealings in products derived from or relating to the Covered Code
780d84335fSJung-uk Kim  * without prior written authorization from Intel.
790d84335fSJung-uk Kim  *
800d84335fSJung-uk Kim  * 4. Disclaimer and Export Compliance
810d84335fSJung-uk Kim  *
820d84335fSJung-uk Kim  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
830d84335fSJung-uk Kim  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
840d84335fSJung-uk Kim  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
850d84335fSJung-uk Kim  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
860d84335fSJung-uk Kim  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
870d84335fSJung-uk Kim  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
880d84335fSJung-uk Kim  * PARTICULAR PURPOSE.
890d84335fSJung-uk Kim  *
900d84335fSJung-uk Kim  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
910d84335fSJung-uk Kim  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
920d84335fSJung-uk Kim  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
930d84335fSJung-uk Kim  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
940d84335fSJung-uk Kim  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
950d84335fSJung-uk Kim  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
960d84335fSJung-uk Kim  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
970d84335fSJung-uk Kim  * LIMITED REMEDY.
980d84335fSJung-uk Kim  *
990d84335fSJung-uk Kim  * 4.3. Licensee shall not export, either directly or indirectly, any of this
1000d84335fSJung-uk Kim  * software or system incorporating such software without first obtaining any
1010d84335fSJung-uk Kim  * required license or other approval from the U. S. Department of Commerce or
1020d84335fSJung-uk Kim  * any other agency or department of the United States Government. In the
1030d84335fSJung-uk Kim  * event Licensee exports any such software from the United States or
1040d84335fSJung-uk Kim  * re-exports any such software from a foreign destination, Licensee shall
1050d84335fSJung-uk Kim  * ensure that the distribution and export/re-export of the software is in
1060d84335fSJung-uk Kim  * compliance with all laws, regulations, orders, or other restrictions of the
1070d84335fSJung-uk Kim  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
1080d84335fSJung-uk Kim  * any of its subsidiaries will export/re-export any technical data, process,
1090d84335fSJung-uk Kim  * software, or service, directly or indirectly, to any country for which the
1100d84335fSJung-uk Kim  * United States government or any agency thereof requires an export license,
1110d84335fSJung-uk Kim  * other governmental approval, or letter of assurance, without first obtaining
1120d84335fSJung-uk Kim  * such license, approval or letter.
1130d84335fSJung-uk Kim  *
1140d84335fSJung-uk Kim  *****************************************************************************
1150d84335fSJung-uk Kim  *
1160d84335fSJung-uk Kim  * Alternatively, you may choose to be licensed under the terms of the
1170d84335fSJung-uk Kim  * following license:
1180d84335fSJung-uk Kim  *
119d244b227SJung-uk Kim  * Redistribution and use in source and binary forms, with or without
120d244b227SJung-uk Kim  * modification, are permitted provided that the following conditions
121d244b227SJung-uk Kim  * are met:
122d244b227SJung-uk Kim  * 1. Redistributions of source code must retain the above copyright
123d244b227SJung-uk Kim  *    notice, this list of conditions, and the following disclaimer,
124d244b227SJung-uk Kim  *    without modification.
125d244b227SJung-uk Kim  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126d244b227SJung-uk Kim  *    substantially similar to the "NO WARRANTY" disclaimer below
127d244b227SJung-uk Kim  *    ("Disclaimer") and any redistribution must be conditioned upon
128d244b227SJung-uk Kim  *    including a substantially similar Disclaimer requirement for further
129d244b227SJung-uk Kim  *    binary redistribution.
130d244b227SJung-uk Kim  * 3. Neither the names of the above-listed copyright holders nor the names
131d244b227SJung-uk Kim  *    of any contributors may be used to endorse or promote products derived
132d244b227SJung-uk Kim  *    from this software without specific prior written permission.
133a9f12690SJung-uk Kim  *
1340d84335fSJung-uk Kim  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1350d84335fSJung-uk Kim  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1360d84335fSJung-uk Kim  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1370d84335fSJung-uk Kim  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1380d84335fSJung-uk Kim  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1390d84335fSJung-uk Kim  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1400d84335fSJung-uk Kim  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1410d84335fSJung-uk Kim  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1420d84335fSJung-uk Kim  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1430d84335fSJung-uk Kim  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1440d84335fSJung-uk Kim  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1450d84335fSJung-uk Kim  *
1460d84335fSJung-uk Kim  * Alternatively, you may choose to be licensed under the terms of the
147d244b227SJung-uk Kim  * GNU General Public License ("GPL") version 2 as published by the Free
148d244b227SJung-uk Kim  * Software Foundation.
149a9f12690SJung-uk Kim  *
1500d84335fSJung-uk Kim  *****************************************************************************/
151a9f12690SJung-uk Kim 
152a9f12690SJung-uk Kim #ifndef __ACOUTPUT_H__
153a9f12690SJung-uk Kim #define __ACOUTPUT_H__
154a9f12690SJung-uk Kim 
155a9f12690SJung-uk Kim /*
156a9f12690SJung-uk Kim  * Debug levels and component IDs. These are used to control the
157a9f12690SJung-uk Kim  * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a
158a9f12690SJung-uk Kim  * per-component basis and a per-exception-type basis.
159a9f12690SJung-uk Kim  */
160a9f12690SJung-uk Kim 
161a9f12690SJung-uk Kim /* Component IDs are used in the global "DebugLayer" */
162a9f12690SJung-uk Kim 
163a9f12690SJung-uk Kim #define ACPI_UTILITIES              0x00000001
164a9f12690SJung-uk Kim #define ACPI_HARDWARE               0x00000002
165a9f12690SJung-uk Kim #define ACPI_EVENTS                 0x00000004
166a9f12690SJung-uk Kim #define ACPI_TABLES                 0x00000008
167a9f12690SJung-uk Kim #define ACPI_NAMESPACE              0x00000010
168a9f12690SJung-uk Kim #define ACPI_PARSER                 0x00000020
169a9f12690SJung-uk Kim #define ACPI_DISPATCHER             0x00000040
170a9f12690SJung-uk Kim #define ACPI_EXECUTER               0x00000080
171a9f12690SJung-uk Kim #define ACPI_RESOURCES              0x00000100
172a9f12690SJung-uk Kim #define ACPI_CA_DEBUGGER            0x00000200
173a9f12690SJung-uk Kim #define ACPI_OS_SERVICES            0x00000400
174a9f12690SJung-uk Kim #define ACPI_CA_DISASSEMBLER        0x00000800
175a9f12690SJung-uk Kim 
176a9f12690SJung-uk Kim /* Component IDs for ACPI tools and utilities */
177a9f12690SJung-uk Kim 
178a9f12690SJung-uk Kim #define ACPI_COMPILER               0x00001000
179a9f12690SJung-uk Kim #define ACPI_TOOLS                  0x00002000
180a9f12690SJung-uk Kim #define ACPI_EXAMPLE                0x00004000
181a9f12690SJung-uk Kim #define ACPI_DRIVER                 0x00008000
182a88e22b7SJung-uk Kim #define DT_COMPILER                 0x00010000
1834c52cad2SJung-uk Kim #define ASL_PREPROCESSOR            0x00020000
184a9f12690SJung-uk Kim 
185a88e22b7SJung-uk Kim #define ACPI_ALL_COMPONENTS         0x0001FFFF
186a9f12690SJung-uk Kim #define ACPI_COMPONENT_DEFAULT      (ACPI_ALL_COMPONENTS)
187a9f12690SJung-uk Kim 
188a9f12690SJung-uk Kim /* Component IDs reserved for ACPI drivers */
189a9f12690SJung-uk Kim 
190a9f12690SJung-uk Kim #define ACPI_ALL_DRIVERS            0xFFFF0000
191a9f12690SJung-uk Kim 
192a9f12690SJung-uk Kim 
193a9f12690SJung-uk Kim /*
194a9f12690SJung-uk Kim  * Raw debug output levels, do not use these in the ACPI_DEBUG_PRINT macros
195a9f12690SJung-uk Kim  */
196a9f12690SJung-uk Kim #define ACPI_LV_INIT                0x00000001
197a9f12690SJung-uk Kim #define ACPI_LV_DEBUG_OBJECT        0x00000002
198a9f12690SJung-uk Kim #define ACPI_LV_INFO                0x00000004
199572c8255SJung-uk Kim #define ACPI_LV_REPAIR              0x00000008
200fe0f0bbbSJung-uk Kim #define ACPI_LV_TRACE_POINT         0x00000010
201fe0f0bbbSJung-uk Kim #define ACPI_LV_ALL_EXCEPTIONS      0x0000001F
202a9f12690SJung-uk Kim 
203a9f12690SJung-uk Kim /* Trace verbosity level 1 [Standard Trace Level] */
204a9f12690SJung-uk Kim 
205a9f12690SJung-uk Kim #define ACPI_LV_INIT_NAMES          0x00000020
206a9f12690SJung-uk Kim #define ACPI_LV_PARSE               0x00000040
207a9f12690SJung-uk Kim #define ACPI_LV_LOAD                0x00000080
208a9f12690SJung-uk Kim #define ACPI_LV_DISPATCH            0x00000100
209a9f12690SJung-uk Kim #define ACPI_LV_EXEC                0x00000200
210a9f12690SJung-uk Kim #define ACPI_LV_NAMES               0x00000400
211a9f12690SJung-uk Kim #define ACPI_LV_OPREGION            0x00000800
212a9f12690SJung-uk Kim #define ACPI_LV_BFIELD              0x00001000
213a9f12690SJung-uk Kim #define ACPI_LV_TABLES              0x00002000
214a9f12690SJung-uk Kim #define ACPI_LV_VALUES              0x00004000
215a9f12690SJung-uk Kim #define ACPI_LV_OBJECTS             0x00008000
216a9f12690SJung-uk Kim #define ACPI_LV_RESOURCES           0x00010000
217a9f12690SJung-uk Kim #define ACPI_LV_USER_REQUESTS       0x00020000
218a9f12690SJung-uk Kim #define ACPI_LV_PACKAGE             0x00040000
21990b566fdSJung-uk Kim #define ACPI_LV_EVALUATION          0x00080000
22090b566fdSJung-uk Kim #define ACPI_LV_VERBOSITY1          0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS
221a9f12690SJung-uk Kim 
222a9f12690SJung-uk Kim /* Trace verbosity level 2 [Function tracing and memory allocation] */
223a9f12690SJung-uk Kim 
224a9f12690SJung-uk Kim #define ACPI_LV_ALLOCATIONS         0x00100000
225a9f12690SJung-uk Kim #define ACPI_LV_FUNCTIONS           0x00200000
226a9f12690SJung-uk Kim #define ACPI_LV_OPTIMIZATIONS       0x00400000
2273d90091dSJung-uk Kim #define ACPI_LV_PARSE_TREES         0x00800000
2283d90091dSJung-uk Kim #define ACPI_LV_VERBOSITY2          0x00F00000 | ACPI_LV_VERBOSITY1
229a9f12690SJung-uk Kim #define ACPI_LV_ALL                 ACPI_LV_VERBOSITY2
230a9f12690SJung-uk Kim 
231a9f12690SJung-uk Kim /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */
232a9f12690SJung-uk Kim 
233a9f12690SJung-uk Kim #define ACPI_LV_MUTEX               0x01000000
234a9f12690SJung-uk Kim #define ACPI_LV_THREADS             0x02000000
235a9f12690SJung-uk Kim #define ACPI_LV_IO                  0x04000000
236a9f12690SJung-uk Kim #define ACPI_LV_INTERRUPTS          0x08000000
237a9f12690SJung-uk Kim #define ACPI_LV_VERBOSITY3          0x0F000000 | ACPI_LV_VERBOSITY2
238a9f12690SJung-uk Kim 
239a9f12690SJung-uk Kim /* Exceptionally verbose output -- also used in the global "DebugLevel"  */
240a9f12690SJung-uk Kim 
241a9f12690SJung-uk Kim #define ACPI_LV_AML_DISASSEMBLE     0x10000000
242a9f12690SJung-uk Kim #define ACPI_LV_VERBOSE_INFO        0x20000000
243a9f12690SJung-uk Kim #define ACPI_LV_FULL_TABLES         0x40000000
244a9f12690SJung-uk Kim #define ACPI_LV_EVENTS              0x80000000
245a9f12690SJung-uk Kim #define ACPI_LV_VERBOSE             0xF0000000
246a9f12690SJung-uk Kim 
247a9f12690SJung-uk Kim 
248a9f12690SJung-uk Kim /*
249a9f12690SJung-uk Kim  * Debug level macros that are used in the DEBUG_PRINT macros
250a9f12690SJung-uk Kim  */
251a9f12690SJung-uk Kim #define ACPI_DEBUG_LEVEL(dl)        (UINT32) dl,ACPI_DEBUG_PARAMETERS
252a9f12690SJung-uk Kim 
253a9f12690SJung-uk Kim /*
254a9f12690SJung-uk Kim  * Exception level -- used in the global "DebugLevel"
255a9f12690SJung-uk Kim  *
256a9f12690SJung-uk Kim  * Note: For errors, use the ACPI_ERROR or ACPI_EXCEPTION interfaces.
257a9f12690SJung-uk Kim  * For warnings, use ACPI_WARNING.
258a9f12690SJung-uk Kim  */
259a9f12690SJung-uk Kim #define ACPI_DB_INIT                ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
260a9f12690SJung-uk Kim #define ACPI_DB_DEBUG_OBJECT        ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
261a9f12690SJung-uk Kim #define ACPI_DB_INFO                ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
262572c8255SJung-uk Kim #define ACPI_DB_REPAIR              ACPI_DEBUG_LEVEL (ACPI_LV_REPAIR)
263fe0f0bbbSJung-uk Kim #define ACPI_DB_TRACE_POINT         ACPI_DEBUG_LEVEL (ACPI_LV_TRACE_POINT)
264a9f12690SJung-uk Kim #define ACPI_DB_ALL_EXCEPTIONS      ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
265a9f12690SJung-uk Kim 
266a9f12690SJung-uk Kim /* Trace level -- also used in the global "DebugLevel" */
267a9f12690SJung-uk Kim 
268a9f12690SJung-uk Kim #define ACPI_DB_INIT_NAMES          ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
269a9f12690SJung-uk Kim #define ACPI_DB_THREADS             ACPI_DEBUG_LEVEL (ACPI_LV_THREADS)
270a9f12690SJung-uk Kim #define ACPI_DB_PARSE               ACPI_DEBUG_LEVEL (ACPI_LV_PARSE)
271a9f12690SJung-uk Kim #define ACPI_DB_DISPATCH            ACPI_DEBUG_LEVEL (ACPI_LV_DISPATCH)
272a9f12690SJung-uk Kim #define ACPI_DB_LOAD                ACPI_DEBUG_LEVEL (ACPI_LV_LOAD)
273a9f12690SJung-uk Kim #define ACPI_DB_EXEC                ACPI_DEBUG_LEVEL (ACPI_LV_EXEC)
274a9f12690SJung-uk Kim #define ACPI_DB_NAMES               ACPI_DEBUG_LEVEL (ACPI_LV_NAMES)
275a9f12690SJung-uk Kim #define ACPI_DB_OPREGION            ACPI_DEBUG_LEVEL (ACPI_LV_OPREGION)
276a9f12690SJung-uk Kim #define ACPI_DB_BFIELD              ACPI_DEBUG_LEVEL (ACPI_LV_BFIELD)
277a9f12690SJung-uk Kim #define ACPI_DB_TABLES              ACPI_DEBUG_LEVEL (ACPI_LV_TABLES)
278a9f12690SJung-uk Kim #define ACPI_DB_FUNCTIONS           ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS)
279a9f12690SJung-uk Kim #define ACPI_DB_OPTIMIZATIONS       ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS)
2803d90091dSJung-uk Kim #define ACPI_DB_PARSE_TREES         ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES)
281a9f12690SJung-uk Kim #define ACPI_DB_VALUES              ACPI_DEBUG_LEVEL (ACPI_LV_VALUES)
282a9f12690SJung-uk Kim #define ACPI_DB_OBJECTS             ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS)
283a9f12690SJung-uk Kim #define ACPI_DB_ALLOCATIONS         ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS)
284a9f12690SJung-uk Kim #define ACPI_DB_RESOURCES           ACPI_DEBUG_LEVEL (ACPI_LV_RESOURCES)
285a9f12690SJung-uk Kim #define ACPI_DB_IO                  ACPI_DEBUG_LEVEL (ACPI_LV_IO)
286a9f12690SJung-uk Kim #define ACPI_DB_INTERRUPTS          ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS)
287a9f12690SJung-uk Kim #define ACPI_DB_USER_REQUESTS       ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
288a9f12690SJung-uk Kim #define ACPI_DB_PACKAGE             ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
28990b566fdSJung-uk Kim #define ACPI_DB_EVALUATION          ACPI_DEBUG_LEVEL (ACPI_LV_EVALUATION)
290a9f12690SJung-uk Kim #define ACPI_DB_MUTEX               ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
291a9f12690SJung-uk Kim #define ACPI_DB_EVENTS              ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
292a9f12690SJung-uk Kim 
293a9f12690SJung-uk Kim #define ACPI_DB_ALL                 ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
294a9f12690SJung-uk Kim 
295a9f12690SJung-uk Kim /* Defaults for DebugLevel, debug and normal */
296a9f12690SJung-uk Kim 
29790b566fdSJung-uk Kim #define ACPI_DEBUG_DEFAULT          (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_EVALUATION | ACPI_LV_REPAIR)
298572c8255SJung-uk Kim #define ACPI_NORMAL_DEFAULT         (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR)
299a9f12690SJung-uk Kim #define ACPI_DEBUG_ALL              (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
300a9f12690SJung-uk Kim 
301a9f12690SJung-uk Kim 
302fe0f0bbbSJung-uk Kim /*
303fe0f0bbbSJung-uk Kim  * Global trace flags
304fe0f0bbbSJung-uk Kim  */
305fe0f0bbbSJung-uk Kim #define ACPI_TRACE_ENABLED          ((UINT32) 4)
306fe0f0bbbSJung-uk Kim #define ACPI_TRACE_ONESHOT          ((UINT32) 2)
307fe0f0bbbSJung-uk Kim #define ACPI_TRACE_OPCODE           ((UINT32) 1)
308fe0f0bbbSJung-uk Kim 
309fe0f0bbbSJung-uk Kim /* Defaults for trace debugging level/layer */
310fe0f0bbbSJung-uk Kim 
311fe0f0bbbSJung-uk Kim #define ACPI_TRACE_LEVEL_ALL        ACPI_LV_ALL
312fe0f0bbbSJung-uk Kim #define ACPI_TRACE_LAYER_ALL        0x000001FF
313fe0f0bbbSJung-uk Kim #define ACPI_TRACE_LEVEL_DEFAULT    ACPI_LV_TRACE_POINT
314fe0f0bbbSJung-uk Kim #define ACPI_TRACE_LAYER_DEFAULT    ACPI_EXECUTER
315fe0f0bbbSJung-uk Kim 
316fe0f0bbbSJung-uk Kim 
317a9f12690SJung-uk Kim #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
318a9f12690SJung-uk Kim /*
3190b94ba42SJung-uk Kim  * The module name is used primarily for error and debug messages.
3200b94ba42SJung-uk Kim  * The __FILE__ macro is not very useful for this, because it
3210b94ba42SJung-uk Kim  * usually includes the entire pathname to the module making the
3220b94ba42SJung-uk Kim  * debug output difficult to read.
323a9f12690SJung-uk Kim  */
324a9f12690SJung-uk Kim #define ACPI_MODULE_NAME(Name)          static const char ACPI_UNUSED_VAR _AcpiModuleName[] = Name;
325a9f12690SJung-uk Kim #else
3260b94ba42SJung-uk Kim /*
3270b94ba42SJung-uk Kim  * For the no-debug and no-error-msg cases, we must at least define
3280b94ba42SJung-uk Kim  * a null module name.
3290b94ba42SJung-uk Kim  */
330a9f12690SJung-uk Kim #define ACPI_MODULE_NAME(Name)
3310b94ba42SJung-uk Kim #define _AcpiModuleName ""
332a9f12690SJung-uk Kim #endif
333a9f12690SJung-uk Kim 
334a9f12690SJung-uk Kim /*
335a9f12690SJung-uk Kim  * Ascii error messages can be configured out
336a9f12690SJung-uk Kim  */
337a9f12690SJung-uk Kim #ifndef ACPI_NO_ERROR_MESSAGES
338a9f12690SJung-uk Kim #define AE_INFO                         _AcpiModuleName, __LINE__
33992f570c3SJung-uk Kim #define ACPI_ONCE(_fn, _plist)                  { static char _done; if (!_done) { _done = 1; _fn _plist; } }
340a9f12690SJung-uk Kim 
341a9f12690SJung-uk Kim /*
342a9f12690SJung-uk Kim  * Error reporting. Callers module and line number are inserted by AE_INFO,
343a9f12690SJung-uk Kim  * the plist contains a set of parens to allow variable-length lists.
344a9f12690SJung-uk Kim  * These macros are used for both the debug and non-debug versions of the code.
345a9f12690SJung-uk Kim  */
346a9f12690SJung-uk Kim #define ACPI_INFO(plist)                AcpiInfo plist
347a9f12690SJung-uk Kim #define ACPI_WARNING(plist)             AcpiWarning plist
34892f570c3SJung-uk Kim #define ACPI_WARNING_ONCE(plist)        ACPI_ONCE(AcpiWarning, plist)
349a9f12690SJung-uk Kim #define ACPI_EXCEPTION(plist)           AcpiException plist
350a9f12690SJung-uk Kim #define ACPI_ERROR(plist)               AcpiError plist
35192f570c3SJung-uk Kim #define ACPI_ERROR_ONCE(plist)          ACPI_ONCE(AcpiError, plist)
352e8241eabSJung-uk Kim #define ACPI_BIOS_WARNING(plist)        AcpiBiosWarning plist
353e5e1f58aSJung-uk Kim #define ACPI_BIOS_EXCEPTION(plist)      AcpiBiosException plist
354e8241eabSJung-uk Kim #define ACPI_BIOS_ERROR(plist)          AcpiBiosError plist
355ca3cf4faSJung-uk Kim #define ACPI_DEBUG_OBJECT(obj,l,i)      AcpiExDoDebugObject(obj,l,i)
356a9f12690SJung-uk Kim 
357a9f12690SJung-uk Kim #else
358a9f12690SJung-uk Kim 
359a9f12690SJung-uk Kim /* No error messages */
360a9f12690SJung-uk Kim 
361a9f12690SJung-uk Kim #define ACPI_INFO(plist)
362a9f12690SJung-uk Kim #define ACPI_WARNING(plist)
36392f570c3SJung-uk Kim #define ACPI_WARNING_ONCE(plist)
364a9f12690SJung-uk Kim #define ACPI_EXCEPTION(plist)
365a9f12690SJung-uk Kim #define ACPI_ERROR(plist)
36692f570c3SJung-uk Kim #define ACPI_ERROR_ONCE(plist)
367e8241eabSJung-uk Kim #define ACPI_BIOS_WARNING(plist)
368e5e1f58aSJung-uk Kim #define ACPI_BIOS_EXCEPTION(plist)
369e8241eabSJung-uk Kim #define ACPI_BIOS_ERROR(plist)
370ca3cf4faSJung-uk Kim #define ACPI_DEBUG_OBJECT(obj,l,i)
371a9f12690SJung-uk Kim 
372a9f12690SJung-uk Kim #endif /* ACPI_NO_ERROR_MESSAGES */
373a9f12690SJung-uk Kim 
374a9f12690SJung-uk Kim 
375a9f12690SJung-uk Kim /*
376a9f12690SJung-uk Kim  * Debug macros that are conditionally compiled
377a9f12690SJung-uk Kim  */
378a9f12690SJung-uk Kim #ifdef ACPI_DEBUG_OUTPUT
379a9f12690SJung-uk Kim 
380a9f12690SJung-uk Kim /*
381a9f12690SJung-uk Kim  * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
382a9f12690SJung-uk Kim  * define it now. This is the case where there the compiler does not support
383a9f12690SJung-uk Kim  * a __FUNCTION__ macro or equivalent.
384a9f12690SJung-uk Kim  */
385a9f12690SJung-uk Kim #ifndef ACPI_GET_FUNCTION_NAME
386a9f12690SJung-uk Kim #define ACPI_GET_FUNCTION_NAME          _AcpiFunctionName
387a9f12690SJung-uk Kim 
388a9f12690SJung-uk Kim /*
389f8146b88SJung-uk Kim  * The Name parameter should be the procedure name as a non-quoted string.
390a9f12690SJung-uk Kim  * The function name is also used by the function exit macros below.
391a9f12690SJung-uk Kim  * Note: (const char) is used to be compatible with the debug interfaces
392a9f12690SJung-uk Kim  * and macros such as __FUNCTION__.
393a9f12690SJung-uk Kim  */
394a9f12690SJung-uk Kim #define ACPI_FUNCTION_NAME(Name)        static const char _AcpiFunctionName[] = #Name;
395a9f12690SJung-uk Kim 
396a9f12690SJung-uk Kim #else
397a9f12690SJung-uk Kim /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
398a9f12690SJung-uk Kim 
399a9f12690SJung-uk Kim #define ACPI_FUNCTION_NAME(Name)
400a9f12690SJung-uk Kim #endif /* ACPI_GET_FUNCTION_NAME */
401a9f12690SJung-uk Kim 
402a9f12690SJung-uk Kim /*
403a9f12690SJung-uk Kim  * Common parameters used for debug output functions:
404a9f12690SJung-uk Kim  * line number, function name, module(file) name, component ID
405a9f12690SJung-uk Kim  */
406efcc2a30SJung-uk Kim #define ACPI_DEBUG_PARAMETERS \
407efcc2a30SJung-uk Kim     __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT
408efcc2a30SJung-uk Kim 
409efcc2a30SJung-uk Kim /* Check if debug output is currently dynamically enabled */
410efcc2a30SJung-uk Kim 
411efcc2a30SJung-uk Kim #define ACPI_IS_DEBUG_ENABLED(Level, Component) \
412efcc2a30SJung-uk Kim     ((Level & AcpiDbgLevel) && (Component & AcpiDbgLayer))
413a9f12690SJung-uk Kim 
414a9f12690SJung-uk Kim /*
415a9f12690SJung-uk Kim  * Master debug print macros
416a9f12690SJung-uk Kim  * Print message if and only if:
417a9f12690SJung-uk Kim  *    1) Debug print for the current component is enabled
418a9f12690SJung-uk Kim  *    2) Debug error level or trace level for the print statement is enabled
419efcc2a30SJung-uk Kim  *
420efcc2a30SJung-uk Kim  * November 2012: Moved the runtime check for whether to actually emit the
421efcc2a30SJung-uk Kim  * debug message outside of the print function itself. This improves overall
422efcc2a30SJung-uk Kim  * performance at a relatively small code cost. Implementation involves the
423efcc2a30SJung-uk Kim  * use of variadic macros supported by C99.
424efcc2a30SJung-uk Kim  *
425efcc2a30SJung-uk Kim  * Note: the ACPI_DO_WHILE0 macro is used to prevent some compilers from
426efcc2a30SJung-uk Kim  * complaining about these constructs. On other compilers the do...while
427efcc2a30SJung-uk Kim  * adds some extra code, so this feature is optional.
428a9f12690SJung-uk Kim  */
429efcc2a30SJung-uk Kim #ifdef ACPI_USE_DO_WHILE_0
430efcc2a30SJung-uk Kim #define ACPI_DO_WHILE0(a)               do a while(0)
431a9f12690SJung-uk Kim #else
432efcc2a30SJung-uk Kim #define ACPI_DO_WHILE0(a)               a
433efcc2a30SJung-uk Kim #endif
434efcc2a30SJung-uk Kim 
435efcc2a30SJung-uk Kim /* DEBUG_PRINT functions */
436efcc2a30SJung-uk Kim 
4375ef50723SJung-uk Kim #ifndef COMPILER_VA_MACRO
4385ef50723SJung-uk Kim 
4395ef50723SJung-uk Kim #define ACPI_DEBUG_PRINT(plist)         AcpiDebugPrint plist
4405ef50723SJung-uk Kim #define ACPI_DEBUG_PRINT_RAW(plist)     AcpiDebugPrintRaw plist
4415ef50723SJung-uk Kim 
4425ef50723SJung-uk Kim #else
443efcc2a30SJung-uk Kim 
444efcc2a30SJung-uk Kim /* Helper macros for DEBUG_PRINT */
445efcc2a30SJung-uk Kim 
446efcc2a30SJung-uk Kim #define ACPI_DO_DEBUG_PRINT(Function, Level, Line, Filename, Modulename, Component, ...) \
447efcc2a30SJung-uk Kim     ACPI_DO_WHILE0 ({ \
448efcc2a30SJung-uk Kim         if (ACPI_IS_DEBUG_ENABLED (Level, Component)) \
449efcc2a30SJung-uk Kim         { \
450efcc2a30SJung-uk Kim             Function (Level, Line, Filename, Modulename, Component, __VA_ARGS__); \
451efcc2a30SJung-uk Kim         } \
452efcc2a30SJung-uk Kim     })
453efcc2a30SJung-uk Kim 
454efcc2a30SJung-uk Kim #define ACPI_ACTUAL_DEBUG(Level, Line, Filename, Modulename, Component, ...) \
455efcc2a30SJung-uk Kim     ACPI_DO_DEBUG_PRINT (AcpiDebugPrint, Level, Line, \
456efcc2a30SJung-uk Kim         Filename, Modulename, Component, __VA_ARGS__)
457efcc2a30SJung-uk Kim 
458efcc2a30SJung-uk Kim #define ACPI_ACTUAL_DEBUG_RAW(Level, Line, Filename, Modulename, Component, ...) \
459efcc2a30SJung-uk Kim     ACPI_DO_DEBUG_PRINT (AcpiDebugPrintRaw, Level, Line, \
460efcc2a30SJung-uk Kim         Filename, Modulename, Component, __VA_ARGS__)
461efcc2a30SJung-uk Kim 
4625ef50723SJung-uk Kim #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
4635ef50723SJung-uk Kim #define ACPI_DEBUG_PRINT_RAW(plist)     ACPI_ACTUAL_DEBUG_RAW plist
4645ef50723SJung-uk Kim 
4655ef50723SJung-uk Kim #endif
4665ef50723SJung-uk Kim 
467efcc2a30SJung-uk Kim 
468efcc2a30SJung-uk Kim /*
469efcc2a30SJung-uk Kim  * Function entry tracing
470efcc2a30SJung-uk Kim  *
471efcc2a30SJung-uk Kim  * The name of the function is emitted as a local variable that is
472efcc2a30SJung-uk Kim  * intended to be used by both the entry trace and the exit trace.
473efcc2a30SJung-uk Kim  */
474efcc2a30SJung-uk Kim 
475efcc2a30SJung-uk Kim /* Helper macro */
476efcc2a30SJung-uk Kim 
4776f4860fcSJung-uk Kim #define ACPI_TRACE_ENTRY(Name, Function, Type, Param) \
478efcc2a30SJung-uk Kim     ACPI_FUNCTION_NAME (Name) \
4796f4860fcSJung-uk Kim     Function (ACPI_DEBUG_PARAMETERS, (Type) (Param))
480efcc2a30SJung-uk Kim 
481efcc2a30SJung-uk Kim /* The actual entry trace macros */
482efcc2a30SJung-uk Kim 
483efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE(Name) \
484efcc2a30SJung-uk Kim     ACPI_FUNCTION_NAME(Name) \
485efcc2a30SJung-uk Kim     AcpiUtTrace (ACPI_DEBUG_PARAMETERS)
486efcc2a30SJung-uk Kim 
487efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE_PTR(Name, Pointer) \
4886f4860fcSJung-uk Kim     ACPI_TRACE_ENTRY (Name, AcpiUtTracePtr, void *, Pointer)
489efcc2a30SJung-uk Kim 
490efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE_U32(Name, Value) \
4916f4860fcSJung-uk Kim     ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, UINT32, Value)
492efcc2a30SJung-uk Kim 
493efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE_STR(Name, String) \
494f8146b88SJung-uk Kim     ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, const char *, String)
495efcc2a30SJung-uk Kim 
496efcc2a30SJung-uk Kim #define ACPI_FUNCTION_ENTRY() \
497efcc2a30SJung-uk Kim     AcpiUtTrackStackPtr()
498efcc2a30SJung-uk Kim 
499efcc2a30SJung-uk Kim 
500efcc2a30SJung-uk Kim /*
501efcc2a30SJung-uk Kim  * Function exit tracing
502efcc2a30SJung-uk Kim  *
503efcc2a30SJung-uk Kim  * These macros include a return statement. This is usually considered
504efcc2a30SJung-uk Kim  * bad form, but having a separate exit macro before the actual return
505efcc2a30SJung-uk Kim  * is very ugly and difficult to maintain.
506efcc2a30SJung-uk Kim  *
507efcc2a30SJung-uk Kim  * One of the FUNCTION_TRACE macros above must be used in conjunction
508efcc2a30SJung-uk Kim  * with these macros so that "_AcpiFunctionName" is defined.
5096f4860fcSJung-uk Kim  *
5106f4860fcSJung-uk Kim  * There are two versions of most of the return macros. The default version is
5116f4860fcSJung-uk Kim  * safer, since it avoids side-effects by guaranteeing that the argument will
5126f4860fcSJung-uk Kim  * not be evaluated twice.
5136f4860fcSJung-uk Kim  *
5146f4860fcSJung-uk Kim  * A less-safe version of the macros is provided for optional use if the
5156f4860fcSJung-uk Kim  * compiler uses excessive CPU stack (for example, this may happen in the
516cfd1ed46SJung-uk Kim  * debug case if code optimization is disabled.)
517efcc2a30SJung-uk Kim  */
518efcc2a30SJung-uk Kim 
519efcc2a30SJung-uk Kim /* Exit trace helper macro */
520efcc2a30SJung-uk Kim 
5216f4860fcSJung-uk Kim #ifndef ACPI_SIMPLE_RETURN_MACROS
5226f4860fcSJung-uk Kim 
5236f4860fcSJung-uk Kim #define ACPI_TRACE_EXIT(Function, Type, Param) \
524efcc2a30SJung-uk Kim     ACPI_DO_WHILE0 ({ \
5256f4860fcSJung-uk Kim         register Type _Param = (Type) (Param); \
5266f4860fcSJung-uk Kim         Function (ACPI_DEBUG_PARAMETERS, _Param); \
5276f4860fcSJung-uk Kim         return (_Param); \
528efcc2a30SJung-uk Kim     })
529efcc2a30SJung-uk Kim 
5306f4860fcSJung-uk Kim #else /* Use original less-safe macros */
5316f4860fcSJung-uk Kim 
5326f4860fcSJung-uk Kim #define ACPI_TRACE_EXIT(Function, Type, Param) \
5336f4860fcSJung-uk Kim     ACPI_DO_WHILE0 ({ \
5346f4860fcSJung-uk Kim         Function (ACPI_DEBUG_PARAMETERS, (Type) (Param)); \
5356f4860fcSJung-uk Kim         return (Param); \
5366f4860fcSJung-uk Kim     })
5376f4860fcSJung-uk Kim 
5386f4860fcSJung-uk Kim #endif /* ACPI_SIMPLE_RETURN_MACROS */
5396f4860fcSJung-uk Kim 
540efcc2a30SJung-uk Kim /* The actual exit macros */
541efcc2a30SJung-uk Kim 
542efcc2a30SJung-uk Kim #define return_VOID \
543efcc2a30SJung-uk Kim     ACPI_DO_WHILE0 ({ \
544efcc2a30SJung-uk Kim         AcpiUtExit (ACPI_DEBUG_PARAMETERS); \
545efcc2a30SJung-uk Kim         return; \
546efcc2a30SJung-uk Kim     })
547efcc2a30SJung-uk Kim 
548efcc2a30SJung-uk Kim #define return_ACPI_STATUS(Status) \
5496f4860fcSJung-uk Kim     ACPI_TRACE_EXIT (AcpiUtStatusExit, ACPI_STATUS, Status)
550efcc2a30SJung-uk Kim 
551efcc2a30SJung-uk Kim #define return_PTR(Pointer) \
5526f4860fcSJung-uk Kim     ACPI_TRACE_EXIT (AcpiUtPtrExit, void *, Pointer)
553efcc2a30SJung-uk Kim 
554f8146b88SJung-uk Kim #define return_STR(String) \
555f8146b88SJung-uk Kim     ACPI_TRACE_EXIT (AcpiUtStrExit, const char *, String)
556f8146b88SJung-uk Kim 
557efcc2a30SJung-uk Kim #define return_VALUE(Value) \
5586f4860fcSJung-uk Kim     ACPI_TRACE_EXIT (AcpiUtValueExit, UINT64, Value)
559efcc2a30SJung-uk Kim 
5609c48c75eSJung-uk Kim #define return_UINT32(Value) \
5619c48c75eSJung-uk Kim     ACPI_TRACE_EXIT (AcpiUtValueExit, UINT32, Value)
5629c48c75eSJung-uk Kim 
5639c48c75eSJung-uk Kim #define return_UINT8(Value) \
5649c48c75eSJung-uk Kim     ACPI_TRACE_EXIT (AcpiUtValueExit, UINT8, Value)
565efcc2a30SJung-uk Kim 
566efcc2a30SJung-uk Kim /* Conditional execution */
567efcc2a30SJung-uk Kim 
568efcc2a30SJung-uk Kim #define ACPI_DEBUG_EXEC(a)              a
56997c0b5abSJung-uk Kim #define ACPI_DEBUG_ONLY_MEMBERS(a)      a
570efcc2a30SJung-uk Kim #define _VERBOSE_STRUCTURES
571efcc2a30SJung-uk Kim 
572efcc2a30SJung-uk Kim 
573efcc2a30SJung-uk Kim /* Various object display routines for debug */
574efcc2a30SJung-uk Kim 
575efcc2a30SJung-uk Kim #define ACPI_DUMP_STACK_ENTRY(a)        AcpiExDumpOperand((a), 0)
576efcc2a30SJung-uk Kim #define ACPI_DUMP_OPERANDS(a, b ,c)     AcpiExDumpOperands(a, b, c)
577efcc2a30SJung-uk Kim #define ACPI_DUMP_ENTRY(a, b)           AcpiNsDumpEntry (a, b)
578efcc2a30SJung-uk Kim #define ACPI_DUMP_PATHNAME(a, b, c, d)  AcpiNsDumpPathname(a, b, c, d)
579efcc2a30SJung-uk Kim #define ACPI_DUMP_BUFFER(a, b)          AcpiUtDebugDumpBuffer((UINT8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
580efcc2a30SJung-uk Kim 
581fe0f0bbbSJung-uk Kim #define ACPI_TRACE_POINT(a, b, c, d)    AcpiTracePoint (a, b, c, d)
582fe0f0bbbSJung-uk Kim 
583efcc2a30SJung-uk Kim #else /* ACPI_DEBUG_OUTPUT */
584a9f12690SJung-uk Kim /*
585a9f12690SJung-uk Kim  * This is the non-debug case -- make everything go away,
586a9f12690SJung-uk Kim  * leaving no executable debug code!
587a9f12690SJung-uk Kim  */
588a9f12690SJung-uk Kim #define ACPI_DEBUG_PRINT(pl)
589a9f12690SJung-uk Kim #define ACPI_DEBUG_PRINT_RAW(pl)
590efcc2a30SJung-uk Kim #define ACPI_DEBUG_EXEC(a)
591efcc2a30SJung-uk Kim #define ACPI_DEBUG_ONLY_MEMBERS(a)
592895f26a9SJung-uk Kim #define ACPI_FUNCTION_NAME(a)
593efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE(a)
594efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE_PTR(a, b)
595efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE_U32(a, b)
596efcc2a30SJung-uk Kim #define ACPI_FUNCTION_TRACE_STR(a, b)
597efcc2a30SJung-uk Kim #define ACPI_FUNCTION_ENTRY()
598efcc2a30SJung-uk Kim #define ACPI_DUMP_STACK_ENTRY(a)
599efcc2a30SJung-uk Kim #define ACPI_DUMP_OPERANDS(a, b, c)
600efcc2a30SJung-uk Kim #define ACPI_DUMP_ENTRY(a, b)
601efcc2a30SJung-uk Kim #define ACPI_DUMP_PATHNAME(a, b, c, d)
602efcc2a30SJung-uk Kim #define ACPI_DUMP_BUFFER(a, b)
603efcc2a30SJung-uk Kim #define ACPI_IS_DEBUG_ENABLED(Level, Component) 0
604fe0f0bbbSJung-uk Kim #define ACPI_TRACE_POINT(a, b, c, d)
605efcc2a30SJung-uk Kim 
606efcc2a30SJung-uk Kim /* Return macros must have a return statement at the minimum */
607efcc2a30SJung-uk Kim 
608efcc2a30SJung-uk Kim #define return_VOID                     return
609efcc2a30SJung-uk Kim #define return_ACPI_STATUS(s)           return(s)
610efcc2a30SJung-uk Kim #define return_PTR(s)                   return(s)
611f8628d5bSJung-uk Kim #define return_STR(s)                   return(s)
6129c48c75eSJung-uk Kim #define return_VALUE(s)                 return(s)
6139c48c75eSJung-uk Kim #define return_UINT8(s)                 return(s)
6149c48c75eSJung-uk Kim #define return_UINT32(s)                return(s)
615a9f12690SJung-uk Kim 
616a9f12690SJung-uk Kim #endif /* ACPI_DEBUG_OUTPUT */
617a9f12690SJung-uk Kim 
618a9f12690SJung-uk Kim 
619a9f12690SJung-uk Kim #endif /* __ACOUTPUT_H__ */
620