utglobal.c revision 67754
1/******************************************************************************
2 *
3 * Module Name: cmglobal - Global variables for the ACPI subsystem
4 *              $Revision: 104 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, Intel Corp.  All rights
13 * reserved.
14 *
15 * 2. License
16 *
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights.  You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
20 * property rights.
21 *
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
28 *
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code.  No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
37 *
38 * The above copyright and patent license is granted only if the following
39 * conditions are met:
40 *
41 * 3. Conditions
42 *
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision.  In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change.  Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee.  Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
54 *
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution.  In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
65 * make.
66 *
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
71 * distribution.
72 *
73 * 3.4. Intel retains all right, title, and interest in and to the Original
74 * Intel Code.
75 *
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
80 *
81 * 4. Disclaimer and Export Compliance
82 *
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89 * PARTICULAR PURPOSE.
90 *
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98 * LIMITED REMEDY.
99 *
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government.  In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
114 *
115 *****************************************************************************/
116
117#define __CMGLOBAL_C__
118#define DEFINE_ACPI_GLOBALS
119
120#include "acpi.h"
121#include "acevents.h"
122#include "acnamesp.h"
123#include "acinterp.h"
124
125
126#define _COMPONENT          MISCELLANEOUS
127        MODULE_NAME         ("cmglobal")
128
129
130/******************************************************************************
131 *
132 * Static global variable initialization.
133 *
134 ******************************************************************************/
135
136/*
137 * We want the debug switches statically initialized so they
138 * are already set when the debugger is entered.
139 */
140
141/* Debug switch - level and trace mask */
142
143#ifdef ACPI_DEBUG
144UINT32                      AcpiDbgLevel = DEBUG_DEFAULT;
145#else
146UINT32                      AcpiDbgLevel = NORMAL_DEFAULT;
147#endif
148
149/* Debug switch - layer (component) mask */
150
151UINT32                      AcpiDbgLayer = COMPONENT_DEFAULT;
152UINT32                      AcpiGbl_NestingLevel = 0;
153
154
155/* Debugger globals */
156
157BOOLEAN                     AcpiGbl_DbTerminateThreads = FALSE;
158BOOLEAN                     AcpiGbl_MethodExecuting = FALSE;
159
160/* System flags */
161
162UINT32                      AcpiGbl_SystemFlags = 0;
163UINT32                      AcpiGbl_StartupFlags = 0;
164
165/* System starts unitialized! */
166BOOLEAN                     AcpiGbl_Shutdown = TRUE;
167
168
169/******************************************************************************
170 *
171 * Namespace globals
172 *
173 ******************************************************************************/
174
175
176/*
177 * Names built-in to the interpreter
178 *
179 * Initial values are currently supported only for types String and Number.
180 * To avoid type punning, both are specified as strings in this table.
181 */
182
183PREDEFINED_NAMES            AcpiGbl_PreDefinedNames[] =
184{
185    {"_GPE",    INTERNAL_TYPE_DEF_ANY},
186    {"_PR_",    INTERNAL_TYPE_DEF_ANY},
187    {"_SB_",    INTERNAL_TYPE_DEF_ANY},
188    {"_SI_",    INTERNAL_TYPE_DEF_ANY},
189    {"_TZ_",    INTERNAL_TYPE_DEF_ANY},
190    {"_REV",    ACPI_TYPE_NUMBER, "2"},
191    {"_OS_",    ACPI_TYPE_STRING, ACPI_OS_NAME},
192    {"_GL_",    ACPI_TYPE_MUTEX, "0"},
193
194    /* Table terminator */
195
196    {NULL,      ACPI_TYPE_ANY}
197};
198
199
200/*
201 * Properties of the ACPI Object Types, both internal and external.
202 *
203 * Elements of AcpiNsProperties are bit significant
204 * and the table is indexed by values of ACPI_OBJECT_TYPE
205 */
206
207UINT8                       AcpiGbl_NsProperties[] =
208{
209    NSP_NORMAL,                 /* 00 Any              */
210    NSP_NORMAL,                 /* 01 Number           */
211    NSP_NORMAL,                 /* 02 String           */
212    NSP_NORMAL,                 /* 03 Buffer           */
213    NSP_LOCAL,                  /* 04 Package          */
214    NSP_NORMAL,                 /* 05 FieldUnit        */
215    NSP_NEWSCOPE | NSP_LOCAL,   /* 06 Device           */
216    NSP_LOCAL,                  /* 07 AcpiEvent        */
217    NSP_NEWSCOPE | NSP_LOCAL,   /* 08 Method           */
218    NSP_LOCAL,                  /* 09 Mutex            */
219    NSP_LOCAL,                  /* 10 Region           */
220    NSP_NEWSCOPE | NSP_LOCAL,   /* 11 Power            */
221    NSP_NEWSCOPE | NSP_LOCAL,   /* 12 Processor        */
222    NSP_NEWSCOPE | NSP_LOCAL,   /* 13 Thermal          */
223    NSP_NORMAL,                 /* 14 BufferField      */
224    NSP_NORMAL,                 /* 15 DdbHandle        */
225    NSP_NORMAL,                 /* 16 Debug Object     */
226    NSP_NORMAL,                 /* 17 DefField         */
227    NSP_NORMAL,                 /* 18 BankField        */
228    NSP_NORMAL,                 /* 19 IndexField       */
229    NSP_NORMAL,                 /* 20 Reference        */
230    NSP_NORMAL,                 /* 21 Alias            */
231    NSP_NORMAL,                 /* 22 Notify           */
232    NSP_NORMAL,                 /* 23 Address Handler  */
233    NSP_NORMAL,                 /* 24 DefFieldDefn     */
234    NSP_NORMAL,                 /* 25 BankFieldDefn    */
235    NSP_NORMAL,                 /* 26 IndexFieldDefn   */
236    NSP_NORMAL,                 /* 27 If               */
237    NSP_NORMAL,                 /* 28 Else             */
238    NSP_NORMAL,                 /* 29 While            */
239    NSP_NEWSCOPE,               /* 30 Scope            */
240    NSP_LOCAL,                  /* 31 DefAny           */
241    NSP_NORMAL,                 /* 32 Method Arg       */
242    NSP_NORMAL,                 /* 33 Method Local     */
243    NSP_NORMAL,                 /* 34 Extra            */
244    NSP_NORMAL                  /* 35 Invalid          */
245};
246
247
248/******************************************************************************
249 *
250 * Table globals
251 *
252 ******************************************************************************/
253
254
255ACPI_TABLE_DESC             AcpiGbl_AcpiTables[NUM_ACPI_TABLES];
256
257
258ACPI_TABLE_SUPPORT          AcpiGbl_AcpiTableData[NUM_ACPI_TABLES] =
259{
260                 /* Name,   Signature,  Signature size,    How many allowed?,   Supported?  Global typed pointer */
261
262    /* RSDP 0 */ {"RSDP",   RSDP_SIG, sizeof (RSDP_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      NULL},
263    /* APIC 1 */ {APIC_SIG, APIC_SIG, sizeof (APIC_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      (void **) &AcpiGbl_APIC},
264    /* DSDT 2 */ {DSDT_SIG, DSDT_SIG, sizeof (DSDT_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      (void **) &AcpiGbl_DSDT},
265    /* FACP 3 */ {FACP_SIG, FACP_SIG, sizeof (FACP_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      (void **) &AcpiGbl_FACP},
266    /* FACS 4 */ {FACS_SIG, FACS_SIG, sizeof (FACS_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      (void **) &AcpiGbl_FACS},
267    /* PSDT 5 */ {PSDT_SIG, PSDT_SIG, sizeof (PSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK,      NULL},
268    /* RSDT 6 */ {RSDT_SIG, RSDT_SIG, sizeof (RSDT_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      NULL},
269    /* SSDT 7 */ {SSDT_SIG, SSDT_SIG, sizeof (SSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK,      NULL},
270    /* SBST 8 */ {SBST_SIG, SBST_SIG, sizeof (SBST_SIG)-1, ACPI_TABLE_SINGLE,   AE_OK,      (void **) &AcpiGbl_SBST},
271    /* SPIC 9 */ {SPIC_SIG, SPIC_SIG, sizeof (SPIC_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK,      NULL},
272    /* BOOT 10 */{BOOT_SIG, BOOT_SIG, sizeof (BOOT_SIG)-1, ACPI_TABLE_SINGLE,   AE_SUPPORT, NULL}
273};
274
275
276#ifdef ACPI_DEBUG
277
278/******************************************************************************
279 *
280 * Strings and procedures used for debug only
281 *
282 ******************************************************************************/
283
284NATIVE_CHAR                 *MsgAcpiErrorBreak = "*** Break on ACPI_ERROR ***\n";
285
286
287/*****************************************************************************
288 *
289 * FUNCTION:    AcpiCmGetMutexName
290 *
291 * PARAMETERS:  None.
292 *
293 * RETURN:      Status
294 *
295 * DESCRIPTION: Translate a mutex ID into a name string (Debug only)
296 *
297 ****************************************************************************/
298
299NATIVE_CHAR *
300AcpiCmGetMutexName (
301    UINT32                  MutexId)
302{
303
304    if (MutexId > MAX_MTX)
305    {
306        return ("Invalid Mutex ID");
307    }
308
309    return (AcpiGbl_MutexNames[MutexId]);
310}
311
312
313/*
314 * Elements of AcpiGbl_NsTypeNames below must match
315 * one-to-one with values of ACPI_OBJECT_TYPE
316 *
317 * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching; when
318 * stored in a table it really means that we have thus far seen no evidence to
319 * indicatewhat type is actually going to be stored for this entry.
320 */
321
322static NATIVE_CHAR          AcpiGbl_BadType[] = "UNDEFINED";
323#define TYPE_NAME_LENGTH    9                       /* Maximum length of each string */
324
325static NATIVE_CHAR          *AcpiGbl_NsTypeNames[] =    /* printable names of ACPI types */
326{
327    /* 00 */ "Untyped",
328    /* 01 */ "Number",
329    /* 02 */ "String",
330    /* 03 */ "Buffer",
331    /* 04 */ "Package",
332    /* 05 */ "FieldUnit",
333    /* 06 */ "Device",
334    /* 07 */ "Event",
335    /* 08 */ "Method",
336    /* 09 */ "Mutex",
337    /* 10 */ "Region",
338    /* 11 */ "Power",
339    /* 12 */ "Processor",
340    /* 13 */ "Thermal",
341    /* 14 */ "BufferFld",
342    /* 15 */ "DdbHandle",
343    /* 16 */ "DebugObj",
344    /* 17 */ "DefField",
345    /* 18 */ "BnkField",
346    /* 19 */ "IdxField",
347    /* 20 */ "Reference",
348    /* 21 */ "Alias",
349    /* 22 */ "Notify",
350    /* 23 */ "AddrHndlr",
351    /* 24 */ "DefFldDfn",
352    /* 25 */ "BnkFldDfn",
353    /* 26 */ "IdxFldDfn",
354    /* 27 */ "If",
355    /* 28 */ "Else",
356    /* 29 */ "While",
357    /* 30 */ "Scope",
358    /* 31 */ "DefAny",
359    /* 32 */ "MethodArg",
360    /* 33 */ "MethodLcl",
361    /* 34 */ "Extra",
362    /* 35 */ "Invalid"
363};
364
365
366/*****************************************************************************
367 *
368 * FUNCTION:    AcpiCmGetTypeName
369 *
370 * PARAMETERS:  None.
371 *
372 * RETURN:      Status
373 *
374 * DESCRIPTION: Translate a Type ID into a name string (Debug only)
375 *
376 ****************************************************************************/
377
378NATIVE_CHAR *
379AcpiCmGetTypeName (
380    UINT32                  Type)
381{
382
383    if (Type > INTERNAL_TYPE_INVALID)
384    {
385        return (AcpiGbl_BadType);
386    }
387
388    return (AcpiGbl_NsTypeNames[Type]);
389}
390
391#endif
392
393
394/*****************************************************************************
395 *
396 * FUNCTION:    AcpiCmValidObjectType
397 *
398 * PARAMETERS:  None.
399 *
400 * RETURN:      TRUE if valid object type
401 *
402 * DESCRIPTION: Validate an object type
403 *
404 ****************************************************************************/
405
406BOOLEAN
407AcpiCmValidObjectType (
408    UINT32                  Type)
409{
410
411    if (Type > ACPI_TYPE_MAX)
412    {
413        if ((Type < INTERNAL_TYPE_BEGIN) ||
414            (Type > INTERNAL_TYPE_MAX))
415        {
416            return (FALSE);
417        }
418    }
419
420    return (TRUE);
421}
422
423
424/*****************************************************************************
425 *
426 * FUNCTION:    AcpiCmFormatException
427 *
428 * PARAMETERS:  Status              - Acpi status to be formatted
429 *
430 * RETURN:      Formatted status string
431 *
432 * DESCRIPTION: Convert an ACPI exception to a string
433 *
434 ****************************************************************************/
435
436NATIVE_CHAR *
437AcpiCmFormatException (
438    ACPI_STATUS             Status)
439{
440    NATIVE_CHAR             *Exception = "UNKNOWN_STATUS";
441    ACPI_STATUS             SubStatus;
442
443
444    SubStatus = (Status & ~AE_CODE_MASK);
445
446
447    switch (Status & AE_CODE_MASK)
448    {
449    case AE_CODE_ENVIRONMENTAL:
450
451        if (SubStatus <= AE_CODE_ENV_MAX)
452        {
453            Exception = AcpiGbl_ExceptionNames_Env [SubStatus];
454        }
455        break;
456
457    case AE_CODE_PROGRAMMER:
458
459        if (SubStatus <= AE_CODE_PGM_MAX)
460        {
461            Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus -1];
462        }
463        break;
464
465    case AE_CODE_ACPI_TABLES:
466
467        if (SubStatus <= AE_CODE_TBL_MAX)
468        {
469            Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus -1];
470        }
471        break;
472
473    case AE_CODE_AML:
474
475        if (SubStatus <= AE_CODE_AML_MAX)
476        {
477            Exception = AcpiGbl_ExceptionNames_Aml [SubStatus -1];
478        }
479        break;
480
481    case AE_CODE_CONTROL:
482
483        if (SubStatus <= AE_CODE_CTRL_MAX)
484        {
485            Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus -1];
486        }
487        break;
488
489    default:
490        break;
491    }
492
493
494    return (Exception);
495}
496
497
498/****************************************************************************
499 *
500 * FUNCTION:    AcpiCmAllocateOwnerId
501 *
502 * PARAMETERS:  IdType          - Type of ID (method or table)
503 *
504 * DESCRIPTION: Allocate a table or method owner id
505 *
506 ***************************************************************************/
507
508ACPI_OWNER_ID
509AcpiCmAllocateOwnerId (
510    UINT32                  IdType)
511{
512    ACPI_OWNER_ID           OwnerId = 0xFFFF;
513
514
515    FUNCTION_TRACE ("CmAllocateOwnerId");
516
517
518    AcpiCmAcquireMutex (ACPI_MTX_CACHES);
519
520    switch (IdType)
521    {
522    case OWNER_TYPE_TABLE:
523
524        OwnerId = AcpiGbl_NextTableOwnerId;
525        AcpiGbl_NextTableOwnerId++;
526
527        if (AcpiGbl_NextTableOwnerId == FIRST_METHOD_ID)
528        {
529            AcpiGbl_NextTableOwnerId = FIRST_TABLE_ID;
530        }
531        break;
532
533
534    case OWNER_TYPE_METHOD:
535
536        OwnerId = AcpiGbl_NextMethodOwnerId;
537        AcpiGbl_NextMethodOwnerId++;
538
539        if (AcpiGbl_NextMethodOwnerId == FIRST_TABLE_ID)
540        {
541            AcpiGbl_NextMethodOwnerId = FIRST_METHOD_ID;
542        }
543        break;
544    }
545
546
547    AcpiCmReleaseMutex (ACPI_MTX_CACHES);
548
549    return_VALUE (OwnerId);
550}
551
552
553/****************************************************************************
554 *
555 * FUNCTION:    AcpiCmInitGlobals
556 *
557 * PARAMETERS:  none
558 *
559 * DESCRIPTION: Init library globals.  All globals that require specific
560 *              initialization should be initialized here!
561 *
562 ***************************************************************************/
563
564void
565AcpiCmInitGlobals (
566    void)
567{
568    UINT32                  i;
569
570
571    FUNCTION_TRACE ("CmInitGlobals");
572
573
574    /* ACPI table structure */
575
576    for (i = 0; i < NUM_ACPI_TABLES; i++)
577    {
578        AcpiGbl_AcpiTables[i].Prev          = &AcpiGbl_AcpiTables[i];
579        AcpiGbl_AcpiTables[i].Next          = &AcpiGbl_AcpiTables[i];
580        AcpiGbl_AcpiTables[i].Pointer       = NULL;
581        AcpiGbl_AcpiTables[i].Length        = 0;
582        AcpiGbl_AcpiTables[i].Allocation    = ACPI_MEM_NOT_ALLOCATED;
583        AcpiGbl_AcpiTables[i].Count         = 0;
584    }
585
586
587    /* Address Space handler array */
588
589    for (i = 0; i < ACPI_NUM_ADDRESS_SPACES; i++)
590    {
591        AcpiGbl_AddressSpaces[i].Handler    = NULL;
592        AcpiGbl_AddressSpaces[i].Context    = NULL;
593    }
594
595    /* Mutex locked flags */
596
597    for (i = 0; i < NUM_MTX; i++)
598    {
599        AcpiGbl_AcpiMutexInfo[i].Mutex      = NULL;
600        AcpiGbl_AcpiMutexInfo[i].Locked     = FALSE;
601        AcpiGbl_AcpiMutexInfo[i].UseCount   = 0;
602    }
603
604    /* Global notify handlers */
605
606    AcpiGbl_SysNotify.Handler           = NULL;
607    AcpiGbl_DrvNotify.Handler           = NULL;
608
609    /* Global "typed" ACPI table pointers */
610
611    AcpiGbl_RSDP                        = NULL;
612    AcpiGbl_RSDT                        = NULL;
613    AcpiGbl_FACS                        = NULL;
614    AcpiGbl_FACP                        = NULL;
615    AcpiGbl_APIC                        = NULL;
616    AcpiGbl_DSDT                        = NULL;
617    AcpiGbl_SBST                        = NULL;
618
619
620    /* Global Lock support */
621
622    AcpiGbl_GlobalLockAcquired          = FALSE;
623    AcpiGbl_GlobalLockThreadCount       = 0;
624
625    /* Miscellaneous variables */
626
627    AcpiGbl_SystemFlags                 = 0;
628    AcpiGbl_StartupFlags                = 0;
629    AcpiGbl_GlobalLockSet               = FALSE;
630    AcpiGbl_RsdpOriginalLocation        = 0;
631    AcpiGbl_WhenToParseMethods          = METHOD_PARSE_CONFIGURATION;
632    AcpiGbl_CmSingleStep                = FALSE;
633    AcpiGbl_DbTerminateThreads          = FALSE;
634    AcpiGbl_Shutdown                    = FALSE;
635    AcpiGbl_NsLookupCount               = 0;
636    AcpiGbl_PsFindCount                 = 0;
637    AcpiGbl_AcpiHardwarePresent         = TRUE;
638    AcpiGbl_NextTableOwnerId            = FIRST_TABLE_ID;
639    AcpiGbl_NextMethodOwnerId           = FIRST_METHOD_ID;
640    AcpiGbl_DebuggerConfiguration       = DEBUGGER_THREADING;
641
642    /* Cache of small "state" objects */
643
644    AcpiGbl_GenericStateCache           = NULL;
645    AcpiGbl_GenericStateCacheDepth      = 0;
646    AcpiGbl_StateCacheRequests          = 0;
647    AcpiGbl_StateCacheHits              = 0;
648
649    AcpiGbl_ParseCache                  = NULL;
650    AcpiGbl_ParseCacheDepth             = 0;
651    AcpiGbl_ParseCacheRequests          = 0;
652    AcpiGbl_ParseCacheHits              = 0;
653
654    AcpiGbl_ExtParseCache               = NULL;
655    AcpiGbl_ExtParseCacheDepth          = 0;
656    AcpiGbl_ExtParseCacheRequests       = 0;
657    AcpiGbl_ExtParseCacheHits           = 0;
658
659    AcpiGbl_ObjectCache                 = NULL;
660    AcpiGbl_ObjectCacheDepth            = 0;
661    AcpiGbl_ObjectCacheRequests         = 0;
662    AcpiGbl_ObjectCacheHits             = 0;
663
664    AcpiGbl_WalkStateCache              = NULL;
665    AcpiGbl_WalkStateCacheDepth         = 0;
666    AcpiGbl_WalkStateCacheRequests      = 0;
667    AcpiGbl_WalkStateCacheHits          = 0;
668
669    /* Interpreter */
670
671    AcpiGbl_BufSeq                      = 0;
672    AcpiGbl_NodeErr                     = FALSE;
673
674    /* Parser */
675
676    AcpiGbl_ParsedNamespaceRoot         = NULL;
677
678    /* Hardware oriented */
679
680    AcpiGbl_Gpe0EnableRegisterSave      = NULL;
681    AcpiGbl_Gpe1EnableRegisterSave      = NULL;
682    AcpiGbl_OriginalMode                = SYS_MODE_UNKNOWN;   /*  original ACPI/legacy mode   */
683    AcpiGbl_GpeRegisters                = NULL;
684    AcpiGbl_GpeInfo                     = NULL;
685
686    /* Namespace */
687
688    AcpiGbl_RootNode                    = NULL;
689
690    AcpiGbl_RootNodeStruct.Name         = ACPI_ROOT_NAME;
691    AcpiGbl_RootNodeStruct.DataType     = ACPI_DESC_TYPE_NAMED;
692    AcpiGbl_RootNodeStruct.Type         = ACPI_TYPE_ANY;
693    AcpiGbl_RootNodeStruct.Child        = NULL;
694    AcpiGbl_RootNodeStruct.Peer         = NULL;
695    AcpiGbl_RootNodeStruct.Object       = NULL;
696    AcpiGbl_RootNodeStruct.Flags        = ANOBJ_END_OF_PEER_LIST;
697
698    /* Memory allocation metrics - compiled out in non-debug mode. */
699
700    INITIALIZE_ALLOCATION_METRICS();
701
702    return_VOID;
703}
704
705
706