utglobal.c revision 217365
167754Smsmith/******************************************************************************
267754Smsmith *
377424Smsmith * Module Name: utglobal - Global variables for the ACPI subsystem
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7217365Sjkim/*
8217365Sjkim * Copyright (C) 2000 - 2011, Intel Corp.
970243Smsmith * All rights reserved.
1067754Smsmith *
11217365Sjkim * Redistribution and use in source and binary forms, with or without
12217365Sjkim * modification, are permitted provided that the following conditions
13217365Sjkim * are met:
14217365Sjkim * 1. Redistributions of source code must retain the above copyright
15217365Sjkim *    notice, this list of conditions, and the following disclaimer,
16217365Sjkim *    without modification.
17217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18217365Sjkim *    substantially similar to the "NO WARRANTY" disclaimer below
19217365Sjkim *    ("Disclaimer") and any redistribution must be conditioned upon
20217365Sjkim *    including a substantially similar Disclaimer requirement for further
21217365Sjkim *    binary redistribution.
22217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names
23217365Sjkim *    of any contributors may be used to endorse or promote products derived
24217365Sjkim *    from this software without specific prior written permission.
2567754Smsmith *
26217365Sjkim * Alternatively, this software may be distributed under the terms of the
27217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free
28217365Sjkim * Software Foundation.
2967754Smsmith *
30217365Sjkim * NO WARRANTY
31217365Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32217365Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33217365Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34217365Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35217365Sjkim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36217365Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37217365Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38217365Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39217365Sjkim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40217365Sjkim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41217365Sjkim * POSSIBILITY OF SUCH DAMAGES.
42217365Sjkim */
4367754Smsmith
4477424Smsmith#define __UTGLOBAL_C__
4567754Smsmith#define DEFINE_ACPI_GLOBALS
4667754Smsmith
47193341Sjkim#include <contrib/dev/acpica/include/acpi.h>
48193341Sjkim#include <contrib/dev/acpica/include/accommon.h>
49193341Sjkim#include <contrib/dev/acpica/include/acnamesp.h>
5067754Smsmith
5177424Smsmith#define _COMPONENT          ACPI_UTILITIES
5291116Smsmith        ACPI_MODULE_NAME    ("utglobal")
5367754Smsmith
5467754Smsmith
55151937Sjkim/*******************************************************************************
5667754Smsmith *
5767754Smsmith * Static global variable initialization.
5867754Smsmith *
5967754Smsmith ******************************************************************************/
6067754Smsmith
6167754Smsmith/*
6267754Smsmith * We want the debug switches statically initialized so they
6367754Smsmith * are already set when the debugger is entered.
6467754Smsmith */
6567754Smsmith
6667754Smsmith/* Debug switch - level and trace mask */
6767754Smsmith
68102550Siwasaki#ifdef ACPI_DEBUG_OUTPUT
69114237SnjlUINT32                      AcpiDbgLevel = ACPI_DEBUG_DEFAULT;
7067754Smsmith#else
71114237SnjlUINT32                      AcpiDbgLevel = ACPI_NORMAL_DEFAULT;
7267754Smsmith#endif
7367754Smsmith
7467754Smsmith/* Debug switch - layer (component) mask */
7567754Smsmith
7677424SmsmithUINT32                      AcpiDbgLayer = ACPI_COMPONENT_DEFAULT;
7767754SmsmithUINT32                      AcpiGbl_NestingLevel = 0;
7867754Smsmith
7967754Smsmith/* Debugger globals */
8067754Smsmith
8167754SmsmithBOOLEAN                     AcpiGbl_DbTerminateThreads = FALSE;
82114237SnjlBOOLEAN                     AcpiGbl_AbortMethod = FALSE;
8367754SmsmithBOOLEAN                     AcpiGbl_MethodExecuting = FALSE;
8467754Smsmith
8567754Smsmith/* System flags */
8667754Smsmith
8767754SmsmithUINT32                      AcpiGbl_StartupFlags = 0;
8867754Smsmith
8987031Smsmith/* System starts uninitialized */
9083174Smsmith
9167754SmsmithBOOLEAN                     AcpiGbl_Shutdown = TRUE;
9267754Smsmith
93129684Snjlconst char                  *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] =
94129684Snjl{
95129684Snjl    "\\_S0_",
96129684Snjl    "\\_S1_",
97129684Snjl    "\\_S2_",
98129684Snjl    "\\_S3_",
99129684Snjl    "\\_S4_",
100129684Snjl    "\\_S5_"
101129684Snjl};
10269450Smsmith
103197104Sjkimconst char                  *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS] =
104129684Snjl{
105197104Sjkim    "_S0W",
106197104Sjkim    "_S1W",
107197104Sjkim    "_S2W",
108197104Sjkim    "_S3W",
109197104Sjkim    "_S4W"
110197104Sjkim};
111197104Sjkim
112197104Sjkimconst char                  *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS] =
113197104Sjkim{
114129684Snjl    "_S1D",
115129684Snjl    "_S2D",
116129684Snjl    "_S3D",
117129684Snjl    "_S4D"
118129684Snjl};
11969450Smsmith
120167802Sjkim
121167802Sjkim/*******************************************************************************
122167802Sjkim *
123167802Sjkim * FUNCTION:    AcpiFormatException
124167802Sjkim *
125167802Sjkim * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
126167802Sjkim *
127167802Sjkim * RETURN:      A string containing the exception text. A valid pointer is
128167802Sjkim *              always returned.
129167802Sjkim *
130167802Sjkim * DESCRIPTION: This function translates an ACPI exception into an ASCII string
131167802Sjkim *              It is here instead of utxface.c so it is always present.
132167802Sjkim *
133167802Sjkim ******************************************************************************/
134167802Sjkim
135167802Sjkimconst char *
136167802SjkimAcpiFormatException (
137167802Sjkim    ACPI_STATUS             Status)
138129684Snjl{
139167802Sjkim    const char              *Exception = NULL;
140151937Sjkim
141151937Sjkim
142167802Sjkim    ACPI_FUNCTION_ENTRY ();
143151937Sjkim
144127175Snjl
145167802Sjkim    Exception = AcpiUtValidateException (Status);
146167802Sjkim    if (!Exception)
147167802Sjkim    {
148167802Sjkim        /* Exception code was not recognized */
149127175Snjl
150167802Sjkim        ACPI_ERROR ((AE_INFO,
151167802Sjkim            "Unknown exception code: 0x%8.8X", Status));
152167802Sjkim
153167802Sjkim        Exception = "UNKNOWN_STATUS_CODE";
154167802Sjkim    }
155167802Sjkim
156167802Sjkim    return (ACPI_CAST_PTR (const char, Exception));
157167802Sjkim}
158167802Sjkim
159167802SjkimACPI_EXPORT_SYMBOL (AcpiFormatException)
160167802Sjkim
161167802Sjkim
162151937Sjkim/*******************************************************************************
16367754Smsmith *
16467754Smsmith * Namespace globals
16567754Smsmith *
16667754Smsmith ******************************************************************************/
16767754Smsmith
16867754Smsmith/*
169104470Siwasaki * Predefined ACPI Names (Built-in to the Interpreter)
17067754Smsmith *
17177424Smsmith * NOTES:
172127175Snjl * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run
17377424Smsmith *    during the initialization sequence.
174151937Sjkim * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to
175213806Sjkim *    perform a Notify() operation on it. 09/2010: Changed to type Device.
176213806Sjkim *    This still allows notifies, but does not confuse host code that
177213806Sjkim *    searches for valid ThermalZone objects.
17867754Smsmith */
17991116Smsmithconst ACPI_PREDEFINED_NAMES     AcpiGbl_PreDefinedNames[] =
18067754Smsmith{
181107325Siwasaki    {"_GPE",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
182107325Siwasaki    {"_PR_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
18399679Siwasaki    {"_SB_",    ACPI_TYPE_DEVICE,           NULL},
184107325Siwasaki    {"_SI_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
185213806Sjkim    {"_TZ_",    ACPI_TYPE_DEVICE,           NULL},
186151937Sjkim    {"_REV",    ACPI_TYPE_INTEGER,          (char *) ACPI_CA_SUPPORT_LEVEL},
18799146Siwasaki    {"_OS_",    ACPI_TYPE_STRING,           ACPI_OS_NAME},
188151937Sjkim    {"_GL_",    ACPI_TYPE_MUTEX,            (char *) 1},
189102550Siwasaki
190127175Snjl#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
191151937Sjkim    {"_OSI",    ACPI_TYPE_METHOD,           (char *) 1},
192102550Siwasaki#endif
193151937Sjkim
194151937Sjkim    /* Table terminator */
195151937Sjkim
196151937Sjkim    {NULL,      ACPI_TYPE_ANY,              NULL}
19767754Smsmith};
19867754Smsmith
19967754Smsmith/*
20067754Smsmith * Properties of the ACPI Object Types, both internal and external.
201104470Siwasaki * The table is indexed by values of ACPI_OBJECT_TYPE
20267754Smsmith */
203193267Sjkimconst UINT8                     AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] =
20467754Smsmith{
20591116Smsmith    ACPI_NS_NORMAL,                     /* 00 Any              */
20691116Smsmith    ACPI_NS_NORMAL,                     /* 01 Number           */
20791116Smsmith    ACPI_NS_NORMAL,                     /* 02 String           */
20891116Smsmith    ACPI_NS_NORMAL,                     /* 03 Buffer           */
20999146Siwasaki    ACPI_NS_NORMAL,                     /* 04 Package          */
21091116Smsmith    ACPI_NS_NORMAL,                     /* 05 FieldUnit        */
21199146Siwasaki    ACPI_NS_NEWSCOPE,                   /* 06 Device           */
21299146Siwasaki    ACPI_NS_NORMAL,                     /* 07 Event            */
21399146Siwasaki    ACPI_NS_NEWSCOPE,                   /* 08 Method           */
21499146Siwasaki    ACPI_NS_NORMAL,                     /* 09 Mutex            */
21599146Siwasaki    ACPI_NS_NORMAL,                     /* 10 Region           */
21699146Siwasaki    ACPI_NS_NEWSCOPE,                   /* 11 Power            */
21799146Siwasaki    ACPI_NS_NEWSCOPE,                   /* 12 Processor        */
21899146Siwasaki    ACPI_NS_NEWSCOPE,                   /* 13 Thermal          */
21991116Smsmith    ACPI_NS_NORMAL,                     /* 14 BufferField      */
22091116Smsmith    ACPI_NS_NORMAL,                     /* 15 DdbHandle        */
22191116Smsmith    ACPI_NS_NORMAL,                     /* 16 Debug Object     */
22291116Smsmith    ACPI_NS_NORMAL,                     /* 17 DefField         */
22391116Smsmith    ACPI_NS_NORMAL,                     /* 18 BankField        */
22491116Smsmith    ACPI_NS_NORMAL,                     /* 19 IndexField       */
22591116Smsmith    ACPI_NS_NORMAL,                     /* 20 Reference        */
22691116Smsmith    ACPI_NS_NORMAL,                     /* 21 Alias            */
227128212Snjl    ACPI_NS_NORMAL,                     /* 22 MethodAlias      */
228128212Snjl    ACPI_NS_NORMAL,                     /* 23 Notify           */
229128212Snjl    ACPI_NS_NORMAL,                     /* 24 Address Handler  */
230128212Snjl    ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 25 Resource Desc    */
231128212Snjl    ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL,   /* 26 Resource Field   */
232128212Snjl    ACPI_NS_NEWSCOPE,                   /* 27 Scope            */
233128212Snjl    ACPI_NS_NORMAL,                     /* 28 Extra            */
234128212Snjl    ACPI_NS_NORMAL,                     /* 29 Data             */
235128212Snjl    ACPI_NS_NORMAL                      /* 30 Invalid          */
23667754Smsmith};
23767754Smsmith
23867754Smsmith
23971867Smsmith/* Hex to ASCII conversion table */
24071867Smsmith
241114237Snjlstatic const char           AcpiGbl_HexToAscii[] =
242151937Sjkim{
243151937Sjkim    '0','1','2','3','4','5','6','7',
244151937Sjkim    '8','9','A','B','C','D','E','F'
245151937Sjkim};
24671867Smsmith
247151937Sjkim
248151937Sjkim/*******************************************************************************
24983174Smsmith *
25083174Smsmith * FUNCTION:    AcpiUtHexToAsciiChar
25183174Smsmith *
25283174Smsmith * PARAMETERS:  Integer             - Contains the hex digit
25383174Smsmith *              Position            - bit position of the digit within the
254151937Sjkim *                                    integer (multiple of 4)
25583174Smsmith *
256151937Sjkim * RETURN:      The converted Ascii character
25783174Smsmith *
258151937Sjkim * DESCRIPTION: Convert a hex digit to an Ascii character
25983174Smsmith *
260151937Sjkim ******************************************************************************/
26183174Smsmith
26299679Siwasakichar
26382367SmsmithAcpiUtHexToAsciiChar (
264202771Sjkim    UINT64                  Integer,
26582367Smsmith    UINT32                  Position)
26682367Smsmith{
26771867Smsmith
26882367Smsmith    return (AcpiGbl_HexToAscii[(Integer >> Position) & 0xF]);
26982367Smsmith}
27082367Smsmith
27183174Smsmith
27291116Smsmith/******************************************************************************
27391116Smsmith *
27491116Smsmith * Event and Hardware globals
27591116Smsmith *
27691116Smsmith ******************************************************************************/
27791116Smsmith
27891116SmsmithACPI_BIT_REGISTER_INFO      AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG] =
27991116Smsmith{
28091116Smsmith    /* Name                                     Parent Register             Register Bit Position                   Register Bit Mask       */
28191116Smsmith
28291116Smsmith    /* ACPI_BITREG_TIMER_STATUS         */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_TIMER_STATUS,          ACPI_BITMASK_TIMER_STATUS},
28391116Smsmith    /* ACPI_BITREG_BUS_MASTER_STATUS    */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_BUS_MASTER_STATUS,     ACPI_BITMASK_BUS_MASTER_STATUS},
28491116Smsmith    /* ACPI_BITREG_GLOBAL_LOCK_STATUS   */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_GLOBAL_LOCK_STATUS,    ACPI_BITMASK_GLOBAL_LOCK_STATUS},
28591116Smsmith    /* ACPI_BITREG_POWER_BUTTON_STATUS  */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_POWER_BUTTON_STATUS,   ACPI_BITMASK_POWER_BUTTON_STATUS},
28691116Smsmith    /* ACPI_BITREG_SLEEP_BUTTON_STATUS  */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_SLEEP_BUTTON_STATUS,   ACPI_BITMASK_SLEEP_BUTTON_STATUS},
28791116Smsmith    /* ACPI_BITREG_RT_CLOCK_STATUS      */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_RT_CLOCK_STATUS,       ACPI_BITMASK_RT_CLOCK_STATUS},
28891116Smsmith    /* ACPI_BITREG_WAKE_STATUS          */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_WAKE_STATUS,           ACPI_BITMASK_WAKE_STATUS},
289151937Sjkim    /* ACPI_BITREG_PCIEXP_WAKE_STATUS   */   {ACPI_REGISTER_PM1_STATUS,   ACPI_BITPOSITION_PCIEXP_WAKE_STATUS,    ACPI_BITMASK_PCIEXP_WAKE_STATUS},
29091116Smsmith
29191116Smsmith    /* ACPI_BITREG_TIMER_ENABLE         */   {ACPI_REGISTER_PM1_ENABLE,   ACPI_BITPOSITION_TIMER_ENABLE,          ACPI_BITMASK_TIMER_ENABLE},
29291116Smsmith    /* ACPI_BITREG_GLOBAL_LOCK_ENABLE   */   {ACPI_REGISTER_PM1_ENABLE,   ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE,    ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
29391116Smsmith    /* ACPI_BITREG_POWER_BUTTON_ENABLE  */   {ACPI_REGISTER_PM1_ENABLE,   ACPI_BITPOSITION_POWER_BUTTON_ENABLE,   ACPI_BITMASK_POWER_BUTTON_ENABLE},
29491116Smsmith    /* ACPI_BITREG_SLEEP_BUTTON_ENABLE  */   {ACPI_REGISTER_PM1_ENABLE,   ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE,   ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
29591116Smsmith    /* ACPI_BITREG_RT_CLOCK_ENABLE      */   {ACPI_REGISTER_PM1_ENABLE,   ACPI_BITPOSITION_RT_CLOCK_ENABLE,       ACPI_BITMASK_RT_CLOCK_ENABLE},
296151937Sjkim    /* ACPI_BITREG_PCIEXP_WAKE_DISABLE  */   {ACPI_REGISTER_PM1_ENABLE,   ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE,   ACPI_BITMASK_PCIEXP_WAKE_DISABLE},
29791116Smsmith
29891116Smsmith    /* ACPI_BITREG_SCI_ENABLE           */   {ACPI_REGISTER_PM1_CONTROL,  ACPI_BITPOSITION_SCI_ENABLE,            ACPI_BITMASK_SCI_ENABLE},
29991116Smsmith    /* ACPI_BITREG_BUS_MASTER_RLD       */   {ACPI_REGISTER_PM1_CONTROL,  ACPI_BITPOSITION_BUS_MASTER_RLD,        ACPI_BITMASK_BUS_MASTER_RLD},
30091116Smsmith    /* ACPI_BITREG_GLOBAL_LOCK_RELEASE  */   {ACPI_REGISTER_PM1_CONTROL,  ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE,   ACPI_BITMASK_GLOBAL_LOCK_RELEASE},
301193267Sjkim    /* ACPI_BITREG_SLEEP_TYPE           */   {ACPI_REGISTER_PM1_CONTROL,  ACPI_BITPOSITION_SLEEP_TYPE,            ACPI_BITMASK_SLEEP_TYPE},
30291116Smsmith    /* ACPI_BITREG_SLEEP_ENABLE         */   {ACPI_REGISTER_PM1_CONTROL,  ACPI_BITPOSITION_SLEEP_ENABLE,          ACPI_BITMASK_SLEEP_ENABLE},
30391116Smsmith
30491116Smsmith    /* ACPI_BITREG_ARB_DIS              */   {ACPI_REGISTER_PM2_CONTROL,  ACPI_BITPOSITION_ARB_DISABLE,           ACPI_BITMASK_ARB_DISABLE}
30591116Smsmith};
30691116Smsmith
30791116Smsmith
30891116SmsmithACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
30991116Smsmith{
31091116Smsmith    /* ACPI_EVENT_PMTIMER       */  {ACPI_BITREG_TIMER_STATUS,          ACPI_BITREG_TIMER_ENABLE,        ACPI_BITMASK_TIMER_STATUS,          ACPI_BITMASK_TIMER_ENABLE},
31191116Smsmith    /* ACPI_EVENT_GLOBAL        */  {ACPI_BITREG_GLOBAL_LOCK_STATUS,    ACPI_BITREG_GLOBAL_LOCK_ENABLE,  ACPI_BITMASK_GLOBAL_LOCK_STATUS,    ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
31291116Smsmith    /* ACPI_EVENT_POWER_BUTTON  */  {ACPI_BITREG_POWER_BUTTON_STATUS,   ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS,   ACPI_BITMASK_POWER_BUTTON_ENABLE},
31391116Smsmith    /* ACPI_EVENT_SLEEP_BUTTON  */  {ACPI_BITREG_SLEEP_BUTTON_STATUS,   ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS,   ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
314123315Snjl    /* ACPI_EVENT_RTC           */  {ACPI_BITREG_RT_CLOCK_STATUS,       ACPI_BITREG_RT_CLOCK_ENABLE,     ACPI_BITMASK_RT_CLOCK_STATUS,       ACPI_BITMASK_RT_CLOCK_ENABLE},
31591116Smsmith};
31691116Smsmith
317151937Sjkim/*******************************************************************************
31891116Smsmith *
31991116Smsmith * FUNCTION:    AcpiUtGetRegionName
32091116Smsmith *
32191116Smsmith * PARAMETERS:  None.
32291116Smsmith *
32391116Smsmith * RETURN:      Status
32491116Smsmith *
32591116Smsmith * DESCRIPTION: Translate a Space ID into a name string (Debug only)
32691116Smsmith *
327151937Sjkim ******************************************************************************/
32891116Smsmith
32991116Smsmith/* Region type decoding */
33091116Smsmith
331114237Snjlconst char        *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
33291116Smsmith{
33391116Smsmith    "SystemMemory",
33491116Smsmith    "SystemIO",
335100966Siwasaki    "PCI_Config",
33691116Smsmith    "EmbeddedControl",
33791116Smsmith    "SMBus",
338193267Sjkim    "SystemCMOS",
339100966Siwasaki    "PCIBARTarget",
340197104Sjkim    "IPMI",
341114237Snjl    "DataTable"
34291116Smsmith};
34391116Smsmith
34491116Smsmith
345114237Snjlchar *
34691116SmsmithAcpiUtGetRegionName (
34791116Smsmith    UINT8                   SpaceId)
34891116Smsmith{
34991116Smsmith
35091116Smsmith    if (SpaceId >= ACPI_USER_REGION_BEGIN)
35191116Smsmith    {
35291116Smsmith        return ("UserDefinedRegion");
35391116Smsmith    }
35491116Smsmith    else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS)
35591116Smsmith    {
356114237Snjl        return ("InvalidSpaceId");
35791116Smsmith    }
35891116Smsmith
359167802Sjkim    return (ACPI_CAST_PTR (char, AcpiGbl_RegionTypes[SpaceId]));
36091116Smsmith}
36191116Smsmith
36291116Smsmith
363151937Sjkim/*******************************************************************************
36491116Smsmith *
36591116Smsmith * FUNCTION:    AcpiUtGetEventName
36691116Smsmith *
36791116Smsmith * PARAMETERS:  None.
36891116Smsmith *
36991116Smsmith * RETURN:      Status
37091116Smsmith *
37191116Smsmith * DESCRIPTION: Translate a Event ID into a name string (Debug only)
37291116Smsmith *
373151937Sjkim ******************************************************************************/
37491116Smsmith
37591116Smsmith/* Event type decoding */
37691116Smsmith
377114237Snjlstatic const char        *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] =
37891116Smsmith{
37991116Smsmith    "PM_Timer",
38091116Smsmith    "GlobalLock",
38191116Smsmith    "PowerButton",
38291116Smsmith    "SleepButton",
38391116Smsmith    "RealTimeClock",
38491116Smsmith};
38591116Smsmith
38691116Smsmith
387114237Snjlchar *
38891116SmsmithAcpiUtGetEventName (
38991116Smsmith    UINT32                  EventId)
39091116Smsmith{
39191116Smsmith
39291116Smsmith    if (EventId > ACPI_EVENT_MAX)
39391116Smsmith    {
39491116Smsmith        return ("InvalidEventID");
39591116Smsmith    }
39691116Smsmith
397167802Sjkim    return (ACPI_CAST_PTR (char, AcpiGbl_EventTypes[EventId]));
39891116Smsmith}
39991116Smsmith
40091116Smsmith
401151937Sjkim/*******************************************************************************
40267754Smsmith *
40391116Smsmith * FUNCTION:    AcpiUtGetTypeName
40491116Smsmith *
40591116Smsmith * PARAMETERS:  None.
40691116Smsmith *
40791116Smsmith * RETURN:      Status
40891116Smsmith *
40991116Smsmith * DESCRIPTION: Translate a Type ID into a name string (Debug only)
41091116Smsmith *
411151937Sjkim ******************************************************************************/
41291116Smsmith
41367754Smsmith/*
41467754Smsmith * Elements of AcpiGbl_NsTypeNames below must match
41567754Smsmith * one-to-one with values of ACPI_OBJECT_TYPE
41667754Smsmith *
417151937Sjkim * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching;
418151937Sjkim * when stored in a table it really means that we have thus far seen no
419151937Sjkim * evidence to indicate what type is actually going to be stored for this entry.
42067754Smsmith */
421114237Snjlstatic const char           AcpiGbl_BadType[] = "UNDEFINED";
42267754Smsmith
423151937Sjkim/* Printable names of the ACPI object types */
424151937Sjkim
425151937Sjkimstatic const char           *AcpiGbl_NsTypeNames[] =
42667754Smsmith{
42767754Smsmith    /* 00 */ "Untyped",
42871867Smsmith    /* 01 */ "Integer",
42967754Smsmith    /* 02 */ "String",
43067754Smsmith    /* 03 */ "Buffer",
43167754Smsmith    /* 04 */ "Package",
43267754Smsmith    /* 05 */ "FieldUnit",
43367754Smsmith    /* 06 */ "Device",
43467754Smsmith    /* 07 */ "Event",
43567754Smsmith    /* 08 */ "Method",
43667754Smsmith    /* 09 */ "Mutex",
43767754Smsmith    /* 10 */ "Region",
43867754Smsmith    /* 11 */ "Power",
43967754Smsmith    /* 12 */ "Processor",
44067754Smsmith    /* 13 */ "Thermal",
44185756Smsmith    /* 14 */ "BufferField",
44267754Smsmith    /* 15 */ "DdbHandle",
44385756Smsmith    /* 16 */ "DebugObject",
44485756Smsmith    /* 17 */ "RegionField",
44577424Smsmith    /* 18 */ "BankField",
44685756Smsmith    /* 19 */ "IndexField",
44767754Smsmith    /* 20 */ "Reference",
44867754Smsmith    /* 21 */ "Alias",
449128212Snjl    /* 22 */ "MethodAlias",
450128212Snjl    /* 23 */ "Notify",
451128212Snjl    /* 24 */ "AddrHandler",
452128212Snjl    /* 25 */ "ResourceDesc",
453128212Snjl    /* 26 */ "ResourceFld",
454128212Snjl    /* 27 */ "Scope",
455128212Snjl    /* 28 */ "Extra",
456128212Snjl    /* 29 */ "Data",
457128212Snjl    /* 30 */ "Invalid"
45867754Smsmith};
45967754Smsmith
46067754Smsmith
461114237Snjlchar *
46277424SmsmithAcpiUtGetTypeName (
46391116Smsmith    ACPI_OBJECT_TYPE        Type)
46467754Smsmith{
46567754Smsmith
466107325Siwasaki    if (Type > ACPI_TYPE_INVALID)
46767754Smsmith    {
468167802Sjkim        return (ACPI_CAST_PTR (char, AcpiGbl_BadType));
46967754Smsmith    }
47067754Smsmith
471167802Sjkim    return (ACPI_CAST_PTR (char, AcpiGbl_NsTypeNames[Type]));
47267754Smsmith}
47367754Smsmith
47469746Smsmith
475114237Snjlchar *
47699679SiwasakiAcpiUtGetObjectTypeName (
47799679Siwasaki    ACPI_OPERAND_OBJECT     *ObjDesc)
47899679Siwasaki{
47999679Siwasaki
48099679Siwasaki    if (!ObjDesc)
48199679Siwasaki    {
48299679Siwasaki        return ("[NULL Object Descriptor]");
48399679Siwasaki    }
48499679Siwasaki
485193267Sjkim    return (AcpiUtGetTypeName (ObjDesc->Common.Type));
48699679Siwasaki}
48799679Siwasaki
48899679Siwasaki
489151937Sjkim/*******************************************************************************
490123315Snjl *
491123315Snjl * FUNCTION:    AcpiUtGetNodeName
492123315Snjl *
493123315Snjl * PARAMETERS:  Object               - A namespace node
494123315Snjl *
495123315Snjl * RETURN:      Pointer to a string
496123315Snjl *
497123315Snjl * DESCRIPTION: Validate the node and return the node's ACPI name.
498123315Snjl *
499151937Sjkim ******************************************************************************/
500123315Snjl
501123315Snjlchar *
502123315SnjlAcpiUtGetNodeName (
503123315Snjl    void                    *Object)
504123315Snjl{
505128212Snjl    ACPI_NAMESPACE_NODE     *Node = (ACPI_NAMESPACE_NODE *) Object;
506123315Snjl
507123315Snjl
508128212Snjl    /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */
509128212Snjl
510123315Snjl    if (!Object)
511123315Snjl    {
512128212Snjl        return ("NULL");
513123315Snjl    }
514123315Snjl
515128212Snjl    /* Check for Root node */
516123315Snjl
517128212Snjl    if ((Object == ACPI_ROOT_OBJECT) ||
518128212Snjl        (Object == AcpiGbl_RootNode))
519128212Snjl    {
520128212Snjl        return ("\"\\\" ");
521128212Snjl    }
522128212Snjl
523128212Snjl    /* Descriptor must be a namespace node */
524128212Snjl
525167802Sjkim    if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
526123315Snjl    {
527128212Snjl        return ("####");
528123315Snjl    }
529123315Snjl
530193267Sjkim    /*
531193267Sjkim     * Ensure name is valid. The name was validated/repaired when the node
532193267Sjkim     * was created, but make sure it has not been corrupted.
533193267Sjkim     */
534193267Sjkim    AcpiUtRepairName (Node->Name.Ascii);
535128212Snjl
536128212Snjl    /* Return the name */
537128212Snjl
538123315Snjl    return (Node->Name.Ascii);
539123315Snjl}
540123315Snjl
541123315Snjl
542151937Sjkim/*******************************************************************************
543123315Snjl *
544123315Snjl * FUNCTION:    AcpiUtGetDescriptorName
545123315Snjl *
546123315Snjl * PARAMETERS:  Object               - An ACPI object
547123315Snjl *
548123315Snjl * RETURN:      Pointer to a string
549123315Snjl *
550123315Snjl * DESCRIPTION: Validate object and return the descriptor type
551123315Snjl *
552151937Sjkim ******************************************************************************/
553123315Snjl
554151937Sjkim/* Printable names of object descriptor types */
555151937Sjkim
556151937Sjkimstatic const char           *AcpiGbl_DescTypeNames[] =
557123315Snjl{
558207344Sjkim    /* 00 */ "Not a Descriptor",
559123315Snjl    /* 01 */ "Cached",
560123315Snjl    /* 02 */ "State-Generic",
561123315Snjl    /* 03 */ "State-Update",
562123315Snjl    /* 04 */ "State-Package",
563123315Snjl    /* 05 */ "State-Control",
564123315Snjl    /* 06 */ "State-RootParseScope",
565123315Snjl    /* 07 */ "State-ParseScope",
566123315Snjl    /* 08 */ "State-WalkScope",
567123315Snjl    /* 09 */ "State-Result",
568123315Snjl    /* 10 */ "State-Notify",
569123315Snjl    /* 11 */ "State-Thread",
570123315Snjl    /* 12 */ "Walk",
571123315Snjl    /* 13 */ "Parser",
572123315Snjl    /* 14 */ "Operand",
573123315Snjl    /* 15 */ "Node"
574123315Snjl};
575123315Snjl
576123315Snjl
577123315Snjlchar *
578123315SnjlAcpiUtGetDescriptorName (
579123315Snjl    void                    *Object)
580123315Snjl{
581123315Snjl
582123315Snjl    if (!Object)
583123315Snjl    {
584123315Snjl        return ("NULL OBJECT");
585123315Snjl    }
586123315Snjl
587123315Snjl    if (ACPI_GET_DESCRIPTOR_TYPE (Object) > ACPI_DESC_TYPE_MAX)
588123315Snjl    {
589207344Sjkim        return ("Not a Descriptor");
590123315Snjl    }
591123315Snjl
592167802Sjkim    return (ACPI_CAST_PTR (char,
593167802Sjkim        AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]));
594123315Snjl
595123315Snjl}
596123315Snjl
597123315Snjl
598193267Sjkim/*******************************************************************************
599193267Sjkim *
600193267Sjkim * FUNCTION:    AcpiUtGetReferenceName
601193267Sjkim *
602193267Sjkim * PARAMETERS:  Object               - An ACPI reference object
603193267Sjkim *
604193267Sjkim * RETURN:      Pointer to a string
605193267Sjkim *
606193267Sjkim * DESCRIPTION: Decode a reference object sub-type to a string.
607193267Sjkim *
608193267Sjkim ******************************************************************************/
609193267Sjkim
610193267Sjkim/* Printable names of reference object sub-types */
611193267Sjkim
612193267Sjkimstatic const char           *AcpiGbl_RefClassNames[] =
613193267Sjkim{
614193267Sjkim    /* 00 */ "Local",
615193267Sjkim    /* 01 */ "Argument",
616193267Sjkim    /* 02 */ "RefOf",
617193267Sjkim    /* 03 */ "Index",
618193267Sjkim    /* 04 */ "DdbHandle",
619193267Sjkim    /* 05 */ "Named Object",
620193267Sjkim    /* 06 */ "Debug"
621193267Sjkim};
622193267Sjkim
623193267Sjkimconst char *
624193267SjkimAcpiUtGetReferenceName (
625193267Sjkim    ACPI_OPERAND_OBJECT     *Object)
626193267Sjkim{
627193267Sjkim
628193267Sjkim    if (!Object)
629193267Sjkim    {
630193267Sjkim        return ("NULL Object");
631193267Sjkim    }
632193267Sjkim
633193267Sjkim    if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
634193267Sjkim    {
635193267Sjkim        return ("Not an Operand object");
636193267Sjkim    }
637193267Sjkim
638193267Sjkim    if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE)
639193267Sjkim    {
640193267Sjkim        return ("Not a Reference object");
641193267Sjkim    }
642193267Sjkim
643193267Sjkim    if (Object->Reference.Class > ACPI_REFCLASS_MAX)
644193267Sjkim    {
645193267Sjkim        return ("Unknown Reference class");
646193267Sjkim    }
647193267Sjkim
648193267Sjkim    return (AcpiGbl_RefClassNames[Object->Reference.Class]);
649193267Sjkim}
650193267Sjkim
651193267Sjkim
652102550Siwasaki#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
653100966Siwasaki/*
654100966Siwasaki * Strings and procedures used for debug only
655100966Siwasaki */
65699679Siwasaki
657151937Sjkim/*******************************************************************************
658100966Siwasaki *
659100966Siwasaki * FUNCTION:    AcpiUtGetMutexName
660100966Siwasaki *
661151937Sjkim * PARAMETERS:  MutexId         - The predefined ID for this mutex.
662100966Siwasaki *
663151937Sjkim * RETURN:      String containing the name of the mutex. Always returns a valid
664151937Sjkim *              pointer.
665100966Siwasaki *
666100966Siwasaki * DESCRIPTION: Translate a mutex ID into a name string (Debug only)
667100966Siwasaki *
668151937Sjkim ******************************************************************************/
66969746Smsmith
670114237Snjlchar *
671100966SiwasakiAcpiUtGetMutexName (
672100966Siwasaki    UINT32                  MutexId)
67369746Smsmith{
67469746Smsmith
675167802Sjkim    if (MutexId > ACPI_MAX_MUTEX)
676100966Siwasaki    {
677100966Siwasaki        return ("Invalid Mutex ID");
678100966Siwasaki    }
67969746Smsmith
680100966Siwasaki    return (AcpiGbl_MutexNames[MutexId]);
681100966Siwasaki}
682193267Sjkim
683193267Sjkim
684193267Sjkim/*******************************************************************************
685193267Sjkim *
686193267Sjkim * FUNCTION:    AcpiUtGetNotifyName
687193267Sjkim *
688193267Sjkim * PARAMETERS:  NotifyValue     - Value from the Notify() request
689193267Sjkim *
690193267Sjkim * RETURN:      String corresponding to the Notify Value.
691193267Sjkim *
692193267Sjkim * DESCRIPTION: Translate a Notify Value to a notify namestring.
693193267Sjkim *
694193267Sjkim ******************************************************************************/
695193267Sjkim
696193267Sjkim/* Names for Notify() values, used for debug output */
697193267Sjkim
698193267Sjkimstatic const char        *AcpiGbl_NotifyValueNames[] =
699193267Sjkim{
700193267Sjkim    "Bus Check",
701193267Sjkim    "Device Check",
702193267Sjkim    "Device Wake",
703193267Sjkim    "Eject Request",
704193267Sjkim    "Device Check Light",
705193267Sjkim    "Frequency Mismatch",
706193267Sjkim    "Bus Mode Mismatch",
707193267Sjkim    "Power Fault",
708193267Sjkim    "Capabilities Check",
709193267Sjkim    "Device PLD Check",
710193267Sjkim    "Reserved",
711193267Sjkim    "System Locality Update"
712193267Sjkim};
713193267Sjkim
714193267Sjkimconst char *
715193267SjkimAcpiUtGetNotifyName (
716193267Sjkim    UINT32                  NotifyValue)
717193267Sjkim{
718193267Sjkim
719193267Sjkim    if (NotifyValue <= ACPI_NOTIFY_MAX)
720193267Sjkim    {
721193267Sjkim        return (AcpiGbl_NotifyValueNames[NotifyValue]);
722193267Sjkim    }
723193267Sjkim    else if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
724193267Sjkim    {
725193267Sjkim        return ("Reserved");
726193267Sjkim    }
727193267Sjkim    else /* Greater or equal to 0x80 */
728193267Sjkim    {
729193267Sjkim        return ("**Device Specific**");
730193267Sjkim    }
731193267Sjkim}
73267754Smsmith#endif
73367754Smsmith
73467754Smsmith
735151937Sjkim/*******************************************************************************
73667754Smsmith *
73777424Smsmith * FUNCTION:    AcpiUtValidObjectType
73867754Smsmith *
739107325Siwasaki * PARAMETERS:  Type            - Object type to be validated
74067754Smsmith *
741151937Sjkim * RETURN:      TRUE if valid object type, FALSE otherwise
74267754Smsmith *
74367754Smsmith * DESCRIPTION: Validate an object type
74467754Smsmith *
745151937Sjkim ******************************************************************************/
74667754Smsmith
74767754SmsmithBOOLEAN
74877424SmsmithAcpiUtValidObjectType (
74991116Smsmith    ACPI_OBJECT_TYPE        Type)
75067754Smsmith{
75167754Smsmith
752107325Siwasaki    if (Type > ACPI_TYPE_LOCAL_MAX)
75367754Smsmith    {
754107325Siwasaki        /* Note: Assumes all TYPEs are contiguous (external/local) */
755107325Siwasaki
756107325Siwasaki        return (FALSE);
75767754Smsmith    }
75867754Smsmith
75967754Smsmith    return (TRUE);
76067754Smsmith}
76167754Smsmith
76267754Smsmith
763151937Sjkim/*******************************************************************************
76467754Smsmith *
765151937Sjkim * FUNCTION:    AcpiUtInitGlobals
76667754Smsmith *
767151937Sjkim * PARAMETERS:  None
76867754Smsmith *
769193267Sjkim * RETURN:      Status
77067754Smsmith *
77167754Smsmith * DESCRIPTION: Init library globals.  All globals that require specific
77267754Smsmith *              initialization should be initialized here!
77367754Smsmith *
774151937Sjkim ******************************************************************************/
77567754Smsmith
776193267SjkimACPI_STATUS
77777424SmsmithAcpiUtInitGlobals (
77867754Smsmith    void)
77967754Smsmith{
780151937Sjkim    ACPI_STATUS             Status;
78167754Smsmith    UINT32                  i;
78267754Smsmith
78367754Smsmith
784167802Sjkim    ACPI_FUNCTION_TRACE (UtInitGlobals);
78567754Smsmith
786127175Snjl
787151937Sjkim    /* Create all memory caches */
78882367Smsmith
789151937Sjkim    Status = AcpiUtCreateCaches ();
790151937Sjkim    if (ACPI_FAILURE (Status))
791151937Sjkim    {
792193267Sjkim        return_ACPI_STATUS (Status);
793151937Sjkim    }
79482367Smsmith
79567754Smsmith    /* Mutex locked flags */
79667754Smsmith
797167802Sjkim    for (i = 0; i < ACPI_NUM_MUTEX; i++)
79867754Smsmith    {
799117521Snjl        AcpiGbl_MutexInfo[i].Mutex          = NULL;
800151937Sjkim        AcpiGbl_MutexInfo[i].ThreadId       = ACPI_MUTEX_NOT_ACQUIRED;
801117521Snjl        AcpiGbl_MutexInfo[i].UseCount       = 0;
80267754Smsmith    }
80367754Smsmith
804167802Sjkim    for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++)
805167802Sjkim    {
806167802Sjkim        AcpiGbl_OwnerIdMask[i]              = 0;
807167802Sjkim    }
808167802Sjkim
809193267Sjkim    /* Last OwnerID is never valid */
810193267Sjkim
811193267Sjkim    AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000;
812193267Sjkim
813193267Sjkim    /* Event counters */
814193267Sjkim
815193267Sjkim    AcpiMethodCount                     = 0;
816193267Sjkim    AcpiSciCount                        = 0;
817193267Sjkim    AcpiGpeCount                        = 0;
818193267Sjkim
819193267Sjkim    for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
820193267Sjkim    {
821193267Sjkim        AcpiFixedEventCount[i]              = 0;
822193267Sjkim    }
823193267Sjkim
824114237Snjl    /* GPE support */
825114237Snjl
826216471Sjkim    AcpiGbl_AllGpesInitialized          = FALSE;
827117521Snjl    AcpiGbl_GpeXruptListHead            = NULL;
828117521Snjl    AcpiGbl_GpeFadtBlocks[0]            = NULL;
829117521Snjl    AcpiGbl_GpeFadtBlocks[1]            = NULL;
830193267Sjkim    AcpiCurrentGpeCount                 = 0;
831114237Snjl
832193267Sjkim    /* Global handlers */
83367754Smsmith
834117521Snjl    AcpiGbl_SystemNotify.Handler        = NULL;
835117521Snjl    AcpiGbl_DeviceNotify.Handler        = NULL;
836138287Smarks    AcpiGbl_ExceptionHandler            = NULL;
83799679Siwasaki    AcpiGbl_InitHandler                 = NULL;
838193267Sjkim    AcpiGbl_TableHandler                = NULL;
839210976Sjkim    AcpiGbl_InterfaceHandler            = NULL;
840216471Sjkim    AcpiGbl_GlobalEventHandler          = NULL;
84167754Smsmith
84267754Smsmith    /* Global Lock support */
84367754Smsmith
844167802Sjkim    AcpiGbl_GlobalLockSemaphore         = NULL;
845167802Sjkim    AcpiGbl_GlobalLockMutex             = NULL;
84667754Smsmith    AcpiGbl_GlobalLockAcquired          = FALSE;
84791116Smsmith    AcpiGbl_GlobalLockHandle            = 0;
848193267Sjkim    AcpiGbl_GlobalLockPresent           = FALSE;
84967754Smsmith
85067754Smsmith    /* Miscellaneous variables */
85167754Smsmith
852206117Sjkim    AcpiGbl_DSDT                        = NULL;
85367754Smsmith    AcpiGbl_CmSingleStep                = FALSE;
85467754Smsmith    AcpiGbl_DbTerminateThreads          = FALSE;
85567754Smsmith    AcpiGbl_Shutdown                    = FALSE;
85667754Smsmith    AcpiGbl_NsLookupCount               = 0;
85767754Smsmith    AcpiGbl_PsFindCount                 = 0;
85867754Smsmith    AcpiGbl_AcpiHardwarePresent         = TRUE;
859167802Sjkim    AcpiGbl_LastOwnerIdIndex            = 0;
860167802Sjkim    AcpiGbl_NextOwnerIdOffset           = 0;
861151937Sjkim    AcpiGbl_TraceMethodName             = 0;
862151937Sjkim    AcpiGbl_TraceDbgLevel               = 0;
863151937Sjkim    AcpiGbl_TraceDbgLayer               = 0;
86467754Smsmith    AcpiGbl_DebuggerConfiguration       = DEBUGGER_THREADING;
86591116Smsmith    AcpiGbl_DbOutputFlags               = ACPI_DB_CONSOLE_OUTPUT;
866193267Sjkim    AcpiGbl_OsiData                     = 0;
867210976Sjkim    AcpiGbl_OsiMutex                    = NULL;
86867754Smsmith
86967754Smsmith    /* Hardware oriented */
87067754Smsmith
871104470Siwasaki    AcpiGbl_EventsInitialized           = FALSE;
872129684Snjl    AcpiGbl_SystemAwakeAndRunning       = TRUE;
87367754Smsmith
87467754Smsmith    /* Namespace */
87567754Smsmith
876197104Sjkim    AcpiGbl_ModuleCodeList              = NULL;
87767754Smsmith    AcpiGbl_RootNode                    = NULL;
87899146Siwasaki    AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
879167802Sjkim    AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
880107325Siwasaki    AcpiGbl_RootNodeStruct.Type         = ACPI_TYPE_DEVICE;
881209746Sjkim    AcpiGbl_RootNodeStruct.Parent       = NULL;
88267754Smsmith    AcpiGbl_RootNodeStruct.Child        = NULL;
88367754Smsmith    AcpiGbl_RootNodeStruct.Peer         = NULL;
88467754Smsmith    AcpiGbl_RootNodeStruct.Object       = NULL;
88567754Smsmith
88667754Smsmith
887198237Sjkim#ifdef ACPI_DISASSEMBLER
888198237Sjkim    AcpiGbl_ExternalList                = NULL;
889198237Sjkim#endif
890198237Sjkim
891102550Siwasaki#ifdef ACPI_DEBUG_OUTPUT
892193267Sjkim    AcpiGbl_LowestStackPointer          = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX);
89383174Smsmith#endif
89483174Smsmith
895167802Sjkim#ifdef ACPI_DBG_TRACK_ALLOCATIONS
896167802Sjkim    AcpiGbl_DisplayFinalMemStats        = FALSE;
897209746Sjkim    AcpiGbl_DisableMemTracking          = FALSE;
898167802Sjkim#endif
899167802Sjkim
900193267Sjkim    return_ACPI_STATUS (AE_OK);
90167754Smsmith}
90267754Smsmith
903167802Sjkim/* Public globals */
90467754Smsmith
905193267SjkimACPI_EXPORT_SYMBOL (AcpiGbl_FADT)
906167802SjkimACPI_EXPORT_SYMBOL (AcpiDbgLevel)
907167802SjkimACPI_EXPORT_SYMBOL (AcpiDbgLayer)
908167802SjkimACPI_EXPORT_SYMBOL (AcpiGpeCount)
909193267SjkimACPI_EXPORT_SYMBOL (AcpiCurrentGpeCount)
910167802Sjkim
911167802Sjkim
912