17c478bd9Sstevel@tonic-gate /****************************************************************************** 27c478bd9Sstevel@tonic-gate * 37c478bd9Sstevel@tonic-gate * Name: acoutput.h -- debug output 47c478bd9Sstevel@tonic-gate * 57c478bd9Sstevel@tonic-gate *****************************************************************************/ 67c478bd9Sstevel@tonic-gate 7*35786f68SRobert Mustacchi /****************************************************************************** 8*35786f68SRobert Mustacchi * 9*35786f68SRobert Mustacchi * 1. Copyright Notice 10*35786f68SRobert Mustacchi * 11*35786f68SRobert Mustacchi * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. 127c478bd9Sstevel@tonic-gate * All rights reserved. 137c478bd9Sstevel@tonic-gate * 14*35786f68SRobert Mustacchi * 2. License 15*35786f68SRobert Mustacchi * 16*35786f68SRobert Mustacchi * 2.1. This is your license from Intel Corp. under its intellectual property 17*35786f68SRobert Mustacchi * rights. You may have additional license terms from the party that provided 18*35786f68SRobert Mustacchi * you this software, covering your right to use that party's intellectual 19*35786f68SRobert Mustacchi * property rights. 20*35786f68SRobert Mustacchi * 21*35786f68SRobert Mustacchi * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22*35786f68SRobert Mustacchi * copy of the source code appearing in this file ("Covered Code") an 23*35786f68SRobert Mustacchi * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24*35786f68SRobert Mustacchi * base code distributed originally by Intel ("Original Intel Code") to copy, 25*35786f68SRobert Mustacchi * make derivatives, distribute, use and display any portion of the Covered 26*35786f68SRobert Mustacchi * Code in any form, with the right to sublicense such rights; and 27*35786f68SRobert Mustacchi * 28*35786f68SRobert Mustacchi * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29*35786f68SRobert Mustacchi * license (with the right to sublicense), under only those claims of Intel 30*35786f68SRobert Mustacchi * patents that are infringed by the Original Intel Code, to make, use, sell, 31*35786f68SRobert Mustacchi * offer to sell, and import the Covered Code and derivative works thereof 32*35786f68SRobert Mustacchi * solely to the minimum extent necessary to exercise the above copyright 33*35786f68SRobert Mustacchi * license, and in no event shall the patent license extend to any additions 34*35786f68SRobert Mustacchi * to or modifications of the Original Intel Code. No other license or right 35*35786f68SRobert Mustacchi * is granted directly or by implication, estoppel or otherwise; 36*35786f68SRobert Mustacchi * 37*35786f68SRobert Mustacchi * The above copyright and patent license is granted only if the following 38*35786f68SRobert Mustacchi * conditions are met: 39*35786f68SRobert Mustacchi * 40*35786f68SRobert Mustacchi * 3. Conditions 41*35786f68SRobert Mustacchi * 42*35786f68SRobert Mustacchi * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43*35786f68SRobert Mustacchi * Redistribution of source code of any substantial portion of the Covered 44*35786f68SRobert Mustacchi * Code or modification with rights to further distribute source must include 45*35786f68SRobert Mustacchi * the above Copyright Notice, the above License, this list of Conditions, 46*35786f68SRobert Mustacchi * and the following Disclaimer and Export Compliance provision. In addition, 47*35786f68SRobert Mustacchi * Licensee must cause all Covered Code to which Licensee contributes to 48*35786f68SRobert Mustacchi * contain a file documenting the changes Licensee made to create that Covered 49*35786f68SRobert Mustacchi * Code and the date of any change. Licensee must include in that file the 50*35786f68SRobert Mustacchi * documentation of any changes made by any predecessor Licensee. Licensee 51*35786f68SRobert Mustacchi * must include a prominent statement that the modification is derived, 52*35786f68SRobert Mustacchi * directly or indirectly, from Original Intel Code. 53*35786f68SRobert Mustacchi * 54*35786f68SRobert Mustacchi * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55*35786f68SRobert Mustacchi * Redistribution of source code of any substantial portion of the Covered 56*35786f68SRobert Mustacchi * Code or modification without rights to further distribute source must 57*35786f68SRobert Mustacchi * include the following Disclaimer and Export Compliance provision in the 58*35786f68SRobert Mustacchi * documentation and/or other materials provided with distribution. In 59*35786f68SRobert Mustacchi * addition, Licensee may not authorize further sublicense of source of any 60*35786f68SRobert Mustacchi * portion of the Covered Code, and must include terms to the effect that the 61*35786f68SRobert Mustacchi * license from Licensee to its licensee is limited to the intellectual 62*35786f68SRobert Mustacchi * property embodied in the software Licensee provides to its licensee, and 63*35786f68SRobert Mustacchi * not to intellectual property embodied in modifications its licensee may 64*35786f68SRobert Mustacchi * make. 65*35786f68SRobert Mustacchi * 66*35786f68SRobert Mustacchi * 3.3. Redistribution of Executable. Redistribution in executable form of any 67*35786f68SRobert Mustacchi * substantial portion of the Covered Code or modification must reproduce the 68*35786f68SRobert Mustacchi * above Copyright Notice, and the following Disclaimer and Export Compliance 69*35786f68SRobert Mustacchi * provision in the documentation and/or other materials provided with the 70*35786f68SRobert Mustacchi * distribution. 71*35786f68SRobert Mustacchi * 72*35786f68SRobert Mustacchi * 3.4. Intel retains all right, title, and interest in and to the Original 73*35786f68SRobert Mustacchi * Intel Code. 74*35786f68SRobert Mustacchi * 75*35786f68SRobert Mustacchi * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76*35786f68SRobert Mustacchi * Intel shall be used in advertising or otherwise to promote the sale, use or 77*35786f68SRobert Mustacchi * other dealings in products derived from or relating to the Covered Code 78*35786f68SRobert Mustacchi * without prior written authorization from Intel. 79*35786f68SRobert Mustacchi * 80*35786f68SRobert Mustacchi * 4. Disclaimer and Export Compliance 81*35786f68SRobert Mustacchi * 82*35786f68SRobert Mustacchi * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83*35786f68SRobert Mustacchi * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84*35786f68SRobert Mustacchi * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85*35786f68SRobert Mustacchi * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86*35786f68SRobert Mustacchi * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87*35786f68SRobert Mustacchi * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88*35786f68SRobert Mustacchi * PARTICULAR PURPOSE. 89*35786f68SRobert Mustacchi * 90*35786f68SRobert Mustacchi * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91*35786f68SRobert Mustacchi * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92*35786f68SRobert Mustacchi * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93*35786f68SRobert Mustacchi * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94*35786f68SRobert Mustacchi * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95*35786f68SRobert Mustacchi * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96*35786f68SRobert Mustacchi * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97*35786f68SRobert Mustacchi * LIMITED REMEDY. 98*35786f68SRobert Mustacchi * 99*35786f68SRobert Mustacchi * 4.3. Licensee shall not export, either directly or indirectly, any of this 100*35786f68SRobert Mustacchi * software or system incorporating such software without first obtaining any 101*35786f68SRobert Mustacchi * required license or other approval from the U. S. Department of Commerce or 102*35786f68SRobert Mustacchi * any other agency or department of the United States Government. In the 103*35786f68SRobert Mustacchi * event Licensee exports any such software from the United States or 104*35786f68SRobert Mustacchi * re-exports any such software from a foreign destination, Licensee shall 105*35786f68SRobert Mustacchi * ensure that the distribution and export/re-export of the software is in 106*35786f68SRobert Mustacchi * compliance with all laws, regulations, orders, or other restrictions of the 107*35786f68SRobert Mustacchi * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108*35786f68SRobert Mustacchi * any of its subsidiaries will export/re-export any technical data, process, 109*35786f68SRobert Mustacchi * software, or service, directly or indirectly, to any country for which the 110*35786f68SRobert Mustacchi * United States government or any agency thereof requires an export license, 111*35786f68SRobert Mustacchi * other governmental approval, or letter of assurance, without first obtaining 112*35786f68SRobert Mustacchi * such license, approval or letter. 113*35786f68SRobert Mustacchi * 114*35786f68SRobert Mustacchi ***************************************************************************** 115*35786f68SRobert Mustacchi * 116*35786f68SRobert Mustacchi * Alternatively, you may choose to be licensed under the terms of the 117*35786f68SRobert Mustacchi * following license: 118*35786f68SRobert Mustacchi * 11926f3cdf0SGordon Ross * Redistribution and use in source and binary forms, with or without 12026f3cdf0SGordon Ross * modification, are permitted provided that the following conditions 12126f3cdf0SGordon Ross * are met: 12226f3cdf0SGordon Ross * 1. Redistributions of source code must retain the above copyright 12326f3cdf0SGordon Ross * notice, this list of conditions, and the following disclaimer, 12426f3cdf0SGordon Ross * without modification. 12526f3cdf0SGordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12626f3cdf0SGordon Ross * substantially similar to the "NO WARRANTY" disclaimer below 12726f3cdf0SGordon Ross * ("Disclaimer") and any redistribution must be conditioned upon 12826f3cdf0SGordon Ross * including a substantially similar Disclaimer requirement for further 12926f3cdf0SGordon Ross * binary redistribution. 13026f3cdf0SGordon Ross * 3. Neither the names of the above-listed copyright holders nor the names 13126f3cdf0SGordon Ross * of any contributors may be used to endorse or promote products derived 13226f3cdf0SGordon Ross * from this software without specific prior written permission. 13326f3cdf0SGordon Ross * 13426f3cdf0SGordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13526f3cdf0SGordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 136*35786f68SRobert Mustacchi * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13726f3cdf0SGordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 138*35786f68SRobert Mustacchi * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 139*35786f68SRobert Mustacchi * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 140*35786f68SRobert Mustacchi * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 141*35786f68SRobert Mustacchi * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 142*35786f68SRobert Mustacchi * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 143*35786f68SRobert Mustacchi * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 144*35786f68SRobert Mustacchi * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 145*35786f68SRobert Mustacchi * 146*35786f68SRobert Mustacchi * Alternatively, you may choose to be licensed under the terms of the 147*35786f68SRobert Mustacchi * GNU General Public License ("GPL") version 2 as published by the Free 148*35786f68SRobert Mustacchi * Software Foundation. 149*35786f68SRobert Mustacchi * 150*35786f68SRobert Mustacchi *****************************************************************************/ 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate #ifndef __ACOUTPUT_H__ 1537c478bd9Sstevel@tonic-gate #define __ACOUTPUT_H__ 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gate /* 156aa2aa9a6SDana Myers * Debug levels and component IDs. These are used to control the 157aa2aa9a6SDana Myers * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a 158aa2aa9a6SDana Myers * per-component basis and a per-exception-type basis. 1597c478bd9Sstevel@tonic-gate */ 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate /* Component IDs are used in the global "DebugLayer" */ 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate #define ACPI_UTILITIES 0x00000001 1647c478bd9Sstevel@tonic-gate #define ACPI_HARDWARE 0x00000002 1657c478bd9Sstevel@tonic-gate #define ACPI_EVENTS 0x00000004 1667c478bd9Sstevel@tonic-gate #define ACPI_TABLES 0x00000008 1677c478bd9Sstevel@tonic-gate #define ACPI_NAMESPACE 0x00000010 1687c478bd9Sstevel@tonic-gate #define ACPI_PARSER 0x00000020 1697c478bd9Sstevel@tonic-gate #define ACPI_DISPATCHER 0x00000040 1707c478bd9Sstevel@tonic-gate #define ACPI_EXECUTER 0x00000080 1717c478bd9Sstevel@tonic-gate #define ACPI_RESOURCES 0x00000100 1727c478bd9Sstevel@tonic-gate #define ACPI_CA_DEBUGGER 0x00000200 1737c478bd9Sstevel@tonic-gate #define ACPI_OS_SERVICES 0x00000400 1747c478bd9Sstevel@tonic-gate #define ACPI_CA_DISASSEMBLER 0x00000800 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate /* Component IDs for ACPI tools and utilities */ 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate #define ACPI_COMPILER 0x00001000 1797c478bd9Sstevel@tonic-gate #define ACPI_TOOLS 0x00002000 180aa2aa9a6SDana Myers #define ACPI_EXAMPLE 0x00004000 181aa2aa9a6SDana Myers #define ACPI_DRIVER 0x00008000 18226f3cdf0SGordon Ross #define DT_COMPILER 0x00010000 1837b1019a6SJerry Jelinek #define ASL_PREPROCESSOR 0x00020000 1847c478bd9Sstevel@tonic-gate 18526f3cdf0SGordon Ross #define ACPI_ALL_COMPONENTS 0x0001FFFF 1867c478bd9Sstevel@tonic-gate #define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS) 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate /* Component IDs reserved for ACPI drivers */ 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate #define ACPI_ALL_DRIVERS 0xFFFF0000 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate /* 194aa2aa9a6SDana Myers * Raw debug output levels, do not use these in the ACPI_DEBUG_PRINT macros 1957c478bd9Sstevel@tonic-gate */ 196db2bae30SDana Myers #define ACPI_LV_INIT 0x00000001 197db2bae30SDana Myers #define ACPI_LV_DEBUG_OBJECT 0x00000002 198db2bae30SDana Myers #define ACPI_LV_INFO 0x00000004 19926f3cdf0SGordon Ross #define ACPI_LV_REPAIR 0x00000008 2007b1019a6SJerry Jelinek #define ACPI_LV_TRACE_POINT 0x00000010 2017b1019a6SJerry Jelinek #define ACPI_LV_ALL_EXCEPTIONS 0x0000001F 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate /* Trace verbosity level 1 [Standard Trace Level] */ 2047c478bd9Sstevel@tonic-gate 2057c478bd9Sstevel@tonic-gate #define ACPI_LV_INIT_NAMES 0x00000020 2067c478bd9Sstevel@tonic-gate #define ACPI_LV_PARSE 0x00000040 2077c478bd9Sstevel@tonic-gate #define ACPI_LV_LOAD 0x00000080 2087c478bd9Sstevel@tonic-gate #define ACPI_LV_DISPATCH 0x00000100 2097c478bd9Sstevel@tonic-gate #define ACPI_LV_EXEC 0x00000200 2107c478bd9Sstevel@tonic-gate #define ACPI_LV_NAMES 0x00000400 2117c478bd9Sstevel@tonic-gate #define ACPI_LV_OPREGION 0x00000800 2127c478bd9Sstevel@tonic-gate #define ACPI_LV_BFIELD 0x00001000 2137c478bd9Sstevel@tonic-gate #define ACPI_LV_TABLES 0x00002000 2147c478bd9Sstevel@tonic-gate #define ACPI_LV_VALUES 0x00004000 2157c478bd9Sstevel@tonic-gate #define ACPI_LV_OBJECTS 0x00008000 2167c478bd9Sstevel@tonic-gate #define ACPI_LV_RESOURCES 0x00010000 2177c478bd9Sstevel@tonic-gate #define ACPI_LV_USER_REQUESTS 0x00020000 2187c478bd9Sstevel@tonic-gate #define ACPI_LV_PACKAGE 0x00040000 2197c478bd9Sstevel@tonic-gate #define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate /* Trace verbosity level 2 [Function tracing and memory allocation] */ 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gate #define ACPI_LV_ALLOCATIONS 0x00100000 2247c478bd9Sstevel@tonic-gate #define ACPI_LV_FUNCTIONS 0x00200000 2257c478bd9Sstevel@tonic-gate #define ACPI_LV_OPTIMIZATIONS 0x00400000 226*35786f68SRobert Mustacchi #define ACPI_LV_PARSE_TREES 0x00800000 227*35786f68SRobert Mustacchi #define ACPI_LV_VERBOSITY2 0x00F00000 | ACPI_LV_VERBOSITY1 2287c478bd9Sstevel@tonic-gate #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gate /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ 2317c478bd9Sstevel@tonic-gate 2327c478bd9Sstevel@tonic-gate #define ACPI_LV_MUTEX 0x01000000 2337c478bd9Sstevel@tonic-gate #define ACPI_LV_THREADS 0x02000000 2347c478bd9Sstevel@tonic-gate #define ACPI_LV_IO 0x04000000 2357c478bd9Sstevel@tonic-gate #define ACPI_LV_INTERRUPTS 0x08000000 2367c478bd9Sstevel@tonic-gate #define ACPI_LV_VERBOSITY3 0x0F000000 | ACPI_LV_VERBOSITY2 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate /* Exceptionally verbose output -- also used in the global "DebugLevel" */ 2397c478bd9Sstevel@tonic-gate 2407c478bd9Sstevel@tonic-gate #define ACPI_LV_AML_DISASSEMBLE 0x10000000 2417c478bd9Sstevel@tonic-gate #define ACPI_LV_VERBOSE_INFO 0x20000000 2427c478bd9Sstevel@tonic-gate #define ACPI_LV_FULL_TABLES 0x40000000 2437c478bd9Sstevel@tonic-gate #define ACPI_LV_EVENTS 0x80000000 2447c478bd9Sstevel@tonic-gate #define ACPI_LV_VERBOSE 0xF0000000 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate 2477c478bd9Sstevel@tonic-gate /* 2487c478bd9Sstevel@tonic-gate * Debug level macros that are used in the DEBUG_PRINT macros 2497c478bd9Sstevel@tonic-gate */ 250450d6964Smyers #define ACPI_DEBUG_LEVEL(dl) (UINT32) dl,ACPI_DEBUG_PARAMETERS 2517c478bd9Sstevel@tonic-gate 252db2bae30SDana Myers /* 253db2bae30SDana Myers * Exception level -- used in the global "DebugLevel" 254db2bae30SDana Myers * 255db2bae30SDana Myers * Note: For errors, use the ACPI_ERROR or ACPI_EXCEPTION interfaces. 256db2bae30SDana Myers * For warnings, use ACPI_WARNING. 257db2bae30SDana Myers */ 2587c478bd9Sstevel@tonic-gate #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) 2597c478bd9Sstevel@tonic-gate #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) 2607c478bd9Sstevel@tonic-gate #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) 26126f3cdf0SGordon Ross #define ACPI_DB_REPAIR ACPI_DEBUG_LEVEL (ACPI_LV_REPAIR) 2627b1019a6SJerry Jelinek #define ACPI_DB_TRACE_POINT ACPI_DEBUG_LEVEL (ACPI_LV_TRACE_POINT) 2637c478bd9Sstevel@tonic-gate #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) 2647c478bd9Sstevel@tonic-gate 2657c478bd9Sstevel@tonic-gate /* Trace level -- also used in the global "DebugLevel" */ 2667c478bd9Sstevel@tonic-gate 2677c478bd9Sstevel@tonic-gate #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) 2687c478bd9Sstevel@tonic-gate #define ACPI_DB_THREADS ACPI_DEBUG_LEVEL (ACPI_LV_THREADS) 2697c478bd9Sstevel@tonic-gate #define ACPI_DB_PARSE ACPI_DEBUG_LEVEL (ACPI_LV_PARSE) 2707c478bd9Sstevel@tonic-gate #define ACPI_DB_DISPATCH ACPI_DEBUG_LEVEL (ACPI_LV_DISPATCH) 2717c478bd9Sstevel@tonic-gate #define ACPI_DB_LOAD ACPI_DEBUG_LEVEL (ACPI_LV_LOAD) 2727c478bd9Sstevel@tonic-gate #define ACPI_DB_EXEC ACPI_DEBUG_LEVEL (ACPI_LV_EXEC) 2737c478bd9Sstevel@tonic-gate #define ACPI_DB_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_NAMES) 2747c478bd9Sstevel@tonic-gate #define ACPI_DB_OPREGION ACPI_DEBUG_LEVEL (ACPI_LV_OPREGION) 2757c478bd9Sstevel@tonic-gate #define ACPI_DB_BFIELD ACPI_DEBUG_LEVEL (ACPI_LV_BFIELD) 2767c478bd9Sstevel@tonic-gate #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) 2777c478bd9Sstevel@tonic-gate #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) 2787c478bd9Sstevel@tonic-gate #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) 279*35786f68SRobert Mustacchi #define ACPI_DB_PARSE_TREES ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES) 2807c478bd9Sstevel@tonic-gate #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) 2817c478bd9Sstevel@tonic-gate #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) 2827c478bd9Sstevel@tonic-gate #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) 2837c478bd9Sstevel@tonic-gate #define ACPI_DB_RESOURCES ACPI_DEBUG_LEVEL (ACPI_LV_RESOURCES) 2847c478bd9Sstevel@tonic-gate #define ACPI_DB_IO ACPI_DEBUG_LEVEL (ACPI_LV_IO) 2857c478bd9Sstevel@tonic-gate #define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS) 2867c478bd9Sstevel@tonic-gate #define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS) 2877c478bd9Sstevel@tonic-gate #define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE) 2887c478bd9Sstevel@tonic-gate #define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX) 289db2bae30SDana Myers #define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS) 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gate #define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL) 2927c478bd9Sstevel@tonic-gate 2937c478bd9Sstevel@tonic-gate /* Defaults for DebugLevel, debug and normal */ 2947c478bd9Sstevel@tonic-gate 29526f3cdf0SGordon Ross #define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR) 29626f3cdf0SGordon Ross #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR) 2977c478bd9Sstevel@tonic-gate #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) 2987c478bd9Sstevel@tonic-gate 2997c478bd9Sstevel@tonic-gate 3007b1019a6SJerry Jelinek /* 3017b1019a6SJerry Jelinek * Global trace flags 3027b1019a6SJerry Jelinek */ 3037b1019a6SJerry Jelinek #define ACPI_TRACE_ENABLED ((UINT32) 4) 3047b1019a6SJerry Jelinek #define ACPI_TRACE_ONESHOT ((UINT32) 2) 3057b1019a6SJerry Jelinek #define ACPI_TRACE_OPCODE ((UINT32) 1) 3067b1019a6SJerry Jelinek 3077b1019a6SJerry Jelinek /* Defaults for trace debugging level/layer */ 3087b1019a6SJerry Jelinek 3097b1019a6SJerry Jelinek #define ACPI_TRACE_LEVEL_ALL ACPI_LV_ALL 3107b1019a6SJerry Jelinek #define ACPI_TRACE_LAYER_ALL 0x000001FF 3117b1019a6SJerry Jelinek #define ACPI_TRACE_LEVEL_DEFAULT ACPI_LV_TRACE_POINT 3127b1019a6SJerry Jelinek #define ACPI_TRACE_LAYER_DEFAULT ACPI_EXECUTER 3137b1019a6SJerry Jelinek 3147b1019a6SJerry Jelinek 315aa2aa9a6SDana Myers #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) 316aa2aa9a6SDana Myers /* 31726f3cdf0SGordon Ross * The module name is used primarily for error and debug messages. 31826f3cdf0SGordon Ross * The __FILE__ macro is not very useful for this, because it 31926f3cdf0SGordon Ross * usually includes the entire pathname to the module making the 32026f3cdf0SGordon Ross * debug output difficult to read. 321aa2aa9a6SDana Myers */ 322aa2aa9a6SDana Myers #define ACPI_MODULE_NAME(Name) static const char ACPI_UNUSED_VAR _AcpiModuleName[] = Name; 323aa2aa9a6SDana Myers #else 32426f3cdf0SGordon Ross /* 32526f3cdf0SGordon Ross * For the no-debug and no-error-msg cases, we must at least define 32626f3cdf0SGordon Ross * a null module name. 32726f3cdf0SGordon Ross */ 328aa2aa9a6SDana Myers #define ACPI_MODULE_NAME(Name) 32926f3cdf0SGordon Ross #define _AcpiModuleName "" 330aa2aa9a6SDana Myers #endif 331aa2aa9a6SDana Myers 332aa2aa9a6SDana Myers /* 333aa2aa9a6SDana Myers * Ascii error messages can be configured out 334aa2aa9a6SDana Myers */ 335aa2aa9a6SDana Myers #ifndef ACPI_NO_ERROR_MESSAGES 336aa2aa9a6SDana Myers #define AE_INFO _AcpiModuleName, __LINE__ 337aa2aa9a6SDana Myers 338aa2aa9a6SDana Myers /* 339aa2aa9a6SDana Myers * Error reporting. Callers module and line number are inserted by AE_INFO, 340aa2aa9a6SDana Myers * the plist contains a set of parens to allow variable-length lists. 341aa2aa9a6SDana Myers * These macros are used for both the debug and non-debug versions of the code. 342aa2aa9a6SDana Myers */ 343aa2aa9a6SDana Myers #define ACPI_INFO(plist) AcpiInfo plist 344aa2aa9a6SDana Myers #define ACPI_WARNING(plist) AcpiWarning plist 345aa2aa9a6SDana Myers #define ACPI_EXCEPTION(plist) AcpiException plist 346aa2aa9a6SDana Myers #define ACPI_ERROR(plist) AcpiError plist 3477b1019a6SJerry Jelinek #define ACPI_BIOS_WARNING(plist) AcpiBiosWarning plist 3487b1019a6SJerry Jelinek #define ACPI_BIOS_ERROR(plist) AcpiBiosError plist 34926f3cdf0SGordon Ross #define ACPI_DEBUG_OBJECT(obj,l,i) AcpiExDoDebugObject(obj,l,i) 350aa2aa9a6SDana Myers 351aa2aa9a6SDana Myers #else 352aa2aa9a6SDana Myers 353aa2aa9a6SDana Myers /* No error messages */ 354aa2aa9a6SDana Myers 355aa2aa9a6SDana Myers #define ACPI_INFO(plist) 356aa2aa9a6SDana Myers #define ACPI_WARNING(plist) 357aa2aa9a6SDana Myers #define ACPI_EXCEPTION(plist) 358aa2aa9a6SDana Myers #define ACPI_ERROR(plist) 3597b1019a6SJerry Jelinek #define ACPI_BIOS_WARNING(plist) 3607b1019a6SJerry Jelinek #define ACPI_BIOS_ERROR(plist) 36126f3cdf0SGordon Ross #define ACPI_DEBUG_OBJECT(obj,l,i) 362aa2aa9a6SDana Myers 363aa2aa9a6SDana Myers #endif /* ACPI_NO_ERROR_MESSAGES */ 364aa2aa9a6SDana Myers 365aa2aa9a6SDana Myers 366aa2aa9a6SDana Myers /* 367aa2aa9a6SDana Myers * Debug macros that are conditionally compiled 368aa2aa9a6SDana Myers */ 369aa2aa9a6SDana Myers #ifdef ACPI_DEBUG_OUTPUT 370aa2aa9a6SDana Myers 371aa2aa9a6SDana Myers /* 372aa2aa9a6SDana Myers * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, 373aa2aa9a6SDana Myers * define it now. This is the case where there the compiler does not support 374aa2aa9a6SDana Myers * a __FUNCTION__ macro or equivalent. 375aa2aa9a6SDana Myers */ 376aa2aa9a6SDana Myers #ifndef ACPI_GET_FUNCTION_NAME 377aa2aa9a6SDana Myers #define ACPI_GET_FUNCTION_NAME _AcpiFunctionName 378aa2aa9a6SDana Myers 379aa2aa9a6SDana Myers /* 3807b1019a6SJerry Jelinek * The Name parameter should be the procedure name as a non-quoted string. 381aa2aa9a6SDana Myers * The function name is also used by the function exit macros below. 382aa2aa9a6SDana Myers * Note: (const char) is used to be compatible with the debug interfaces 383aa2aa9a6SDana Myers * and macros such as __FUNCTION__. 384aa2aa9a6SDana Myers */ 385aa2aa9a6SDana Myers #define ACPI_FUNCTION_NAME(Name) static const char _AcpiFunctionName[] = #Name; 386aa2aa9a6SDana Myers 387aa2aa9a6SDana Myers #else 388aa2aa9a6SDana Myers /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ 389aa2aa9a6SDana Myers 390aa2aa9a6SDana Myers #define ACPI_FUNCTION_NAME(Name) 391aa2aa9a6SDana Myers #endif /* ACPI_GET_FUNCTION_NAME */ 392aa2aa9a6SDana Myers 393aa2aa9a6SDana Myers /* 394aa2aa9a6SDana Myers * Common parameters used for debug output functions: 395aa2aa9a6SDana Myers * line number, function name, module(file) name, component ID 396aa2aa9a6SDana Myers */ 3977b1019a6SJerry Jelinek #define ACPI_DEBUG_PARAMETERS \ 3987b1019a6SJerry Jelinek __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT 3997b1019a6SJerry Jelinek 4007b1019a6SJerry Jelinek /* Check if debug output is currently dynamically enabled */ 4017b1019a6SJerry Jelinek 4027b1019a6SJerry Jelinek #define ACPI_IS_DEBUG_ENABLED(Level, Component) \ 4037b1019a6SJerry Jelinek ((Level & AcpiDbgLevel) && (Component & AcpiDbgLayer)) 404aa2aa9a6SDana Myers 405aa2aa9a6SDana Myers /* 406aa2aa9a6SDana Myers * Master debug print macros 407aa2aa9a6SDana Myers * Print message if and only if: 408aa2aa9a6SDana Myers * 1) Debug print for the current component is enabled 409aa2aa9a6SDana Myers * 2) Debug error level or trace level for the print statement is enabled 4107b1019a6SJerry Jelinek * 4117b1019a6SJerry Jelinek * November 2012: Moved the runtime check for whether to actually emit the 4127b1019a6SJerry Jelinek * debug message outside of the print function itself. This improves overall 4137b1019a6SJerry Jelinek * performance at a relatively small code cost. Implementation involves the 4147b1019a6SJerry Jelinek * use of variadic macros supported by C99. 4157b1019a6SJerry Jelinek * 4167b1019a6SJerry Jelinek * Note: the ACPI_DO_WHILE0 macro is used to prevent some compilers from 4177b1019a6SJerry Jelinek * complaining about these constructs. On other compilers the do...while 4187b1019a6SJerry Jelinek * adds some extra code, so this feature is optional. 419aa2aa9a6SDana Myers */ 4207b1019a6SJerry Jelinek #ifdef ACPI_USE_DO_WHILE_0 4217b1019a6SJerry Jelinek #define ACPI_DO_WHILE0(a) do a while(0) 4227b1019a6SJerry Jelinek #else 4237b1019a6SJerry Jelinek #define ACPI_DO_WHILE0(a) a 4247b1019a6SJerry Jelinek #endif 4257b1019a6SJerry Jelinek 4267b1019a6SJerry Jelinek /* DEBUG_PRINT functions */ 4277b1019a6SJerry Jelinek 4287b1019a6SJerry Jelinek #ifndef COMPILER_VA_MACRO 4297b1019a6SJerry Jelinek 430aa2aa9a6SDana Myers #define ACPI_DEBUG_PRINT(plist) AcpiDebugPrint plist 431aa2aa9a6SDana Myers #define ACPI_DEBUG_PRINT_RAW(plist) AcpiDebugPrintRaw plist 432aa2aa9a6SDana Myers 433aa2aa9a6SDana Myers #else 4347b1019a6SJerry Jelinek 4357b1019a6SJerry Jelinek /* Helper macros for DEBUG_PRINT */ 4367b1019a6SJerry Jelinek 4377b1019a6SJerry Jelinek #define ACPI_DO_DEBUG_PRINT(Function, Level, Line, Filename, Modulename, Component, ...) \ 4387b1019a6SJerry Jelinek ACPI_DO_WHILE0 ({ \ 4397b1019a6SJerry Jelinek if (ACPI_IS_DEBUG_ENABLED (Level, Component)) \ 4407b1019a6SJerry Jelinek { \ 4417b1019a6SJerry Jelinek Function (Level, Line, Filename, Modulename, Component, __VA_ARGS__); \ 4427b1019a6SJerry Jelinek } \ 4437b1019a6SJerry Jelinek }) 4447b1019a6SJerry Jelinek 4457b1019a6SJerry Jelinek #define ACPI_ACTUAL_DEBUG(Level, Line, Filename, Modulename, Component, ...) \ 4467b1019a6SJerry Jelinek ACPI_DO_DEBUG_PRINT (AcpiDebugPrint, Level, Line, \ 4477b1019a6SJerry Jelinek Filename, Modulename, Component, __VA_ARGS__) 4487b1019a6SJerry Jelinek 4497b1019a6SJerry Jelinek #define ACPI_ACTUAL_DEBUG_RAW(Level, Line, Filename, Modulename, Component, ...) \ 4507b1019a6SJerry Jelinek ACPI_DO_DEBUG_PRINT (AcpiDebugPrintRaw, Level, Line, \ 4517b1019a6SJerry Jelinek Filename, Modulename, Component, __VA_ARGS__) 4527b1019a6SJerry Jelinek 4537b1019a6SJerry Jelinek #define ACPI_DEBUG_PRINT(plist) ACPI_ACTUAL_DEBUG plist 4547b1019a6SJerry Jelinek #define ACPI_DEBUG_PRINT_RAW(plist) ACPI_ACTUAL_DEBUG_RAW plist 4557b1019a6SJerry Jelinek 4567b1019a6SJerry Jelinek #endif 4577b1019a6SJerry Jelinek 4587b1019a6SJerry Jelinek 4597b1019a6SJerry Jelinek /* 4607b1019a6SJerry Jelinek * Function entry tracing 4617b1019a6SJerry Jelinek * 4627b1019a6SJerry Jelinek * The name of the function is emitted as a local variable that is 4637b1019a6SJerry Jelinek * intended to be used by both the entry trace and the exit trace. 4647b1019a6SJerry Jelinek */ 4657b1019a6SJerry Jelinek 4667b1019a6SJerry Jelinek /* Helper macro */ 4677b1019a6SJerry Jelinek 4687b1019a6SJerry Jelinek #define ACPI_TRACE_ENTRY(Name, Function, Type, Param) \ 4697b1019a6SJerry Jelinek ACPI_FUNCTION_NAME (Name) \ 4707b1019a6SJerry Jelinek Function (ACPI_DEBUG_PARAMETERS, (Type) (Param)) 4717b1019a6SJerry Jelinek 4727b1019a6SJerry Jelinek /* The actual entry trace macros */ 4737b1019a6SJerry Jelinek 4747b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE(Name) \ 4757b1019a6SJerry Jelinek ACPI_FUNCTION_NAME(Name) \ 4767b1019a6SJerry Jelinek AcpiUtTrace (ACPI_DEBUG_PARAMETERS) 4777b1019a6SJerry Jelinek 4787b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE_PTR(Name, Pointer) \ 4797b1019a6SJerry Jelinek ACPI_TRACE_ENTRY (Name, AcpiUtTracePtr, void *, Pointer) 4807b1019a6SJerry Jelinek 4817b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE_U32(Name, Value) \ 4827b1019a6SJerry Jelinek ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, UINT32, Value) 4837b1019a6SJerry Jelinek 4847b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE_STR(Name, String) \ 4857b1019a6SJerry Jelinek ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, const char *, String) 4867b1019a6SJerry Jelinek 4877b1019a6SJerry Jelinek #define ACPI_FUNCTION_ENTRY() \ 4887b1019a6SJerry Jelinek AcpiUtTrackStackPtr() 4897b1019a6SJerry Jelinek 4907b1019a6SJerry Jelinek 4917b1019a6SJerry Jelinek /* 4927b1019a6SJerry Jelinek * Function exit tracing 4937b1019a6SJerry Jelinek * 4947b1019a6SJerry Jelinek * These macros include a return statement. This is usually considered 4957b1019a6SJerry Jelinek * bad form, but having a separate exit macro before the actual return 4967b1019a6SJerry Jelinek * is very ugly and difficult to maintain. 4977b1019a6SJerry Jelinek * 4987b1019a6SJerry Jelinek * One of the FUNCTION_TRACE macros above must be used in conjunction 4997b1019a6SJerry Jelinek * with these macros so that "_AcpiFunctionName" is defined. 5007b1019a6SJerry Jelinek * 5017b1019a6SJerry Jelinek * There are two versions of most of the return macros. The default version is 5027b1019a6SJerry Jelinek * safer, since it avoids side-effects by guaranteeing that the argument will 5037b1019a6SJerry Jelinek * not be evaluated twice. 5047b1019a6SJerry Jelinek * 5057b1019a6SJerry Jelinek * A less-safe version of the macros is provided for optional use if the 5067b1019a6SJerry Jelinek * compiler uses excessive CPU stack (for example, this may happen in the 5077b1019a6SJerry Jelinek * debug case if code optimzation is disabled.) 5087b1019a6SJerry Jelinek */ 5097b1019a6SJerry Jelinek 5107b1019a6SJerry Jelinek /* Exit trace helper macro */ 5117b1019a6SJerry Jelinek 5127b1019a6SJerry Jelinek #ifndef ACPI_SIMPLE_RETURN_MACROS 5137b1019a6SJerry Jelinek 5147b1019a6SJerry Jelinek #define ACPI_TRACE_EXIT(Function, Type, Param) \ 5157b1019a6SJerry Jelinek ACPI_DO_WHILE0 ({ \ 5167b1019a6SJerry Jelinek register Type _Param = (Type) (Param); \ 5177b1019a6SJerry Jelinek Function (ACPI_DEBUG_PARAMETERS, _Param); \ 5187b1019a6SJerry Jelinek return (_Param); \ 5197b1019a6SJerry Jelinek }) 5207b1019a6SJerry Jelinek 5217b1019a6SJerry Jelinek #else /* Use original less-safe macros */ 5227b1019a6SJerry Jelinek 5237b1019a6SJerry Jelinek #define ACPI_TRACE_EXIT(Function, Type, Param) \ 5247b1019a6SJerry Jelinek ACPI_DO_WHILE0 ({ \ 5257b1019a6SJerry Jelinek Function (ACPI_DEBUG_PARAMETERS, (Type) (Param)); \ 5267b1019a6SJerry Jelinek return (Param); \ 5277b1019a6SJerry Jelinek }) 5287b1019a6SJerry Jelinek 5297b1019a6SJerry Jelinek #endif /* ACPI_SIMPLE_RETURN_MACROS */ 5307b1019a6SJerry Jelinek 5317b1019a6SJerry Jelinek /* The actual exit macros */ 5327b1019a6SJerry Jelinek 5337b1019a6SJerry Jelinek #define return_VOID \ 5347b1019a6SJerry Jelinek ACPI_DO_WHILE0 ({ \ 5357b1019a6SJerry Jelinek AcpiUtExit (ACPI_DEBUG_PARAMETERS); \ 5367b1019a6SJerry Jelinek return; \ 5377b1019a6SJerry Jelinek }) 5387b1019a6SJerry Jelinek 5397b1019a6SJerry Jelinek #define return_ACPI_STATUS(Status) \ 5407b1019a6SJerry Jelinek ACPI_TRACE_EXIT (AcpiUtStatusExit, ACPI_STATUS, Status) 5417b1019a6SJerry Jelinek 5427b1019a6SJerry Jelinek #define return_PTR(Pointer) \ 5437b1019a6SJerry Jelinek ACPI_TRACE_EXIT (AcpiUtPtrExit, void *, Pointer) 5447b1019a6SJerry Jelinek 5457b1019a6SJerry Jelinek #define return_STR(String) \ 5467b1019a6SJerry Jelinek ACPI_TRACE_EXIT (AcpiUtStrExit, const char *, String) 5477b1019a6SJerry Jelinek 5487b1019a6SJerry Jelinek #define return_VALUE(Value) \ 5497b1019a6SJerry Jelinek ACPI_TRACE_EXIT (AcpiUtValueExit, UINT64, Value) 5507b1019a6SJerry Jelinek 5517b1019a6SJerry Jelinek #define return_UINT32(Value) \ 5527b1019a6SJerry Jelinek ACPI_TRACE_EXIT (AcpiUtValueExit, UINT32, Value) 5537b1019a6SJerry Jelinek 5547b1019a6SJerry Jelinek #define return_UINT8(Value) \ 5557b1019a6SJerry Jelinek ACPI_TRACE_EXIT (AcpiUtValueExit, UINT8, Value) 5567b1019a6SJerry Jelinek 5577b1019a6SJerry Jelinek /* Conditional execution */ 5587b1019a6SJerry Jelinek 5597b1019a6SJerry Jelinek #define ACPI_DEBUG_EXEC(a) a 5607b1019a6SJerry Jelinek #define ACPI_DEBUG_ONLY_MEMBERS(a) a; 5617b1019a6SJerry Jelinek #define _VERBOSE_STRUCTURES 5627b1019a6SJerry Jelinek 5637b1019a6SJerry Jelinek 5647b1019a6SJerry Jelinek /* Various object display routines for debug */ 5657b1019a6SJerry Jelinek 5667b1019a6SJerry Jelinek #define ACPI_DUMP_STACK_ENTRY(a) AcpiExDumpOperand((a), 0) 5677b1019a6SJerry Jelinek #define ACPI_DUMP_OPERANDS(a, b ,c) AcpiExDumpOperands(a, b, c) 5687b1019a6SJerry Jelinek #define ACPI_DUMP_ENTRY(a, b) AcpiNsDumpEntry (a, b) 5697b1019a6SJerry Jelinek #define ACPI_DUMP_PATHNAME(a, b, c, d) AcpiNsDumpPathname(a, b, c, d) 5707b1019a6SJerry Jelinek #define ACPI_DUMP_BUFFER(a, b) AcpiUtDebugDumpBuffer((UINT8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT) 5717b1019a6SJerry Jelinek 5727b1019a6SJerry Jelinek #define ACPI_TRACE_POINT(a, b, c, d) AcpiTracePoint (a, b, c, d) 5737b1019a6SJerry Jelinek 5747b1019a6SJerry Jelinek #else /* ACPI_DEBUG_OUTPUT */ 575aa2aa9a6SDana Myers /* 576aa2aa9a6SDana Myers * This is the non-debug case -- make everything go away, 577aa2aa9a6SDana Myers * leaving no executable debug code! 578aa2aa9a6SDana Myers */ 579aa2aa9a6SDana Myers #define ACPI_DEBUG_PRINT(pl) 580aa2aa9a6SDana Myers #define ACPI_DEBUG_PRINT_RAW(pl) 5817b1019a6SJerry Jelinek #define ACPI_DEBUG_EXEC(a) 5827b1019a6SJerry Jelinek #define ACPI_DEBUG_ONLY_MEMBERS(a) 5837b1019a6SJerry Jelinek #define ACPI_FUNCTION_NAME(a) 5847b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE(a) 5857b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE_PTR(a, b) 5867b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE_U32(a, b) 5877b1019a6SJerry Jelinek #define ACPI_FUNCTION_TRACE_STR(a, b) 5887b1019a6SJerry Jelinek #define ACPI_FUNCTION_ENTRY() 5897b1019a6SJerry Jelinek #define ACPI_DUMP_STACK_ENTRY(a) 5907b1019a6SJerry Jelinek #define ACPI_DUMP_OPERANDS(a, b, c) 5917b1019a6SJerry Jelinek #define ACPI_DUMP_ENTRY(a, b) 5927b1019a6SJerry Jelinek #define ACPI_DUMP_PATHNAME(a, b, c, d) 5937b1019a6SJerry Jelinek #define ACPI_DUMP_BUFFER(a, b) 5947b1019a6SJerry Jelinek #define ACPI_IS_DEBUG_ENABLED(Level, Component) 0 5957b1019a6SJerry Jelinek #define ACPI_TRACE_POINT(a, b, c, d) 5967b1019a6SJerry Jelinek 5977b1019a6SJerry Jelinek /* Return macros must have a return statement at the minimum */ 5987b1019a6SJerry Jelinek 5997b1019a6SJerry Jelinek #define return_VOID return 6007b1019a6SJerry Jelinek #define return_ACPI_STATUS(s) return(s) 6017b1019a6SJerry Jelinek #define return_PTR(s) return(s) 6027b1019a6SJerry Jelinek #define return_STR(s) return(s) 6037b1019a6SJerry Jelinek #define return_VALUE(s) return(s) 6047b1019a6SJerry Jelinek #define return_UINT8(s) return(s) 6057b1019a6SJerry Jelinek #define return_UINT32(s) return(s) 606aa2aa9a6SDana Myers 607aa2aa9a6SDana Myers #endif /* ACPI_DEBUG_OUTPUT */ 608aa2aa9a6SDana Myers 609aa2aa9a6SDana Myers 6107c478bd9Sstevel@tonic-gate #endif /* __ACOUTPUT_H__ */ 611