xref: /titanic_52/usr/src/cmd/acpi/common/utdebug.c (revision 385cc6b4ad1792caef3f84eb61eed3f27085801f)
1*385cc6b4SJerry Jelinek /******************************************************************************
2*385cc6b4SJerry Jelinek  *
3*385cc6b4SJerry Jelinek  * Module Name: utdebug - Debug print/trace routines
4*385cc6b4SJerry Jelinek  *
5*385cc6b4SJerry Jelinek  *****************************************************************************/
6*385cc6b4SJerry Jelinek 
7*385cc6b4SJerry Jelinek /*
8*385cc6b4SJerry Jelinek  * Copyright (C) 2000 - 2016, Intel Corp.
9*385cc6b4SJerry Jelinek  * All rights reserved.
10*385cc6b4SJerry Jelinek  *
11*385cc6b4SJerry Jelinek  * Redistribution and use in source and binary forms, with or without
12*385cc6b4SJerry Jelinek  * modification, are permitted provided that the following conditions
13*385cc6b4SJerry Jelinek  * are met:
14*385cc6b4SJerry Jelinek  * 1. Redistributions of source code must retain the above copyright
15*385cc6b4SJerry Jelinek  *    notice, this list of conditions, and the following disclaimer,
16*385cc6b4SJerry Jelinek  *    without modification.
17*385cc6b4SJerry Jelinek  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18*385cc6b4SJerry Jelinek  *    substantially similar to the "NO WARRANTY" disclaimer below
19*385cc6b4SJerry Jelinek  *    ("Disclaimer") and any redistribution must be conditioned upon
20*385cc6b4SJerry Jelinek  *    including a substantially similar Disclaimer requirement for further
21*385cc6b4SJerry Jelinek  *    binary redistribution.
22*385cc6b4SJerry Jelinek  * 3. Neither the names of the above-listed copyright holders nor the names
23*385cc6b4SJerry Jelinek  *    of any contributors may be used to endorse or promote products derived
24*385cc6b4SJerry Jelinek  *    from this software without specific prior written permission.
25*385cc6b4SJerry Jelinek  *
26*385cc6b4SJerry Jelinek  * Alternatively, this software may be distributed under the terms of the
27*385cc6b4SJerry Jelinek  * GNU General Public License ("GPL") version 2 as published by the Free
28*385cc6b4SJerry Jelinek  * Software Foundation.
29*385cc6b4SJerry Jelinek  *
30*385cc6b4SJerry Jelinek  * NO WARRANTY
31*385cc6b4SJerry Jelinek  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32*385cc6b4SJerry Jelinek  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33*385cc6b4SJerry Jelinek  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34*385cc6b4SJerry Jelinek  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35*385cc6b4SJerry Jelinek  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36*385cc6b4SJerry Jelinek  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37*385cc6b4SJerry Jelinek  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38*385cc6b4SJerry Jelinek  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39*385cc6b4SJerry Jelinek  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40*385cc6b4SJerry Jelinek  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41*385cc6b4SJerry Jelinek  * POSSIBILITY OF SUCH DAMAGES.
42*385cc6b4SJerry Jelinek  */
43*385cc6b4SJerry Jelinek 
44*385cc6b4SJerry Jelinek #define EXPORT_ACPI_INTERFACES
45*385cc6b4SJerry Jelinek 
46*385cc6b4SJerry Jelinek #include "acpi.h"
47*385cc6b4SJerry Jelinek #include "accommon.h"
48*385cc6b4SJerry Jelinek #include "acinterp.h"
49*385cc6b4SJerry Jelinek 
50*385cc6b4SJerry Jelinek #define _COMPONENT          ACPI_UTILITIES
51*385cc6b4SJerry Jelinek         ACPI_MODULE_NAME    ("utdebug")
52*385cc6b4SJerry Jelinek 
53*385cc6b4SJerry Jelinek 
54*385cc6b4SJerry Jelinek #ifdef ACPI_DEBUG_OUTPUT
55*385cc6b4SJerry Jelinek 
56*385cc6b4SJerry Jelinek static ACPI_THREAD_ID       AcpiGbl_PreviousThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
57*385cc6b4SJerry Jelinek static const char           *AcpiGbl_FunctionEntryPrefix = "----Entry";
58*385cc6b4SJerry Jelinek static const char           *AcpiGbl_FunctionExitPrefix  = "----Exit-";
59*385cc6b4SJerry Jelinek 
60*385cc6b4SJerry Jelinek 
61*385cc6b4SJerry Jelinek /*******************************************************************************
62*385cc6b4SJerry Jelinek  *
63*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtInitStackPtrTrace
64*385cc6b4SJerry Jelinek  *
65*385cc6b4SJerry Jelinek  * PARAMETERS:  None
66*385cc6b4SJerry Jelinek  *
67*385cc6b4SJerry Jelinek  * RETURN:      None
68*385cc6b4SJerry Jelinek  *
69*385cc6b4SJerry Jelinek  * DESCRIPTION: Save the current CPU stack pointer at subsystem startup
70*385cc6b4SJerry Jelinek  *
71*385cc6b4SJerry Jelinek  ******************************************************************************/
72*385cc6b4SJerry Jelinek 
73*385cc6b4SJerry Jelinek void
74*385cc6b4SJerry Jelinek AcpiUtInitStackPtrTrace (
75*385cc6b4SJerry Jelinek     void)
76*385cc6b4SJerry Jelinek {
77*385cc6b4SJerry Jelinek     ACPI_SIZE               CurrentSp;
78*385cc6b4SJerry Jelinek 
79*385cc6b4SJerry Jelinek 
80*385cc6b4SJerry Jelinek     AcpiGbl_EntryStackPointer = &CurrentSp;
81*385cc6b4SJerry Jelinek }
82*385cc6b4SJerry Jelinek 
83*385cc6b4SJerry Jelinek 
84*385cc6b4SJerry Jelinek /*******************************************************************************
85*385cc6b4SJerry Jelinek  *
86*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtTrackStackPtr
87*385cc6b4SJerry Jelinek  *
88*385cc6b4SJerry Jelinek  * PARAMETERS:  None
89*385cc6b4SJerry Jelinek  *
90*385cc6b4SJerry Jelinek  * RETURN:      None
91*385cc6b4SJerry Jelinek  *
92*385cc6b4SJerry Jelinek  * DESCRIPTION: Save the current CPU stack pointer
93*385cc6b4SJerry Jelinek  *
94*385cc6b4SJerry Jelinek  ******************************************************************************/
95*385cc6b4SJerry Jelinek 
96*385cc6b4SJerry Jelinek void
97*385cc6b4SJerry Jelinek AcpiUtTrackStackPtr (
98*385cc6b4SJerry Jelinek     void)
99*385cc6b4SJerry Jelinek {
100*385cc6b4SJerry Jelinek     ACPI_SIZE               CurrentSp;
101*385cc6b4SJerry Jelinek 
102*385cc6b4SJerry Jelinek 
103*385cc6b4SJerry Jelinek     if (&CurrentSp < AcpiGbl_LowestStackPointer)
104*385cc6b4SJerry Jelinek     {
105*385cc6b4SJerry Jelinek         AcpiGbl_LowestStackPointer = &CurrentSp;
106*385cc6b4SJerry Jelinek     }
107*385cc6b4SJerry Jelinek 
108*385cc6b4SJerry Jelinek     if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting)
109*385cc6b4SJerry Jelinek     {
110*385cc6b4SJerry Jelinek         AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel;
111*385cc6b4SJerry Jelinek     }
112*385cc6b4SJerry Jelinek }
113*385cc6b4SJerry Jelinek 
114*385cc6b4SJerry Jelinek 
115*385cc6b4SJerry Jelinek /*******************************************************************************
116*385cc6b4SJerry Jelinek  *
117*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtTrimFunctionName
118*385cc6b4SJerry Jelinek  *
119*385cc6b4SJerry Jelinek  * PARAMETERS:  FunctionName        - Ascii string containing a procedure name
120*385cc6b4SJerry Jelinek  *
121*385cc6b4SJerry Jelinek  * RETURN:      Updated pointer to the function name
122*385cc6b4SJerry Jelinek  *
123*385cc6b4SJerry Jelinek  * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
124*385cc6b4SJerry Jelinek  *              This allows compiler macros such as __FUNCTION__ to be used
125*385cc6b4SJerry Jelinek  *              with no change to the debug output.
126*385cc6b4SJerry Jelinek  *
127*385cc6b4SJerry Jelinek  ******************************************************************************/
128*385cc6b4SJerry Jelinek 
129*385cc6b4SJerry Jelinek static const char *
130*385cc6b4SJerry Jelinek AcpiUtTrimFunctionName (
131*385cc6b4SJerry Jelinek     const char              *FunctionName)
132*385cc6b4SJerry Jelinek {
133*385cc6b4SJerry Jelinek 
134*385cc6b4SJerry Jelinek     /* All Function names are longer than 4 chars, check is safe */
135*385cc6b4SJerry Jelinek 
136*385cc6b4SJerry Jelinek     if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_MIXED)
137*385cc6b4SJerry Jelinek     {
138*385cc6b4SJerry Jelinek         /* This is the case where the original source has not been modified */
139*385cc6b4SJerry Jelinek 
140*385cc6b4SJerry Jelinek         return (FunctionName + 4);
141*385cc6b4SJerry Jelinek     }
142*385cc6b4SJerry Jelinek 
143*385cc6b4SJerry Jelinek     if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_LOWER)
144*385cc6b4SJerry Jelinek     {
145*385cc6b4SJerry Jelinek         /* This is the case where the source has been 'linuxized' */
146*385cc6b4SJerry Jelinek 
147*385cc6b4SJerry Jelinek         return (FunctionName + 5);
148*385cc6b4SJerry Jelinek     }
149*385cc6b4SJerry Jelinek 
150*385cc6b4SJerry Jelinek     return (FunctionName);
151*385cc6b4SJerry Jelinek }
152*385cc6b4SJerry Jelinek 
153*385cc6b4SJerry Jelinek 
154*385cc6b4SJerry Jelinek /*******************************************************************************
155*385cc6b4SJerry Jelinek  *
156*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiDebugPrint
157*385cc6b4SJerry Jelinek  *
158*385cc6b4SJerry Jelinek  * PARAMETERS:  RequestedDebugLevel - Requested debug print level
159*385cc6b4SJerry Jelinek  *              LineNumber          - Caller's line number (for error output)
160*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
161*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
162*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
163*385cc6b4SJerry Jelinek  *              Format              - Printf format field
164*385cc6b4SJerry Jelinek  *              ...                 - Optional printf arguments
165*385cc6b4SJerry Jelinek  *
166*385cc6b4SJerry Jelinek  * RETURN:      None
167*385cc6b4SJerry Jelinek  *
168*385cc6b4SJerry Jelinek  * DESCRIPTION: Print error message with prefix consisting of the module name,
169*385cc6b4SJerry Jelinek  *              line number, and component ID.
170*385cc6b4SJerry Jelinek  *
171*385cc6b4SJerry Jelinek  ******************************************************************************/
172*385cc6b4SJerry Jelinek 
173*385cc6b4SJerry Jelinek void  ACPI_INTERNAL_VAR_XFACE
174*385cc6b4SJerry Jelinek AcpiDebugPrint (
175*385cc6b4SJerry Jelinek     UINT32                  RequestedDebugLevel,
176*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
177*385cc6b4SJerry Jelinek     const char              *FunctionName,
178*385cc6b4SJerry Jelinek     const char              *ModuleName,
179*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
180*385cc6b4SJerry Jelinek     const char              *Format,
181*385cc6b4SJerry Jelinek     ...)
182*385cc6b4SJerry Jelinek {
183*385cc6b4SJerry Jelinek     ACPI_THREAD_ID          ThreadId;
184*385cc6b4SJerry Jelinek     va_list                 args;
185*385cc6b4SJerry Jelinek 
186*385cc6b4SJerry Jelinek 
187*385cc6b4SJerry Jelinek     /* Check if debug output enabled */
188*385cc6b4SJerry Jelinek 
189*385cc6b4SJerry Jelinek     if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId))
190*385cc6b4SJerry Jelinek     {
191*385cc6b4SJerry Jelinek         return;
192*385cc6b4SJerry Jelinek     }
193*385cc6b4SJerry Jelinek 
194*385cc6b4SJerry Jelinek     /*
195*385cc6b4SJerry Jelinek      * Thread tracking and context switch notification
196*385cc6b4SJerry Jelinek      */
197*385cc6b4SJerry Jelinek     ThreadId = AcpiOsGetThreadId ();
198*385cc6b4SJerry Jelinek     if (ThreadId != AcpiGbl_PreviousThreadId)
199*385cc6b4SJerry Jelinek     {
200*385cc6b4SJerry Jelinek         if (ACPI_LV_THREADS & AcpiDbgLevel)
201*385cc6b4SJerry Jelinek         {
202*385cc6b4SJerry Jelinek             AcpiOsPrintf (
203*385cc6b4SJerry Jelinek                 "\n**** Context Switch from TID %u to TID %u ****\n\n",
204*385cc6b4SJerry Jelinek                 (UINT32) AcpiGbl_PreviousThreadId, (UINT32) ThreadId);
205*385cc6b4SJerry Jelinek         }
206*385cc6b4SJerry Jelinek 
207*385cc6b4SJerry Jelinek         AcpiGbl_PreviousThreadId = ThreadId;
208*385cc6b4SJerry Jelinek         AcpiGbl_NestingLevel = 0;
209*385cc6b4SJerry Jelinek     }
210*385cc6b4SJerry Jelinek 
211*385cc6b4SJerry Jelinek     /*
212*385cc6b4SJerry Jelinek      * Display the module name, current line number, thread ID (if requested),
213*385cc6b4SJerry Jelinek      * current procedure nesting level, and the current procedure name
214*385cc6b4SJerry Jelinek      */
215*385cc6b4SJerry Jelinek     AcpiOsPrintf ("%9s-%04ld ", ModuleName, LineNumber);
216*385cc6b4SJerry Jelinek 
217*385cc6b4SJerry Jelinek #ifdef ACPI_APPLICATION
218*385cc6b4SJerry Jelinek     /*
219*385cc6b4SJerry Jelinek      * For AcpiExec/iASL only, emit the thread ID and nesting level.
220*385cc6b4SJerry Jelinek      * Note: nesting level is really only useful during a single-thread
221*385cc6b4SJerry Jelinek      * execution. Otherwise, multiple threads will keep resetting the
222*385cc6b4SJerry Jelinek      * level.
223*385cc6b4SJerry Jelinek      */
224*385cc6b4SJerry Jelinek     if (ACPI_LV_THREADS & AcpiDbgLevel)
225*385cc6b4SJerry Jelinek     {
226*385cc6b4SJerry Jelinek         AcpiOsPrintf ("[%u] ", (UINT32) ThreadId);
227*385cc6b4SJerry Jelinek     }
228*385cc6b4SJerry Jelinek 
229*385cc6b4SJerry Jelinek     AcpiOsPrintf ("[%02ld] ", AcpiGbl_NestingLevel);
230*385cc6b4SJerry Jelinek #endif
231*385cc6b4SJerry Jelinek 
232*385cc6b4SJerry Jelinek     AcpiOsPrintf ("%-22.22s: ", AcpiUtTrimFunctionName (FunctionName));
233*385cc6b4SJerry Jelinek 
234*385cc6b4SJerry Jelinek     va_start (args, Format);
235*385cc6b4SJerry Jelinek     AcpiOsVprintf (Format, args);
236*385cc6b4SJerry Jelinek     va_end (args);
237*385cc6b4SJerry Jelinek }
238*385cc6b4SJerry Jelinek 
239*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiDebugPrint)
240*385cc6b4SJerry Jelinek 
241*385cc6b4SJerry Jelinek 
242*385cc6b4SJerry Jelinek /*******************************************************************************
243*385cc6b4SJerry Jelinek  *
244*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiDebugPrintRaw
245*385cc6b4SJerry Jelinek  *
246*385cc6b4SJerry Jelinek  * PARAMETERS:  RequestedDebugLevel - Requested debug print level
247*385cc6b4SJerry Jelinek  *              LineNumber          - Caller's line number
248*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
249*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
250*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
251*385cc6b4SJerry Jelinek  *              Format              - Printf format field
252*385cc6b4SJerry Jelinek  *              ...                 - Optional printf arguments
253*385cc6b4SJerry Jelinek  *
254*385cc6b4SJerry Jelinek  * RETURN:      None
255*385cc6b4SJerry Jelinek  *
256*385cc6b4SJerry Jelinek  * DESCRIPTION: Print message with no headers. Has same interface as
257*385cc6b4SJerry Jelinek  *              DebugPrint so that the same macros can be used.
258*385cc6b4SJerry Jelinek  *
259*385cc6b4SJerry Jelinek  ******************************************************************************/
260*385cc6b4SJerry Jelinek 
261*385cc6b4SJerry Jelinek void  ACPI_INTERNAL_VAR_XFACE
262*385cc6b4SJerry Jelinek AcpiDebugPrintRaw (
263*385cc6b4SJerry Jelinek     UINT32                  RequestedDebugLevel,
264*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
265*385cc6b4SJerry Jelinek     const char              *FunctionName,
266*385cc6b4SJerry Jelinek     const char              *ModuleName,
267*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
268*385cc6b4SJerry Jelinek     const char              *Format,
269*385cc6b4SJerry Jelinek     ...)
270*385cc6b4SJerry Jelinek {
271*385cc6b4SJerry Jelinek     va_list                 args;
272*385cc6b4SJerry Jelinek 
273*385cc6b4SJerry Jelinek 
274*385cc6b4SJerry Jelinek     /* Check if debug output enabled */
275*385cc6b4SJerry Jelinek 
276*385cc6b4SJerry Jelinek     if (!ACPI_IS_DEBUG_ENABLED (RequestedDebugLevel, ComponentId))
277*385cc6b4SJerry Jelinek     {
278*385cc6b4SJerry Jelinek         return;
279*385cc6b4SJerry Jelinek     }
280*385cc6b4SJerry Jelinek 
281*385cc6b4SJerry Jelinek     va_start (args, Format);
282*385cc6b4SJerry Jelinek     AcpiOsVprintf (Format, args);
283*385cc6b4SJerry Jelinek     va_end (args);
284*385cc6b4SJerry Jelinek }
285*385cc6b4SJerry Jelinek 
286*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiDebugPrintRaw)
287*385cc6b4SJerry Jelinek 
288*385cc6b4SJerry Jelinek 
289*385cc6b4SJerry Jelinek /*******************************************************************************
290*385cc6b4SJerry Jelinek  *
291*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtTrace
292*385cc6b4SJerry Jelinek  *
293*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
294*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
295*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
296*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
297*385cc6b4SJerry Jelinek  *
298*385cc6b4SJerry Jelinek  * RETURN:      None
299*385cc6b4SJerry Jelinek  *
300*385cc6b4SJerry Jelinek  * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
301*385cc6b4SJerry Jelinek  *              set in DebugLevel
302*385cc6b4SJerry Jelinek  *
303*385cc6b4SJerry Jelinek  ******************************************************************************/
304*385cc6b4SJerry Jelinek 
305*385cc6b4SJerry Jelinek void
306*385cc6b4SJerry Jelinek AcpiUtTrace (
307*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
308*385cc6b4SJerry Jelinek     const char              *FunctionName,
309*385cc6b4SJerry Jelinek     const char              *ModuleName,
310*385cc6b4SJerry Jelinek     UINT32                  ComponentId)
311*385cc6b4SJerry Jelinek {
312*385cc6b4SJerry Jelinek 
313*385cc6b4SJerry Jelinek     AcpiGbl_NestingLevel++;
314*385cc6b4SJerry Jelinek     AcpiUtTrackStackPtr ();
315*385cc6b4SJerry Jelinek 
316*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
317*385cc6b4SJerry Jelinek 
318*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
319*385cc6b4SJerry Jelinek     {
320*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
321*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
322*385cc6b4SJerry Jelinek             "%s\n", AcpiGbl_FunctionEntryPrefix);
323*385cc6b4SJerry Jelinek     }
324*385cc6b4SJerry Jelinek }
325*385cc6b4SJerry Jelinek 
326*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiUtTrace)
327*385cc6b4SJerry Jelinek 
328*385cc6b4SJerry Jelinek 
329*385cc6b4SJerry Jelinek /*******************************************************************************
330*385cc6b4SJerry Jelinek  *
331*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtTracePtr
332*385cc6b4SJerry Jelinek  *
333*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
334*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
335*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
336*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
337*385cc6b4SJerry Jelinek  *              Pointer             - Pointer to display
338*385cc6b4SJerry Jelinek  *
339*385cc6b4SJerry Jelinek  * RETURN:      None
340*385cc6b4SJerry Jelinek  *
341*385cc6b4SJerry Jelinek  * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
342*385cc6b4SJerry Jelinek  *              set in DebugLevel
343*385cc6b4SJerry Jelinek  *
344*385cc6b4SJerry Jelinek  ******************************************************************************/
345*385cc6b4SJerry Jelinek 
346*385cc6b4SJerry Jelinek void
347*385cc6b4SJerry Jelinek AcpiUtTracePtr (
348*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
349*385cc6b4SJerry Jelinek     const char              *FunctionName,
350*385cc6b4SJerry Jelinek     const char              *ModuleName,
351*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
352*385cc6b4SJerry Jelinek     const void              *Pointer)
353*385cc6b4SJerry Jelinek {
354*385cc6b4SJerry Jelinek 
355*385cc6b4SJerry Jelinek     AcpiGbl_NestingLevel++;
356*385cc6b4SJerry Jelinek     AcpiUtTrackStackPtr ();
357*385cc6b4SJerry Jelinek 
358*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
359*385cc6b4SJerry Jelinek 
360*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
361*385cc6b4SJerry Jelinek     {
362*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
363*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
364*385cc6b4SJerry Jelinek             "%s %p\n", AcpiGbl_FunctionEntryPrefix, Pointer);
365*385cc6b4SJerry Jelinek     }
366*385cc6b4SJerry Jelinek }
367*385cc6b4SJerry Jelinek 
368*385cc6b4SJerry Jelinek 
369*385cc6b4SJerry Jelinek /*******************************************************************************
370*385cc6b4SJerry Jelinek  *
371*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtTraceStr
372*385cc6b4SJerry Jelinek  *
373*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
374*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
375*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
376*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
377*385cc6b4SJerry Jelinek  *              String              - Additional string to display
378*385cc6b4SJerry Jelinek  *
379*385cc6b4SJerry Jelinek  * RETURN:      None
380*385cc6b4SJerry Jelinek  *
381*385cc6b4SJerry Jelinek  * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
382*385cc6b4SJerry Jelinek  *              set in DebugLevel
383*385cc6b4SJerry Jelinek  *
384*385cc6b4SJerry Jelinek  ******************************************************************************/
385*385cc6b4SJerry Jelinek 
386*385cc6b4SJerry Jelinek void
387*385cc6b4SJerry Jelinek AcpiUtTraceStr (
388*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
389*385cc6b4SJerry Jelinek     const char              *FunctionName,
390*385cc6b4SJerry Jelinek     const char              *ModuleName,
391*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
392*385cc6b4SJerry Jelinek     const char              *String)
393*385cc6b4SJerry Jelinek {
394*385cc6b4SJerry Jelinek 
395*385cc6b4SJerry Jelinek     AcpiGbl_NestingLevel++;
396*385cc6b4SJerry Jelinek     AcpiUtTrackStackPtr ();
397*385cc6b4SJerry Jelinek 
398*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
399*385cc6b4SJerry Jelinek 
400*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
401*385cc6b4SJerry Jelinek     {
402*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
403*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
404*385cc6b4SJerry Jelinek             "%s %s\n", AcpiGbl_FunctionEntryPrefix, String);
405*385cc6b4SJerry Jelinek     }
406*385cc6b4SJerry Jelinek }
407*385cc6b4SJerry Jelinek 
408*385cc6b4SJerry Jelinek 
409*385cc6b4SJerry Jelinek /*******************************************************************************
410*385cc6b4SJerry Jelinek  *
411*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtTraceU32
412*385cc6b4SJerry Jelinek  *
413*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
414*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
415*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
416*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
417*385cc6b4SJerry Jelinek  *              Integer             - Integer to display
418*385cc6b4SJerry Jelinek  *
419*385cc6b4SJerry Jelinek  * RETURN:      None
420*385cc6b4SJerry Jelinek  *
421*385cc6b4SJerry Jelinek  * DESCRIPTION: Function entry trace. Prints only if TRACE_FUNCTIONS bit is
422*385cc6b4SJerry Jelinek  *              set in DebugLevel
423*385cc6b4SJerry Jelinek  *
424*385cc6b4SJerry Jelinek  ******************************************************************************/
425*385cc6b4SJerry Jelinek 
426*385cc6b4SJerry Jelinek void
427*385cc6b4SJerry Jelinek AcpiUtTraceU32 (
428*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
429*385cc6b4SJerry Jelinek     const char              *FunctionName,
430*385cc6b4SJerry Jelinek     const char              *ModuleName,
431*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
432*385cc6b4SJerry Jelinek     UINT32                  Integer)
433*385cc6b4SJerry Jelinek {
434*385cc6b4SJerry Jelinek 
435*385cc6b4SJerry Jelinek     AcpiGbl_NestingLevel++;
436*385cc6b4SJerry Jelinek     AcpiUtTrackStackPtr ();
437*385cc6b4SJerry Jelinek 
438*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
439*385cc6b4SJerry Jelinek 
440*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
441*385cc6b4SJerry Jelinek     {
442*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
443*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
444*385cc6b4SJerry Jelinek             "%s %08X\n", AcpiGbl_FunctionEntryPrefix, Integer);
445*385cc6b4SJerry Jelinek     }
446*385cc6b4SJerry Jelinek }
447*385cc6b4SJerry Jelinek 
448*385cc6b4SJerry Jelinek 
449*385cc6b4SJerry Jelinek /*******************************************************************************
450*385cc6b4SJerry Jelinek  *
451*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtExit
452*385cc6b4SJerry Jelinek  *
453*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
454*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
455*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
456*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
457*385cc6b4SJerry Jelinek  *
458*385cc6b4SJerry Jelinek  * RETURN:      None
459*385cc6b4SJerry Jelinek  *
460*385cc6b4SJerry Jelinek  * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
461*385cc6b4SJerry Jelinek  *              set in DebugLevel
462*385cc6b4SJerry Jelinek  *
463*385cc6b4SJerry Jelinek  ******************************************************************************/
464*385cc6b4SJerry Jelinek 
465*385cc6b4SJerry Jelinek void
466*385cc6b4SJerry Jelinek AcpiUtExit (
467*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
468*385cc6b4SJerry Jelinek     const char              *FunctionName,
469*385cc6b4SJerry Jelinek     const char              *ModuleName,
470*385cc6b4SJerry Jelinek     UINT32                  ComponentId)
471*385cc6b4SJerry Jelinek {
472*385cc6b4SJerry Jelinek 
473*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
474*385cc6b4SJerry Jelinek 
475*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
476*385cc6b4SJerry Jelinek     {
477*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
478*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
479*385cc6b4SJerry Jelinek             "%s\n", AcpiGbl_FunctionExitPrefix);
480*385cc6b4SJerry Jelinek     }
481*385cc6b4SJerry Jelinek 
482*385cc6b4SJerry Jelinek     if (AcpiGbl_NestingLevel)
483*385cc6b4SJerry Jelinek     {
484*385cc6b4SJerry Jelinek         AcpiGbl_NestingLevel--;
485*385cc6b4SJerry Jelinek     }
486*385cc6b4SJerry Jelinek }
487*385cc6b4SJerry Jelinek 
488*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiUtExit)
489*385cc6b4SJerry Jelinek 
490*385cc6b4SJerry Jelinek 
491*385cc6b4SJerry Jelinek /*******************************************************************************
492*385cc6b4SJerry Jelinek  *
493*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtStatusExit
494*385cc6b4SJerry Jelinek  *
495*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
496*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
497*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
498*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
499*385cc6b4SJerry Jelinek  *              Status              - Exit status code
500*385cc6b4SJerry Jelinek  *
501*385cc6b4SJerry Jelinek  * RETURN:      None
502*385cc6b4SJerry Jelinek  *
503*385cc6b4SJerry Jelinek  * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
504*385cc6b4SJerry Jelinek  *              set in DebugLevel. Prints exit status also.
505*385cc6b4SJerry Jelinek  *
506*385cc6b4SJerry Jelinek  ******************************************************************************/
507*385cc6b4SJerry Jelinek 
508*385cc6b4SJerry Jelinek void
509*385cc6b4SJerry Jelinek AcpiUtStatusExit (
510*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
511*385cc6b4SJerry Jelinek     const char              *FunctionName,
512*385cc6b4SJerry Jelinek     const char              *ModuleName,
513*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
514*385cc6b4SJerry Jelinek     ACPI_STATUS             Status)
515*385cc6b4SJerry Jelinek {
516*385cc6b4SJerry Jelinek 
517*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
518*385cc6b4SJerry Jelinek 
519*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
520*385cc6b4SJerry Jelinek     {
521*385cc6b4SJerry Jelinek         if (ACPI_SUCCESS (Status))
522*385cc6b4SJerry Jelinek         {
523*385cc6b4SJerry Jelinek             AcpiDebugPrint (ACPI_LV_FUNCTIONS,
524*385cc6b4SJerry Jelinek                 LineNumber, FunctionName, ModuleName, ComponentId,
525*385cc6b4SJerry Jelinek                 "%s %s\n", AcpiGbl_FunctionExitPrefix,
526*385cc6b4SJerry Jelinek                 AcpiFormatException (Status));
527*385cc6b4SJerry Jelinek         }
528*385cc6b4SJerry Jelinek         else
529*385cc6b4SJerry Jelinek         {
530*385cc6b4SJerry Jelinek             AcpiDebugPrint (ACPI_LV_FUNCTIONS,
531*385cc6b4SJerry Jelinek                 LineNumber, FunctionName, ModuleName, ComponentId,
532*385cc6b4SJerry Jelinek                 "%s ****Exception****: %s\n", AcpiGbl_FunctionExitPrefix,
533*385cc6b4SJerry Jelinek                 AcpiFormatException (Status));
534*385cc6b4SJerry Jelinek         }
535*385cc6b4SJerry Jelinek     }
536*385cc6b4SJerry Jelinek 
537*385cc6b4SJerry Jelinek     if (AcpiGbl_NestingLevel)
538*385cc6b4SJerry Jelinek     {
539*385cc6b4SJerry Jelinek         AcpiGbl_NestingLevel--;
540*385cc6b4SJerry Jelinek     }
541*385cc6b4SJerry Jelinek }
542*385cc6b4SJerry Jelinek 
543*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiUtStatusExit)
544*385cc6b4SJerry Jelinek 
545*385cc6b4SJerry Jelinek 
546*385cc6b4SJerry Jelinek /*******************************************************************************
547*385cc6b4SJerry Jelinek  *
548*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtValueExit
549*385cc6b4SJerry Jelinek  *
550*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
551*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
552*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
553*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
554*385cc6b4SJerry Jelinek  *              Value               - Value to be printed with exit msg
555*385cc6b4SJerry Jelinek  *
556*385cc6b4SJerry Jelinek  * RETURN:      None
557*385cc6b4SJerry Jelinek  *
558*385cc6b4SJerry Jelinek  * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
559*385cc6b4SJerry Jelinek  *              set in DebugLevel. Prints exit value also.
560*385cc6b4SJerry Jelinek  *
561*385cc6b4SJerry Jelinek  ******************************************************************************/
562*385cc6b4SJerry Jelinek 
563*385cc6b4SJerry Jelinek void
564*385cc6b4SJerry Jelinek AcpiUtValueExit (
565*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
566*385cc6b4SJerry Jelinek     const char              *FunctionName,
567*385cc6b4SJerry Jelinek     const char              *ModuleName,
568*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
569*385cc6b4SJerry Jelinek     UINT64                  Value)
570*385cc6b4SJerry Jelinek {
571*385cc6b4SJerry Jelinek 
572*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
573*385cc6b4SJerry Jelinek 
574*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
575*385cc6b4SJerry Jelinek     {
576*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
577*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
578*385cc6b4SJerry Jelinek             "%s %8.8X%8.8X\n", AcpiGbl_FunctionExitPrefix,
579*385cc6b4SJerry Jelinek             ACPI_FORMAT_UINT64 (Value));
580*385cc6b4SJerry Jelinek     }
581*385cc6b4SJerry Jelinek 
582*385cc6b4SJerry Jelinek     if (AcpiGbl_NestingLevel)
583*385cc6b4SJerry Jelinek     {
584*385cc6b4SJerry Jelinek         AcpiGbl_NestingLevel--;
585*385cc6b4SJerry Jelinek     }
586*385cc6b4SJerry Jelinek }
587*385cc6b4SJerry Jelinek 
588*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiUtValueExit)
589*385cc6b4SJerry Jelinek 
590*385cc6b4SJerry Jelinek 
591*385cc6b4SJerry Jelinek /*******************************************************************************
592*385cc6b4SJerry Jelinek  *
593*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtPtrExit
594*385cc6b4SJerry Jelinek  *
595*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
596*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
597*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
598*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
599*385cc6b4SJerry Jelinek  *              Ptr                 - Pointer to display
600*385cc6b4SJerry Jelinek  *
601*385cc6b4SJerry Jelinek  * RETURN:      None
602*385cc6b4SJerry Jelinek  *
603*385cc6b4SJerry Jelinek  * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
604*385cc6b4SJerry Jelinek  *              set in DebugLevel. Prints exit value also.
605*385cc6b4SJerry Jelinek  *
606*385cc6b4SJerry Jelinek  ******************************************************************************/
607*385cc6b4SJerry Jelinek 
608*385cc6b4SJerry Jelinek void
609*385cc6b4SJerry Jelinek AcpiUtPtrExit (
610*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
611*385cc6b4SJerry Jelinek     const char              *FunctionName,
612*385cc6b4SJerry Jelinek     const char              *ModuleName,
613*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
614*385cc6b4SJerry Jelinek     UINT8                   *Ptr)
615*385cc6b4SJerry Jelinek {
616*385cc6b4SJerry Jelinek 
617*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
618*385cc6b4SJerry Jelinek 
619*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
620*385cc6b4SJerry Jelinek     {
621*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
622*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
623*385cc6b4SJerry Jelinek             "%s %p\n", AcpiGbl_FunctionExitPrefix, Ptr);
624*385cc6b4SJerry Jelinek     }
625*385cc6b4SJerry Jelinek 
626*385cc6b4SJerry Jelinek     if (AcpiGbl_NestingLevel)
627*385cc6b4SJerry Jelinek     {
628*385cc6b4SJerry Jelinek         AcpiGbl_NestingLevel--;
629*385cc6b4SJerry Jelinek     }
630*385cc6b4SJerry Jelinek }
631*385cc6b4SJerry Jelinek 
632*385cc6b4SJerry Jelinek 
633*385cc6b4SJerry Jelinek /*******************************************************************************
634*385cc6b4SJerry Jelinek  *
635*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiUtStrExit
636*385cc6b4SJerry Jelinek  *
637*385cc6b4SJerry Jelinek  * PARAMETERS:  LineNumber          - Caller's line number
638*385cc6b4SJerry Jelinek  *              FunctionName        - Caller's procedure name
639*385cc6b4SJerry Jelinek  *              ModuleName          - Caller's module name
640*385cc6b4SJerry Jelinek  *              ComponentId         - Caller's component ID
641*385cc6b4SJerry Jelinek  *              String              - String to display
642*385cc6b4SJerry Jelinek  *
643*385cc6b4SJerry Jelinek  * RETURN:      None
644*385cc6b4SJerry Jelinek  *
645*385cc6b4SJerry Jelinek  * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
646*385cc6b4SJerry Jelinek  *              set in DebugLevel. Prints exit value also.
647*385cc6b4SJerry Jelinek  *
648*385cc6b4SJerry Jelinek  ******************************************************************************/
649*385cc6b4SJerry Jelinek 
650*385cc6b4SJerry Jelinek void
651*385cc6b4SJerry Jelinek AcpiUtStrExit (
652*385cc6b4SJerry Jelinek     UINT32                  LineNumber,
653*385cc6b4SJerry Jelinek     const char              *FunctionName,
654*385cc6b4SJerry Jelinek     const char              *ModuleName,
655*385cc6b4SJerry Jelinek     UINT32                  ComponentId,
656*385cc6b4SJerry Jelinek     const char              *String)
657*385cc6b4SJerry Jelinek {
658*385cc6b4SJerry Jelinek 
659*385cc6b4SJerry Jelinek     /* Check if enabled up-front for performance */
660*385cc6b4SJerry Jelinek 
661*385cc6b4SJerry Jelinek     if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
662*385cc6b4SJerry Jelinek     {
663*385cc6b4SJerry Jelinek         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
664*385cc6b4SJerry Jelinek             LineNumber, FunctionName, ModuleName, ComponentId,
665*385cc6b4SJerry Jelinek             "%s %s\n", AcpiGbl_FunctionExitPrefix, String);
666*385cc6b4SJerry Jelinek     }
667*385cc6b4SJerry Jelinek 
668*385cc6b4SJerry Jelinek     if (AcpiGbl_NestingLevel)
669*385cc6b4SJerry Jelinek     {
670*385cc6b4SJerry Jelinek         AcpiGbl_NestingLevel--;
671*385cc6b4SJerry Jelinek     }
672*385cc6b4SJerry Jelinek }
673*385cc6b4SJerry Jelinek 
674*385cc6b4SJerry Jelinek 
675*385cc6b4SJerry Jelinek /*******************************************************************************
676*385cc6b4SJerry Jelinek  *
677*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiTracePoint
678*385cc6b4SJerry Jelinek  *
679*385cc6b4SJerry Jelinek  * PARAMETERS:  Type                - Trace event type
680*385cc6b4SJerry Jelinek  *              Begin               - TRUE if before execution
681*385cc6b4SJerry Jelinek  *              Aml                 - Executed AML address
682*385cc6b4SJerry Jelinek  *              Pathname            - Object path
683*385cc6b4SJerry Jelinek  *              Pointer             - Pointer to the related object
684*385cc6b4SJerry Jelinek  *
685*385cc6b4SJerry Jelinek  * RETURN:      None
686*385cc6b4SJerry Jelinek  *
687*385cc6b4SJerry Jelinek  * DESCRIPTION: Interpreter execution trace.
688*385cc6b4SJerry Jelinek  *
689*385cc6b4SJerry Jelinek  ******************************************************************************/
690*385cc6b4SJerry Jelinek 
691*385cc6b4SJerry Jelinek void
692*385cc6b4SJerry Jelinek AcpiTracePoint (
693*385cc6b4SJerry Jelinek     ACPI_TRACE_EVENT_TYPE   Type,
694*385cc6b4SJerry Jelinek     BOOLEAN                 Begin,
695*385cc6b4SJerry Jelinek     UINT8                   *Aml,
696*385cc6b4SJerry Jelinek     char                    *Pathname)
697*385cc6b4SJerry Jelinek {
698*385cc6b4SJerry Jelinek 
699*385cc6b4SJerry Jelinek     ACPI_FUNCTION_ENTRY ();
700*385cc6b4SJerry Jelinek 
701*385cc6b4SJerry Jelinek     AcpiExTracePoint (Type, Begin, Aml, Pathname);
702*385cc6b4SJerry Jelinek 
703*385cc6b4SJerry Jelinek #ifdef ACPI_USE_SYSTEM_TRACER
704*385cc6b4SJerry Jelinek     AcpiOsTracePoint (Type, Begin, Aml, Pathname);
705*385cc6b4SJerry Jelinek #endif
706*385cc6b4SJerry Jelinek }
707*385cc6b4SJerry Jelinek 
708*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiTracePoint)
709*385cc6b4SJerry Jelinek 
710*385cc6b4SJerry Jelinek #endif
711*385cc6b4SJerry Jelinek 
712*385cc6b4SJerry Jelinek 
713*385cc6b4SJerry Jelinek #ifdef ACPI_APPLICATION
714*385cc6b4SJerry Jelinek /*******************************************************************************
715*385cc6b4SJerry Jelinek  *
716*385cc6b4SJerry Jelinek  * FUNCTION:    AcpiLogError
717*385cc6b4SJerry Jelinek  *
718*385cc6b4SJerry Jelinek  * PARAMETERS:  Format              - Printf format field
719*385cc6b4SJerry Jelinek  *              ...                 - Optional printf arguments
720*385cc6b4SJerry Jelinek  *
721*385cc6b4SJerry Jelinek  * RETURN:      None
722*385cc6b4SJerry Jelinek  *
723*385cc6b4SJerry Jelinek  * DESCRIPTION: Print error message to the console, used by applications.
724*385cc6b4SJerry Jelinek  *
725*385cc6b4SJerry Jelinek  ******************************************************************************/
726*385cc6b4SJerry Jelinek 
727*385cc6b4SJerry Jelinek void  ACPI_INTERNAL_VAR_XFACE
728*385cc6b4SJerry Jelinek AcpiLogError (
729*385cc6b4SJerry Jelinek     const char              *Format,
730*385cc6b4SJerry Jelinek     ...)
731*385cc6b4SJerry Jelinek {
732*385cc6b4SJerry Jelinek     va_list                 Args;
733*385cc6b4SJerry Jelinek 
734*385cc6b4SJerry Jelinek     va_start (Args, Format);
735*385cc6b4SJerry Jelinek     (void) AcpiUtFileVprintf (ACPI_FILE_ERR, Format, Args);
736*385cc6b4SJerry Jelinek     va_end (Args);
737*385cc6b4SJerry Jelinek }
738*385cc6b4SJerry Jelinek 
739*385cc6b4SJerry Jelinek ACPI_EXPORT_SYMBOL (AcpiLogError)
740*385cc6b4SJerry Jelinek #endif
741