1ae115bc7Smrj /*******************************************************************************
2ae115bc7Smrj *
3ae115bc7Smrj * Module Name: utmisc - common utility procedures
4ae115bc7Smrj *
5ae115bc7Smrj ******************************************************************************/
6ae115bc7Smrj
726f3cdf0SGordon Ross /*
8*cb565728SJerry Jelinek * Copyright (C) 2000 - 2016, Intel Corp.
9ae115bc7Smrj * All rights reserved.
10ae115bc7Smrj *
1126f3cdf0SGordon Ross * Redistribution and use in source and binary forms, with or without
1226f3cdf0SGordon Ross * modification, are permitted provided that the following conditions
1326f3cdf0SGordon Ross * are met:
1426f3cdf0SGordon Ross * 1. Redistributions of source code must retain the above copyright
1526f3cdf0SGordon Ross * notice, this list of conditions, and the following disclaimer,
1626f3cdf0SGordon Ross * without modification.
1726f3cdf0SGordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1826f3cdf0SGordon Ross * substantially similar to the "NO WARRANTY" disclaimer below
1926f3cdf0SGordon Ross * ("Disclaimer") and any redistribution must be conditioned upon
2026f3cdf0SGordon Ross * including a substantially similar Disclaimer requirement for further
2126f3cdf0SGordon Ross * binary redistribution.
2226f3cdf0SGordon Ross * 3. Neither the names of the above-listed copyright holders nor the names
2326f3cdf0SGordon Ross * of any contributors may be used to endorse or promote products derived
2426f3cdf0SGordon Ross * from this software without specific prior written permission.
25ae115bc7Smrj *
2626f3cdf0SGordon Ross * Alternatively, this software may be distributed under the terms of the
2726f3cdf0SGordon Ross * GNU General Public License ("GPL") version 2 as published by the Free
2826f3cdf0SGordon Ross * Software Foundation.
29ae115bc7Smrj *
3026f3cdf0SGordon Ross * NO WARRANTY
3126f3cdf0SGordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3226f3cdf0SGordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3326f3cdf0SGordon Ross * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
3426f3cdf0SGordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3526f3cdf0SGordon Ross * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3626f3cdf0SGordon Ross * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3726f3cdf0SGordon Ross * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3826f3cdf0SGordon Ross * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3926f3cdf0SGordon Ross * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
4026f3cdf0SGordon Ross * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4126f3cdf0SGordon Ross * POSSIBILITY OF SUCH DAMAGES.
4226f3cdf0SGordon Ross */
43ae115bc7Smrj
44ae115bc7Smrj #include "acpi.h"
45aa2aa9a6SDana Myers #include "accommon.h"
46ae115bc7Smrj #include "acnamesp.h"
47ae115bc7Smrj
48ae115bc7Smrj
49ae115bc7Smrj #define _COMPONENT ACPI_UTILITIES
50ae115bc7Smrj ACPI_MODULE_NAME ("utmisc")
51ae115bc7Smrj
52ae115bc7Smrj
53ae115bc7Smrj /*******************************************************************************
54ae115bc7Smrj *
5557190917SDana Myers * FUNCTION: AcpiUtIsPciRootBridge
5657190917SDana Myers *
5757190917SDana Myers * PARAMETERS: Id - The HID/CID in string format
5857190917SDana Myers *
5957190917SDana Myers * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge
6057190917SDana Myers *
6157190917SDana Myers * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID.
6257190917SDana Myers *
6357190917SDana Myers ******************************************************************************/
6457190917SDana Myers
6557190917SDana Myers BOOLEAN
AcpiUtIsPciRootBridge(char * Id)6657190917SDana Myers AcpiUtIsPciRootBridge (
6757190917SDana Myers char *Id)
6857190917SDana Myers {
6957190917SDana Myers
7057190917SDana Myers /*
7157190917SDana Myers * Check if this is a PCI root bridge.
7257190917SDana Myers * ACPI 3.0+: check for a PCI Express root also.
7357190917SDana Myers */
74*cb565728SJerry Jelinek if (!(strcmp (Id,
7557190917SDana Myers PCI_ROOT_HID_STRING)) ||
7657190917SDana Myers
77*cb565728SJerry Jelinek !(strcmp (Id,
7857190917SDana Myers PCI_EXPRESS_ROOT_HID_STRING)))
7957190917SDana Myers {
8057190917SDana Myers return (TRUE);
8157190917SDana Myers }
8257190917SDana Myers
8357190917SDana Myers return (FALSE);
8457190917SDana Myers }
8557190917SDana Myers
8657190917SDana Myers
87*cb565728SJerry Jelinek #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
8857190917SDana Myers /*******************************************************************************
8957190917SDana Myers *
90ae115bc7Smrj * FUNCTION: AcpiUtIsAmlTable
91ae115bc7Smrj *
92ae115bc7Smrj * PARAMETERS: Table - An ACPI table
93ae115bc7Smrj *
94ae115bc7Smrj * RETURN: TRUE if table contains executable AML; FALSE otherwise
95ae115bc7Smrj *
96ae115bc7Smrj * DESCRIPTION: Check ACPI Signature for a table that contains AML code.
97ae115bc7Smrj * Currently, these are DSDT,SSDT,PSDT. All other table types are
98ae115bc7Smrj * data tables that do not contain AML code.
99ae115bc7Smrj *
100ae115bc7Smrj ******************************************************************************/
101ae115bc7Smrj
102ae115bc7Smrj BOOLEAN
AcpiUtIsAmlTable(ACPI_TABLE_HEADER * Table)103ae115bc7Smrj AcpiUtIsAmlTable (
104ae115bc7Smrj ACPI_TABLE_HEADER *Table)
105ae115bc7Smrj {
106ae115bc7Smrj
107ae115bc7Smrj /* These are the only tables that contain executable AML */
108ae115bc7Smrj
109db2bae30SDana Myers if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) ||
110db2bae30SDana Myers ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_PSDT) ||
111*cb565728SJerry Jelinek ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) ||
112*cb565728SJerry Jelinek ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_OSDT))
113ae115bc7Smrj {
114ae115bc7Smrj return (TRUE);
115ae115bc7Smrj }
116ae115bc7Smrj
117ae115bc7Smrj return (FALSE);
118ae115bc7Smrj }
11926f3cdf0SGordon Ross #endif
12026f3cdf0SGordon Ross
12126f3cdf0SGordon Ross
122ae115bc7Smrj /*******************************************************************************
123ae115bc7Smrj *
124ae115bc7Smrj * FUNCTION: AcpiUtDwordByteSwap
125ae115bc7Smrj *
126ae115bc7Smrj * PARAMETERS: Value - Value to be converted
127ae115bc7Smrj *
128ae115bc7Smrj * RETURN: UINT32 integer with bytes swapped
129ae115bc7Smrj *
130ae115bc7Smrj * DESCRIPTION: Convert a 32-bit value to big-endian (swap the bytes)
131ae115bc7Smrj *
132ae115bc7Smrj ******************************************************************************/
133ae115bc7Smrj
134ae115bc7Smrj UINT32
AcpiUtDwordByteSwap(UINT32 Value)135ae115bc7Smrj AcpiUtDwordByteSwap (
136ae115bc7Smrj UINT32 Value)
137ae115bc7Smrj {
138ae115bc7Smrj union
139ae115bc7Smrj {
140ae115bc7Smrj UINT32 Value;
141ae115bc7Smrj UINT8 Bytes[4];
142ae115bc7Smrj } Out;
143ae115bc7Smrj union
144ae115bc7Smrj {
145ae115bc7Smrj UINT32 Value;
146ae115bc7Smrj UINT8 Bytes[4];
147ae115bc7Smrj } In;
148ae115bc7Smrj
149ae115bc7Smrj
150ae115bc7Smrj ACPI_FUNCTION_ENTRY ();
151ae115bc7Smrj
152ae115bc7Smrj
153ae115bc7Smrj In.Value = Value;
154ae115bc7Smrj
155ae115bc7Smrj Out.Bytes[0] = In.Bytes[3];
156ae115bc7Smrj Out.Bytes[1] = In.Bytes[2];
157ae115bc7Smrj Out.Bytes[2] = In.Bytes[1];
158ae115bc7Smrj Out.Bytes[3] = In.Bytes[0];
159ae115bc7Smrj
160ae115bc7Smrj return (Out.Value);
161ae115bc7Smrj }
162ae115bc7Smrj
163ae115bc7Smrj
164ae115bc7Smrj /*******************************************************************************
165ae115bc7Smrj *
166ae115bc7Smrj * FUNCTION: AcpiUtSetIntegerWidth
167ae115bc7Smrj *
168ae115bc7Smrj * PARAMETERS: Revision From DSDT header
169ae115bc7Smrj *
170ae115bc7Smrj * RETURN: None
171ae115bc7Smrj *
172ae115bc7Smrj * DESCRIPTION: Set the global integer bit width based upon the revision
173ae115bc7Smrj * of the DSDT. For Revision 1 and 0, Integers are 32 bits.
174ae115bc7Smrj * For Revision 2 and above, Integers are 64 bits. Yes, this
175ae115bc7Smrj * makes a difference.
176ae115bc7Smrj *
177ae115bc7Smrj ******************************************************************************/
178ae115bc7Smrj
179ae115bc7Smrj void
AcpiUtSetIntegerWidth(UINT8 Revision)180ae115bc7Smrj AcpiUtSetIntegerWidth (
181ae115bc7Smrj UINT8 Revision)
182ae115bc7Smrj {
183ae115bc7Smrj
184db2bae30SDana Myers if (Revision < 2)
185ae115bc7Smrj {
186ae115bc7Smrj /* 32-bit case */
187ae115bc7Smrj
188ae115bc7Smrj AcpiGbl_IntegerBitWidth = 32;
189ae115bc7Smrj AcpiGbl_IntegerNybbleWidth = 8;
190ae115bc7Smrj AcpiGbl_IntegerByteWidth = 4;
191ae115bc7Smrj }
192ae115bc7Smrj else
193ae115bc7Smrj {
194ae115bc7Smrj /* 64-bit case (ACPI 2.0+) */
195ae115bc7Smrj
196ae115bc7Smrj AcpiGbl_IntegerBitWidth = 64;
197ae115bc7Smrj AcpiGbl_IntegerNybbleWidth = 16;
198ae115bc7Smrj AcpiGbl_IntegerByteWidth = 8;
199ae115bc7Smrj }
200ae115bc7Smrj }
201ae115bc7Smrj
202ae115bc7Smrj
203ae115bc7Smrj /*******************************************************************************
204ae115bc7Smrj *
205ae115bc7Smrj * FUNCTION: AcpiUtCreateUpdateStateAndPush
206ae115bc7Smrj *
207ae115bc7Smrj * PARAMETERS: Object - Object to be added to the new state
208ae115bc7Smrj * Action - Increment/Decrement
209ae115bc7Smrj * StateList - List the state will be added to
210ae115bc7Smrj *
211ae115bc7Smrj * RETURN: Status
212ae115bc7Smrj *
213ae115bc7Smrj * DESCRIPTION: Create a new state and push it
214ae115bc7Smrj *
215ae115bc7Smrj ******************************************************************************/
216ae115bc7Smrj
217ae115bc7Smrj ACPI_STATUS
AcpiUtCreateUpdateStateAndPush(ACPI_OPERAND_OBJECT * Object,UINT16 Action,ACPI_GENERIC_STATE ** StateList)218ae115bc7Smrj AcpiUtCreateUpdateStateAndPush (
219ae115bc7Smrj ACPI_OPERAND_OBJECT *Object,
220ae115bc7Smrj UINT16 Action,
221ae115bc7Smrj ACPI_GENERIC_STATE **StateList)
222ae115bc7Smrj {
223ae115bc7Smrj ACPI_GENERIC_STATE *State;
224ae115bc7Smrj
225ae115bc7Smrj
226ae115bc7Smrj ACPI_FUNCTION_ENTRY ();
227ae115bc7Smrj
228ae115bc7Smrj
229ae115bc7Smrj /* Ignore null objects; these are expected */
230ae115bc7Smrj
231ae115bc7Smrj if (!Object)
232ae115bc7Smrj {
233ae115bc7Smrj return (AE_OK);
234ae115bc7Smrj }
235ae115bc7Smrj
236ae115bc7Smrj State = AcpiUtCreateUpdateState (Object, Action);
237ae115bc7Smrj if (!State)
238ae115bc7Smrj {
239ae115bc7Smrj return (AE_NO_MEMORY);
240ae115bc7Smrj }
241ae115bc7Smrj
242ae115bc7Smrj AcpiUtPushGenericState (StateList, State);
243ae115bc7Smrj return (AE_OK);
244ae115bc7Smrj }
245ae115bc7Smrj
246ae115bc7Smrj
247ae115bc7Smrj /*******************************************************************************
248ae115bc7Smrj *
249ae115bc7Smrj * FUNCTION: AcpiUtWalkPackageTree
250ae115bc7Smrj *
251ae115bc7Smrj * PARAMETERS: SourceObject - The package to walk
252ae115bc7Smrj * TargetObject - Target object (if package is being copied)
253ae115bc7Smrj * WalkCallback - Called once for each package element
254ae115bc7Smrj * Context - Passed to the callback function
255ae115bc7Smrj *
256ae115bc7Smrj * RETURN: Status
257ae115bc7Smrj *
258ae115bc7Smrj * DESCRIPTION: Walk through a package
259ae115bc7Smrj *
260ae115bc7Smrj ******************************************************************************/
261ae115bc7Smrj
262ae115bc7Smrj ACPI_STATUS
AcpiUtWalkPackageTree(ACPI_OPERAND_OBJECT * SourceObject,void * TargetObject,ACPI_PKG_CALLBACK WalkCallback,void * Context)263ae115bc7Smrj AcpiUtWalkPackageTree (
264ae115bc7Smrj ACPI_OPERAND_OBJECT *SourceObject,
265ae115bc7Smrj void *TargetObject,
266ae115bc7Smrj ACPI_PKG_CALLBACK WalkCallback,
267ae115bc7Smrj void *Context)
268ae115bc7Smrj {
269ae115bc7Smrj ACPI_STATUS Status = AE_OK;
270ae115bc7Smrj ACPI_GENERIC_STATE *StateList = NULL;
271ae115bc7Smrj ACPI_GENERIC_STATE *State;
272ae115bc7Smrj UINT32 ThisIndex;
273ae115bc7Smrj ACPI_OPERAND_OBJECT *ThisSourceObj;
274ae115bc7Smrj
275ae115bc7Smrj
276ae115bc7Smrj ACPI_FUNCTION_TRACE (UtWalkPackageTree);
277ae115bc7Smrj
278ae115bc7Smrj
279ae115bc7Smrj State = AcpiUtCreatePkgState (SourceObject, TargetObject, 0);
280ae115bc7Smrj if (!State)
281ae115bc7Smrj {
282ae115bc7Smrj return_ACPI_STATUS (AE_NO_MEMORY);
283ae115bc7Smrj }
284ae115bc7Smrj
285ae115bc7Smrj while (State)
286ae115bc7Smrj {
287ae115bc7Smrj /* Get one element of the package */
288ae115bc7Smrj
289ae115bc7Smrj ThisIndex = State->Pkg.Index;
290ae115bc7Smrj ThisSourceObj = (ACPI_OPERAND_OBJECT *)
291ae115bc7Smrj State->Pkg.SourceObject->Package.Elements[ThisIndex];
292ae115bc7Smrj
293ae115bc7Smrj /*
294ae115bc7Smrj * Check for:
295ae115bc7Smrj * 1) An uninitialized package element. It is completely
296ae115bc7Smrj * legal to declare a package and leave it uninitialized
297ae115bc7Smrj * 2) Not an internal object - can be a namespace node instead
298ae115bc7Smrj * 3) Any type other than a package. Packages are handled in else
299ae115bc7Smrj * case below.
300ae115bc7Smrj */
301ae115bc7Smrj if ((!ThisSourceObj) ||
302*cb565728SJerry Jelinek (ACPI_GET_DESCRIPTOR_TYPE (ThisSourceObj) !=
303*cb565728SJerry Jelinek ACPI_DESC_TYPE_OPERAND) ||
304aa2aa9a6SDana Myers (ThisSourceObj->Common.Type != ACPI_TYPE_PACKAGE))
305ae115bc7Smrj {
306ae115bc7Smrj Status = WalkCallback (ACPI_COPY_TYPE_SIMPLE, ThisSourceObj,
307ae115bc7Smrj State, Context);
308ae115bc7Smrj if (ACPI_FAILURE (Status))
309ae115bc7Smrj {
310ae115bc7Smrj return_ACPI_STATUS (Status);
311ae115bc7Smrj }
312ae115bc7Smrj
313ae115bc7Smrj State->Pkg.Index++;
314*cb565728SJerry Jelinek while (State->Pkg.Index >=
315*cb565728SJerry Jelinek State->Pkg.SourceObject->Package.Count)
316ae115bc7Smrj {
317ae115bc7Smrj /*
318ae115bc7Smrj * We've handled all of the objects at this level, This means
319ae115bc7Smrj * that we have just completed a package. That package may
320ae115bc7Smrj * have contained one or more packages itself.
321ae115bc7Smrj *
322ae115bc7Smrj * Delete this state and pop the previous state (package).
323ae115bc7Smrj */
324ae115bc7Smrj AcpiUtDeleteGenericState (State);
325ae115bc7Smrj State = AcpiUtPopGenericState (&StateList);
326ae115bc7Smrj
327ae115bc7Smrj /* Finished when there are no more states */
328ae115bc7Smrj
329ae115bc7Smrj if (!State)
330ae115bc7Smrj {
331ae115bc7Smrj /*
332ae115bc7Smrj * We have handled all of the objects in the top level
333ae115bc7Smrj * package just add the length of the package objects
334ae115bc7Smrj * and exit
335ae115bc7Smrj */
336ae115bc7Smrj return_ACPI_STATUS (AE_OK);
337ae115bc7Smrj }
338ae115bc7Smrj
339ae115bc7Smrj /*
340ae115bc7Smrj * Go back up a level and move the index past the just
341ae115bc7Smrj * completed package object.
342ae115bc7Smrj */
343ae115bc7Smrj State->Pkg.Index++;
344ae115bc7Smrj }
345ae115bc7Smrj }
346ae115bc7Smrj else
347ae115bc7Smrj {
348ae115bc7Smrj /* This is a subobject of type package */
349ae115bc7Smrj
350*cb565728SJerry Jelinek Status = WalkCallback (
351*cb565728SJerry Jelinek ACPI_COPY_TYPE_PACKAGE, ThisSourceObj, State, Context);
352ae115bc7Smrj if (ACPI_FAILURE (Status))
353ae115bc7Smrj {
354ae115bc7Smrj return_ACPI_STATUS (Status);
355ae115bc7Smrj }
356ae115bc7Smrj
357ae115bc7Smrj /*
358ae115bc7Smrj * Push the current state and create a new one
359ae115bc7Smrj * The callback above returned a new target package object.
360ae115bc7Smrj */
361ae115bc7Smrj AcpiUtPushGenericState (&StateList, State);
362*cb565728SJerry Jelinek State = AcpiUtCreatePkgState (
363*cb565728SJerry Jelinek ThisSourceObj, State->Pkg.ThisTargetObj, 0);
364ae115bc7Smrj if (!State)
365ae115bc7Smrj {
366aa2aa9a6SDana Myers /* Free any stacked Update State objects */
367aa2aa9a6SDana Myers
368aa2aa9a6SDana Myers while (StateList)
369aa2aa9a6SDana Myers {
370aa2aa9a6SDana Myers State = AcpiUtPopGenericState (&StateList);
371aa2aa9a6SDana Myers AcpiUtDeleteGenericState (State);
372aa2aa9a6SDana Myers }
373ae115bc7Smrj return_ACPI_STATUS (AE_NO_MEMORY);
374ae115bc7Smrj }
375ae115bc7Smrj }
376ae115bc7Smrj }
377ae115bc7Smrj
378ae115bc7Smrj /* We should never get here */
379ae115bc7Smrj
380ae115bc7Smrj return_ACPI_STATUS (AE_AML_INTERNAL);
381ae115bc7Smrj }
382ae115bc7Smrj
383ae115bc7Smrj
384*cb565728SJerry Jelinek #ifdef ACPI_DEBUG_OUTPUT
385*cb565728SJerry Jelinek /*******************************************************************************
386*cb565728SJerry Jelinek *
387*cb565728SJerry Jelinek * FUNCTION: AcpiUtDisplayInitPathname
388*cb565728SJerry Jelinek *
389*cb565728SJerry Jelinek * PARAMETERS: Type - Object type of the node
390*cb565728SJerry Jelinek * ObjHandle - Handle whose pathname will be displayed
391*cb565728SJerry Jelinek * Path - Additional path string to be appended.
392*cb565728SJerry Jelinek * (NULL if no extra path)
393*cb565728SJerry Jelinek *
394*cb565728SJerry Jelinek * RETURN: ACPI_STATUS
395*cb565728SJerry Jelinek *
396*cb565728SJerry Jelinek * DESCRIPTION: Display full pathname of an object, DEBUG ONLY
397*cb565728SJerry Jelinek *
398*cb565728SJerry Jelinek ******************************************************************************/
399*cb565728SJerry Jelinek
400*cb565728SJerry Jelinek void
AcpiUtDisplayInitPathname(UINT8 Type,ACPI_NAMESPACE_NODE * ObjHandle,const char * Path)401*cb565728SJerry Jelinek AcpiUtDisplayInitPathname (
402*cb565728SJerry Jelinek UINT8 Type,
403*cb565728SJerry Jelinek ACPI_NAMESPACE_NODE *ObjHandle,
404*cb565728SJerry Jelinek const char *Path)
405*cb565728SJerry Jelinek {
406*cb565728SJerry Jelinek ACPI_STATUS Status;
407*cb565728SJerry Jelinek ACPI_BUFFER Buffer;
408*cb565728SJerry Jelinek
409*cb565728SJerry Jelinek
410*cb565728SJerry Jelinek ACPI_FUNCTION_ENTRY ();
411*cb565728SJerry Jelinek
412*cb565728SJerry Jelinek
413*cb565728SJerry Jelinek /* Only print the path if the appropriate debug level is enabled */
414*cb565728SJerry Jelinek
415*cb565728SJerry Jelinek if (!(AcpiDbgLevel & ACPI_LV_INIT_NAMES))
416*cb565728SJerry Jelinek {
417*cb565728SJerry Jelinek return;
418*cb565728SJerry Jelinek }
419*cb565728SJerry Jelinek
420*cb565728SJerry Jelinek /* Get the full pathname to the node */
421*cb565728SJerry Jelinek
422*cb565728SJerry Jelinek Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
423*cb565728SJerry Jelinek Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
424*cb565728SJerry Jelinek if (ACPI_FAILURE (Status))
425*cb565728SJerry Jelinek {
426*cb565728SJerry Jelinek return;
427*cb565728SJerry Jelinek }
428*cb565728SJerry Jelinek
429*cb565728SJerry Jelinek /* Print what we're doing */
430*cb565728SJerry Jelinek
431*cb565728SJerry Jelinek switch (Type)
432*cb565728SJerry Jelinek {
433*cb565728SJerry Jelinek case ACPI_TYPE_METHOD:
434*cb565728SJerry Jelinek
435*cb565728SJerry Jelinek AcpiOsPrintf ("Executing ");
436*cb565728SJerry Jelinek break;
437*cb565728SJerry Jelinek
438*cb565728SJerry Jelinek default:
439*cb565728SJerry Jelinek
440*cb565728SJerry Jelinek AcpiOsPrintf ("Initializing ");
441*cb565728SJerry Jelinek break;
442*cb565728SJerry Jelinek }
443*cb565728SJerry Jelinek
444*cb565728SJerry Jelinek /* Print the object type and pathname */
445*cb565728SJerry Jelinek
446*cb565728SJerry Jelinek AcpiOsPrintf ("%-12s %s",
447*cb565728SJerry Jelinek AcpiUtGetTypeName (Type), (char *) Buffer.Pointer);
448*cb565728SJerry Jelinek
449*cb565728SJerry Jelinek /* Extra path is used to append names like _STA, _INI, etc. */
450*cb565728SJerry Jelinek
451*cb565728SJerry Jelinek if (Path)
452*cb565728SJerry Jelinek {
453*cb565728SJerry Jelinek AcpiOsPrintf (".%s", Path);
454*cb565728SJerry Jelinek }
455*cb565728SJerry Jelinek AcpiOsPrintf ("\n");
456*cb565728SJerry Jelinek
457*cb565728SJerry Jelinek ACPI_FREE (Buffer.Pointer);
458*cb565728SJerry Jelinek }
459*cb565728SJerry Jelinek #endif
460