utglobal.c revision 193341
167754Smsmith/****************************************************************************** 267754Smsmith * 377424Smsmith * Module Name: utglobal - Global variables for the ACPI subsystem 467754Smsmith * 567754Smsmith *****************************************************************************/ 667754Smsmith 767754Smsmith/****************************************************************************** 867754Smsmith * 967754Smsmith * 1. Copyright Notice 1067754Smsmith * 11193267Sjkim * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. 1270243Smsmith * All rights reserved. 1367754Smsmith * 1467754Smsmith * 2. License 1567754Smsmith * 1667754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property 1767754Smsmith * rights. You may have additional license terms from the party that provided 1867754Smsmith * you this software, covering your right to use that party's intellectual 1967754Smsmith * property rights. 2067754Smsmith * 2167754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2267754Smsmith * copy of the source code appearing in this file ("Covered Code") an 2367754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2467754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy, 2567754Smsmith * make derivatives, distribute, use and display any portion of the Covered 2667754Smsmith * Code in any form, with the right to sublicense such rights; and 2767754Smsmith * 2867754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 2967754Smsmith * license (with the right to sublicense), under only those claims of Intel 3067754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell, 3167754Smsmith * offer to sell, and import the Covered Code and derivative works thereof 3267754Smsmith * solely to the minimum extent necessary to exercise the above copyright 3367754Smsmith * license, and in no event shall the patent license extend to any additions 3467754Smsmith * to or modifications of the Original Intel Code. No other license or right 3567754Smsmith * is granted directly or by implication, estoppel or otherwise; 3667754Smsmith * 3767754Smsmith * The above copyright and patent license is granted only if the following 3867754Smsmith * conditions are met: 3967754Smsmith * 4067754Smsmith * 3. Conditions 4167754Smsmith * 4267754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4367754Smsmith * Redistribution of source code of any substantial portion of the Covered 4467754Smsmith * Code or modification with rights to further distribute source must include 4567754Smsmith * the above Copyright Notice, the above License, this list of Conditions, 4667754Smsmith * and the following Disclaimer and Export Compliance provision. In addition, 4767754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to 4867754Smsmith * contain a file documenting the changes Licensee made to create that Covered 4967754Smsmith * Code and the date of any change. Licensee must include in that file the 5067754Smsmith * documentation of any changes made by any predecessor Licensee. Licensee 5167754Smsmith * must include a prominent statement that the modification is derived, 5267754Smsmith * directly or indirectly, from Original Intel Code. 5367754Smsmith * 5467754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5567754Smsmith * Redistribution of source code of any substantial portion of the Covered 5667754Smsmith * Code or modification without rights to further distribute source must 5767754Smsmith * include the following Disclaimer and Export Compliance provision in the 5867754Smsmith * documentation and/or other materials provided with distribution. In 5967754Smsmith * addition, Licensee may not authorize further sublicense of source of any 6067754Smsmith * portion of the Covered Code, and must include terms to the effect that the 6167754Smsmith * license from Licensee to its licensee is limited to the intellectual 6267754Smsmith * property embodied in the software Licensee provides to its licensee, and 6367754Smsmith * not to intellectual property embodied in modifications its licensee may 6467754Smsmith * make. 6567754Smsmith * 6667754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any 6767754Smsmith * substantial portion of the Covered Code or modification must reproduce the 6867754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance 6967754Smsmith * provision in the documentation and/or other materials provided with the 7067754Smsmith * distribution. 7167754Smsmith * 7267754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original 7367754Smsmith * Intel Code. 7467754Smsmith * 7567754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by 7667754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or 7767754Smsmith * other dealings in products derived from or relating to the Covered Code 7867754Smsmith * without prior written authorization from Intel. 7967754Smsmith * 8067754Smsmith * 4. Disclaimer and Export Compliance 8167754Smsmith * 8267754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8367754Smsmith * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8467754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8567754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8667754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8767754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8867754Smsmith * PARTICULAR PURPOSE. 8967754Smsmith * 9067754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9167754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9267754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 9367754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9467754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9567754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9667754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9767754Smsmith * LIMITED REMEDY. 9867754Smsmith * 9967754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this 10067754Smsmith * software or system incorporating such software without first obtaining any 10167754Smsmith * required license or other approval from the U. S. Department of Commerce or 10267754Smsmith * any other agency or department of the United States Government. In the 10367754Smsmith * event Licensee exports any such software from the United States or 10467754Smsmith * re-exports any such software from a foreign destination, Licensee shall 10567754Smsmith * ensure that the distribution and export/re-export of the software is in 10667754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the 10767754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10867754Smsmith * any of its subsidiaries will export/re-export any technical data, process, 10967754Smsmith * software, or service, directly or indirectly, to any country for which the 11067754Smsmith * United States government or any agency thereof requires an export license, 11167754Smsmith * other governmental approval, or letter of assurance, without first obtaining 11267754Smsmith * such license, approval or letter. 11367754Smsmith * 11467754Smsmith *****************************************************************************/ 11567754Smsmith 11677424Smsmith#define __UTGLOBAL_C__ 11767754Smsmith#define DEFINE_ACPI_GLOBALS 11867754Smsmith 119193341Sjkim#include <contrib/dev/acpica/include/acpi.h> 120193341Sjkim#include <contrib/dev/acpica/include/accommon.h> 121193341Sjkim#include <contrib/dev/acpica/include/acnamesp.h> 12267754Smsmith 12377424Smsmith#define _COMPONENT ACPI_UTILITIES 12491116Smsmith ACPI_MODULE_NAME ("utglobal") 12567754Smsmith 12667754Smsmith 127151937Sjkim/******************************************************************************* 12867754Smsmith * 12967754Smsmith * Static global variable initialization. 13067754Smsmith * 13167754Smsmith ******************************************************************************/ 13267754Smsmith 13367754Smsmith/* 13467754Smsmith * We want the debug switches statically initialized so they 13567754Smsmith * are already set when the debugger is entered. 13667754Smsmith */ 13767754Smsmith 13867754Smsmith/* Debug switch - level and trace mask */ 13967754Smsmith 140102550Siwasaki#ifdef ACPI_DEBUG_OUTPUT 141114237SnjlUINT32 AcpiDbgLevel = ACPI_DEBUG_DEFAULT; 14267754Smsmith#else 143114237SnjlUINT32 AcpiDbgLevel = ACPI_NORMAL_DEFAULT; 14467754Smsmith#endif 14567754Smsmith 14667754Smsmith/* Debug switch - layer (component) mask */ 14767754Smsmith 14877424SmsmithUINT32 AcpiDbgLayer = ACPI_COMPONENT_DEFAULT; 14967754SmsmithUINT32 AcpiGbl_NestingLevel = 0; 15067754Smsmith 15167754Smsmith/* Debugger globals */ 15267754Smsmith 15367754SmsmithBOOLEAN AcpiGbl_DbTerminateThreads = FALSE; 154114237SnjlBOOLEAN AcpiGbl_AbortMethod = FALSE; 15567754SmsmithBOOLEAN AcpiGbl_MethodExecuting = FALSE; 15667754Smsmith 15767754Smsmith/* System flags */ 15867754Smsmith 15967754SmsmithUINT32 AcpiGbl_StartupFlags = 0; 16067754Smsmith 16187031Smsmith/* System starts uninitialized */ 16283174Smsmith 16367754SmsmithBOOLEAN AcpiGbl_Shutdown = TRUE; 16467754Smsmith 165129684Snjlconst char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] = 166129684Snjl{ 167129684Snjl "\\_S0_", 168129684Snjl "\\_S1_", 169129684Snjl "\\_S2_", 170129684Snjl "\\_S3_", 171129684Snjl "\\_S4_", 172129684Snjl "\\_S5_" 173129684Snjl}; 17469450Smsmith 175129684Snjlconst char *AcpiGbl_HighestDstateNames[4] = 176129684Snjl{ 177129684Snjl "_S1D", 178129684Snjl "_S2D", 179129684Snjl "_S3D", 180129684Snjl "_S4D" 181129684Snjl}; 18269450Smsmith 183167802Sjkim 184167802Sjkim/******************************************************************************* 185167802Sjkim * 186167802Sjkim * FUNCTION: AcpiFormatException 187167802Sjkim * 188167802Sjkim * PARAMETERS: Status - The ACPI_STATUS code to be formatted 189167802Sjkim * 190167802Sjkim * RETURN: A string containing the exception text. A valid pointer is 191167802Sjkim * always returned. 192167802Sjkim * 193167802Sjkim * DESCRIPTION: This function translates an ACPI exception into an ASCII string 194167802Sjkim * It is here instead of utxface.c so it is always present. 195167802Sjkim * 196167802Sjkim ******************************************************************************/ 197167802Sjkim 198167802Sjkimconst char * 199167802SjkimAcpiFormatException ( 200167802Sjkim ACPI_STATUS Status) 201129684Snjl{ 202167802Sjkim const char *Exception = NULL; 203151937Sjkim 204151937Sjkim 205167802Sjkim ACPI_FUNCTION_ENTRY (); 206151937Sjkim 207127175Snjl 208167802Sjkim Exception = AcpiUtValidateException (Status); 209167802Sjkim if (!Exception) 210167802Sjkim { 211167802Sjkim /* Exception code was not recognized */ 212127175Snjl 213167802Sjkim ACPI_ERROR ((AE_INFO, 214167802Sjkim "Unknown exception code: 0x%8.8X", Status)); 215167802Sjkim 216167802Sjkim Exception = "UNKNOWN_STATUS_CODE"; 217167802Sjkim } 218167802Sjkim 219167802Sjkim return (ACPI_CAST_PTR (const char, Exception)); 220167802Sjkim} 221167802Sjkim 222167802SjkimACPI_EXPORT_SYMBOL (AcpiFormatException) 223167802Sjkim 224167802Sjkim 225151937Sjkim/******************************************************************************* 22667754Smsmith * 22767754Smsmith * Namespace globals 22867754Smsmith * 22967754Smsmith ******************************************************************************/ 23067754Smsmith 23167754Smsmith/* 232104470Siwasaki * Predefined ACPI Names (Built-in to the Interpreter) 23367754Smsmith * 23477424Smsmith * NOTES: 235127175Snjl * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run 23677424Smsmith * during the initialization sequence. 237151937Sjkim * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to 238151937Sjkim * perform a Notify() operation on it. 23967754Smsmith */ 24091116Smsmithconst ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = 24167754Smsmith{ 242107325Siwasaki {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL}, 243107325Siwasaki {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL}, 24499679Siwasaki {"_SB_", ACPI_TYPE_DEVICE, NULL}, 245107325Siwasaki {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL}, 246129684Snjl {"_TZ_", ACPI_TYPE_THERMAL, NULL}, 247151937Sjkim {"_REV", ACPI_TYPE_INTEGER, (char *) ACPI_CA_SUPPORT_LEVEL}, 24899146Siwasaki {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, 249151937Sjkim {"_GL_", ACPI_TYPE_MUTEX, (char *) 1}, 250102550Siwasaki 251127175Snjl#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY) 252151937Sjkim {"_OSI", ACPI_TYPE_METHOD, (char *) 1}, 253102550Siwasaki#endif 254151937Sjkim 255151937Sjkim /* Table terminator */ 256151937Sjkim 257151937Sjkim {NULL, ACPI_TYPE_ANY, NULL} 25867754Smsmith}; 25967754Smsmith 26067754Smsmith/* 26167754Smsmith * Properties of the ACPI Object Types, both internal and external. 262104470Siwasaki * The table is indexed by values of ACPI_OBJECT_TYPE 26367754Smsmith */ 264193267Sjkimconst UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] = 26567754Smsmith{ 26691116Smsmith ACPI_NS_NORMAL, /* 00 Any */ 26791116Smsmith ACPI_NS_NORMAL, /* 01 Number */ 26891116Smsmith ACPI_NS_NORMAL, /* 02 String */ 26991116Smsmith ACPI_NS_NORMAL, /* 03 Buffer */ 27099146Siwasaki ACPI_NS_NORMAL, /* 04 Package */ 27191116Smsmith ACPI_NS_NORMAL, /* 05 FieldUnit */ 27299146Siwasaki ACPI_NS_NEWSCOPE, /* 06 Device */ 27399146Siwasaki ACPI_NS_NORMAL, /* 07 Event */ 27499146Siwasaki ACPI_NS_NEWSCOPE, /* 08 Method */ 27599146Siwasaki ACPI_NS_NORMAL, /* 09 Mutex */ 27699146Siwasaki ACPI_NS_NORMAL, /* 10 Region */ 27799146Siwasaki ACPI_NS_NEWSCOPE, /* 11 Power */ 27899146Siwasaki ACPI_NS_NEWSCOPE, /* 12 Processor */ 27999146Siwasaki ACPI_NS_NEWSCOPE, /* 13 Thermal */ 28091116Smsmith ACPI_NS_NORMAL, /* 14 BufferField */ 28191116Smsmith ACPI_NS_NORMAL, /* 15 DdbHandle */ 28291116Smsmith ACPI_NS_NORMAL, /* 16 Debug Object */ 28391116Smsmith ACPI_NS_NORMAL, /* 17 DefField */ 28491116Smsmith ACPI_NS_NORMAL, /* 18 BankField */ 28591116Smsmith ACPI_NS_NORMAL, /* 19 IndexField */ 28691116Smsmith ACPI_NS_NORMAL, /* 20 Reference */ 28791116Smsmith ACPI_NS_NORMAL, /* 21 Alias */ 288128212Snjl ACPI_NS_NORMAL, /* 22 MethodAlias */ 289128212Snjl ACPI_NS_NORMAL, /* 23 Notify */ 290128212Snjl ACPI_NS_NORMAL, /* 24 Address Handler */ 291128212Snjl ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */ 292128212Snjl ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */ 293128212Snjl ACPI_NS_NEWSCOPE, /* 27 Scope */ 294128212Snjl ACPI_NS_NORMAL, /* 28 Extra */ 295128212Snjl ACPI_NS_NORMAL, /* 29 Data */ 296128212Snjl ACPI_NS_NORMAL /* 30 Invalid */ 29767754Smsmith}; 29867754Smsmith 29967754Smsmith 30071867Smsmith/* Hex to ASCII conversion table */ 30171867Smsmith 302114237Snjlstatic const char AcpiGbl_HexToAscii[] = 303151937Sjkim{ 304151937Sjkim '0','1','2','3','4','5','6','7', 305151937Sjkim '8','9','A','B','C','D','E','F' 306151937Sjkim}; 30771867Smsmith 308151937Sjkim 309151937Sjkim/******************************************************************************* 31083174Smsmith * 31183174Smsmith * FUNCTION: AcpiUtHexToAsciiChar 31283174Smsmith * 31383174Smsmith * PARAMETERS: Integer - Contains the hex digit 31483174Smsmith * Position - bit position of the digit within the 315151937Sjkim * integer (multiple of 4) 31683174Smsmith * 317151937Sjkim * RETURN: The converted Ascii character 31883174Smsmith * 319151937Sjkim * DESCRIPTION: Convert a hex digit to an Ascii character 32083174Smsmith * 321151937Sjkim ******************************************************************************/ 32283174Smsmith 32399679Siwasakichar 32482367SmsmithAcpiUtHexToAsciiChar ( 32582367Smsmith ACPI_INTEGER Integer, 32682367Smsmith UINT32 Position) 32782367Smsmith{ 32871867Smsmith 32982367Smsmith return (AcpiGbl_HexToAscii[(Integer >> Position) & 0xF]); 33082367Smsmith} 33182367Smsmith 33283174Smsmith 33391116Smsmith/****************************************************************************** 33491116Smsmith * 33591116Smsmith * Event and Hardware globals 33691116Smsmith * 33791116Smsmith ******************************************************************************/ 33891116Smsmith 33991116SmsmithACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG] = 34091116Smsmith{ 34191116Smsmith /* Name Parent Register Register Bit Position Register Bit Mask */ 34291116Smsmith 34391116Smsmith /* ACPI_BITREG_TIMER_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_TIMER_STATUS, ACPI_BITMASK_TIMER_STATUS}, 34491116Smsmith /* ACPI_BITREG_BUS_MASTER_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_BUS_MASTER_STATUS, ACPI_BITMASK_BUS_MASTER_STATUS}, 34591116Smsmith /* ACPI_BITREG_GLOBAL_LOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_STATUS}, 34691116Smsmith /* ACPI_BITREG_POWER_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_STATUS}, 34791116Smsmith /* ACPI_BITREG_SLEEP_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_STATUS}, 34891116Smsmith /* ACPI_BITREG_RT_CLOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_STATUS}, 34991116Smsmith /* ACPI_BITREG_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_WAKE_STATUS, ACPI_BITMASK_WAKE_STATUS}, 350151937Sjkim /* ACPI_BITREG_PCIEXP_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_PCIEXP_WAKE_STATUS, ACPI_BITMASK_PCIEXP_WAKE_STATUS}, 35191116Smsmith 35291116Smsmith /* ACPI_BITREG_TIMER_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_TIMER_ENABLE, ACPI_BITMASK_TIMER_ENABLE}, 35391116Smsmith /* ACPI_BITREG_GLOBAL_LOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, 35491116Smsmith /* ACPI_BITREG_POWER_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_ENABLE}, 35591116Smsmith /* ACPI_BITREG_SLEEP_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, 35691116Smsmith /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_ENABLE}, 357151937Sjkim /* ACPI_BITREG_PCIEXP_WAKE_DISABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE, ACPI_BITMASK_PCIEXP_WAKE_DISABLE}, 35891116Smsmith 35991116Smsmith /* ACPI_BITREG_SCI_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SCI_ENABLE, ACPI_BITMASK_SCI_ENABLE}, 36091116Smsmith /* ACPI_BITREG_BUS_MASTER_RLD */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_BUS_MASTER_RLD, ACPI_BITMASK_BUS_MASTER_RLD}, 36191116Smsmith /* ACPI_BITREG_GLOBAL_LOCK_RELEASE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE, ACPI_BITMASK_GLOBAL_LOCK_RELEASE}, 362193267Sjkim /* ACPI_BITREG_SLEEP_TYPE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SLEEP_TYPE, ACPI_BITMASK_SLEEP_TYPE}, 36391116Smsmith /* ACPI_BITREG_SLEEP_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SLEEP_ENABLE, ACPI_BITMASK_SLEEP_ENABLE}, 36491116Smsmith 36591116Smsmith /* ACPI_BITREG_ARB_DIS */ {ACPI_REGISTER_PM2_CONTROL, ACPI_BITPOSITION_ARB_DISABLE, ACPI_BITMASK_ARB_DISABLE} 36691116Smsmith}; 36791116Smsmith 36891116Smsmith 36991116SmsmithACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] = 37091116Smsmith{ 37191116Smsmith /* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, ACPI_BITREG_TIMER_ENABLE, ACPI_BITMASK_TIMER_STATUS, ACPI_BITMASK_TIMER_ENABLE}, 37291116Smsmith /* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, ACPI_BITREG_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, 37391116Smsmith /* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_ENABLE}, 37491116Smsmith /* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, 375123315Snjl /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE}, 37691116Smsmith}; 37791116Smsmith 378151937Sjkim/******************************************************************************* 37991116Smsmith * 38091116Smsmith * FUNCTION: AcpiUtGetRegionName 38191116Smsmith * 38291116Smsmith * PARAMETERS: None. 38391116Smsmith * 38491116Smsmith * RETURN: Status 38591116Smsmith * 38691116Smsmith * DESCRIPTION: Translate a Space ID into a name string (Debug only) 38791116Smsmith * 388151937Sjkim ******************************************************************************/ 38991116Smsmith 39091116Smsmith/* Region type decoding */ 39191116Smsmith 392114237Snjlconst char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = 39391116Smsmith{ 39491116Smsmith "SystemMemory", 39591116Smsmith "SystemIO", 396100966Siwasaki "PCI_Config", 39791116Smsmith "EmbeddedControl", 39891116Smsmith "SMBus", 399193267Sjkim "SystemCMOS", 400100966Siwasaki "PCIBARTarget", 401114237Snjl "DataTable" 40291116Smsmith}; 40391116Smsmith 40491116Smsmith 405114237Snjlchar * 40691116SmsmithAcpiUtGetRegionName ( 40791116Smsmith UINT8 SpaceId) 40891116Smsmith{ 40991116Smsmith 41091116Smsmith if (SpaceId >= ACPI_USER_REGION_BEGIN) 41191116Smsmith { 41291116Smsmith return ("UserDefinedRegion"); 41391116Smsmith } 41491116Smsmith else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) 41591116Smsmith { 416114237Snjl return ("InvalidSpaceId"); 41791116Smsmith } 41891116Smsmith 419167802Sjkim return (ACPI_CAST_PTR (char, AcpiGbl_RegionTypes[SpaceId])); 42091116Smsmith} 42191116Smsmith 42291116Smsmith 423151937Sjkim/******************************************************************************* 42491116Smsmith * 42591116Smsmith * FUNCTION: AcpiUtGetEventName 42691116Smsmith * 42791116Smsmith * PARAMETERS: None. 42891116Smsmith * 42991116Smsmith * RETURN: Status 43091116Smsmith * 43191116Smsmith * DESCRIPTION: Translate a Event ID into a name string (Debug only) 43291116Smsmith * 433151937Sjkim ******************************************************************************/ 43491116Smsmith 43591116Smsmith/* Event type decoding */ 43691116Smsmith 437114237Snjlstatic const char *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = 43891116Smsmith{ 43991116Smsmith "PM_Timer", 44091116Smsmith "GlobalLock", 44191116Smsmith "PowerButton", 44291116Smsmith "SleepButton", 44391116Smsmith "RealTimeClock", 44491116Smsmith}; 44591116Smsmith 44691116Smsmith 447114237Snjlchar * 44891116SmsmithAcpiUtGetEventName ( 44991116Smsmith UINT32 EventId) 45091116Smsmith{ 45191116Smsmith 45291116Smsmith if (EventId > ACPI_EVENT_MAX) 45391116Smsmith { 45491116Smsmith return ("InvalidEventID"); 45591116Smsmith } 45691116Smsmith 457167802Sjkim return (ACPI_CAST_PTR (char, AcpiGbl_EventTypes[EventId])); 45891116Smsmith} 45991116Smsmith 46091116Smsmith 461151937Sjkim/******************************************************************************* 46267754Smsmith * 46391116Smsmith * FUNCTION: AcpiUtGetTypeName 46491116Smsmith * 46591116Smsmith * PARAMETERS: None. 46691116Smsmith * 46791116Smsmith * RETURN: Status 46891116Smsmith * 46991116Smsmith * DESCRIPTION: Translate a Type ID into a name string (Debug only) 47091116Smsmith * 471151937Sjkim ******************************************************************************/ 47291116Smsmith 47367754Smsmith/* 47467754Smsmith * Elements of AcpiGbl_NsTypeNames below must match 47567754Smsmith * one-to-one with values of ACPI_OBJECT_TYPE 47667754Smsmith * 477151937Sjkim * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching; 478151937Sjkim * when stored in a table it really means that we have thus far seen no 479151937Sjkim * evidence to indicate what type is actually going to be stored for this entry. 48067754Smsmith */ 481114237Snjlstatic const char AcpiGbl_BadType[] = "UNDEFINED"; 48267754Smsmith 483151937Sjkim/* Printable names of the ACPI object types */ 484151937Sjkim 485151937Sjkimstatic const char *AcpiGbl_NsTypeNames[] = 48667754Smsmith{ 48767754Smsmith /* 00 */ "Untyped", 48871867Smsmith /* 01 */ "Integer", 48967754Smsmith /* 02 */ "String", 49067754Smsmith /* 03 */ "Buffer", 49167754Smsmith /* 04 */ "Package", 49267754Smsmith /* 05 */ "FieldUnit", 49367754Smsmith /* 06 */ "Device", 49467754Smsmith /* 07 */ "Event", 49567754Smsmith /* 08 */ "Method", 49667754Smsmith /* 09 */ "Mutex", 49767754Smsmith /* 10 */ "Region", 49867754Smsmith /* 11 */ "Power", 49967754Smsmith /* 12 */ "Processor", 50067754Smsmith /* 13 */ "Thermal", 50185756Smsmith /* 14 */ "BufferField", 50267754Smsmith /* 15 */ "DdbHandle", 50385756Smsmith /* 16 */ "DebugObject", 50485756Smsmith /* 17 */ "RegionField", 50577424Smsmith /* 18 */ "BankField", 50685756Smsmith /* 19 */ "IndexField", 50767754Smsmith /* 20 */ "Reference", 50867754Smsmith /* 21 */ "Alias", 509128212Snjl /* 22 */ "MethodAlias", 510128212Snjl /* 23 */ "Notify", 511128212Snjl /* 24 */ "AddrHandler", 512128212Snjl /* 25 */ "ResourceDesc", 513128212Snjl /* 26 */ "ResourceFld", 514128212Snjl /* 27 */ "Scope", 515128212Snjl /* 28 */ "Extra", 516128212Snjl /* 29 */ "Data", 517128212Snjl /* 30 */ "Invalid" 51867754Smsmith}; 51967754Smsmith 52067754Smsmith 521114237Snjlchar * 52277424SmsmithAcpiUtGetTypeName ( 52391116Smsmith ACPI_OBJECT_TYPE Type) 52467754Smsmith{ 52567754Smsmith 526107325Siwasaki if (Type > ACPI_TYPE_INVALID) 52767754Smsmith { 528167802Sjkim return (ACPI_CAST_PTR (char, AcpiGbl_BadType)); 52967754Smsmith } 53067754Smsmith 531167802Sjkim return (ACPI_CAST_PTR (char, AcpiGbl_NsTypeNames[Type])); 53267754Smsmith} 53367754Smsmith 53469746Smsmith 535114237Snjlchar * 53699679SiwasakiAcpiUtGetObjectTypeName ( 53799679Siwasaki ACPI_OPERAND_OBJECT *ObjDesc) 53899679Siwasaki{ 53999679Siwasaki 54099679Siwasaki if (!ObjDesc) 54199679Siwasaki { 54299679Siwasaki return ("[NULL Object Descriptor]"); 54399679Siwasaki } 54499679Siwasaki 545193267Sjkim return (AcpiUtGetTypeName (ObjDesc->Common.Type)); 54699679Siwasaki} 54799679Siwasaki 54899679Siwasaki 549151937Sjkim/******************************************************************************* 550123315Snjl * 551123315Snjl * FUNCTION: AcpiUtGetNodeName 552123315Snjl * 553123315Snjl * PARAMETERS: Object - A namespace node 554123315Snjl * 555123315Snjl * RETURN: Pointer to a string 556123315Snjl * 557123315Snjl * DESCRIPTION: Validate the node and return the node's ACPI name. 558123315Snjl * 559151937Sjkim ******************************************************************************/ 560123315Snjl 561123315Snjlchar * 562123315SnjlAcpiUtGetNodeName ( 563123315Snjl void *Object) 564123315Snjl{ 565128212Snjl ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) Object; 566123315Snjl 567123315Snjl 568128212Snjl /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ 569128212Snjl 570123315Snjl if (!Object) 571123315Snjl { 572128212Snjl return ("NULL"); 573123315Snjl } 574123315Snjl 575128212Snjl /* Check for Root node */ 576123315Snjl 577128212Snjl if ((Object == ACPI_ROOT_OBJECT) || 578128212Snjl (Object == AcpiGbl_RootNode)) 579128212Snjl { 580128212Snjl return ("\"\\\" "); 581128212Snjl } 582128212Snjl 583128212Snjl /* Descriptor must be a namespace node */ 584128212Snjl 585167802Sjkim if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED) 586123315Snjl { 587128212Snjl return ("####"); 588123315Snjl } 589123315Snjl 590193267Sjkim /* 591193267Sjkim * Ensure name is valid. The name was validated/repaired when the node 592193267Sjkim * was created, but make sure it has not been corrupted. 593193267Sjkim */ 594193267Sjkim AcpiUtRepairName (Node->Name.Ascii); 595128212Snjl 596128212Snjl /* Return the name */ 597128212Snjl 598123315Snjl return (Node->Name.Ascii); 599123315Snjl} 600123315Snjl 601123315Snjl 602151937Sjkim/******************************************************************************* 603123315Snjl * 604123315Snjl * FUNCTION: AcpiUtGetDescriptorName 605123315Snjl * 606123315Snjl * PARAMETERS: Object - An ACPI object 607123315Snjl * 608123315Snjl * RETURN: Pointer to a string 609123315Snjl * 610123315Snjl * DESCRIPTION: Validate object and return the descriptor type 611123315Snjl * 612151937Sjkim ******************************************************************************/ 613123315Snjl 614151937Sjkim/* Printable names of object descriptor types */ 615151937Sjkim 616151937Sjkimstatic const char *AcpiGbl_DescTypeNames[] = 617123315Snjl{ 618123315Snjl /* 00 */ "Invalid", 619123315Snjl /* 01 */ "Cached", 620123315Snjl /* 02 */ "State-Generic", 621123315Snjl /* 03 */ "State-Update", 622123315Snjl /* 04 */ "State-Package", 623123315Snjl /* 05 */ "State-Control", 624123315Snjl /* 06 */ "State-RootParseScope", 625123315Snjl /* 07 */ "State-ParseScope", 626123315Snjl /* 08 */ "State-WalkScope", 627123315Snjl /* 09 */ "State-Result", 628123315Snjl /* 10 */ "State-Notify", 629123315Snjl /* 11 */ "State-Thread", 630123315Snjl /* 12 */ "Walk", 631123315Snjl /* 13 */ "Parser", 632123315Snjl /* 14 */ "Operand", 633123315Snjl /* 15 */ "Node" 634123315Snjl}; 635123315Snjl 636123315Snjl 637123315Snjlchar * 638123315SnjlAcpiUtGetDescriptorName ( 639123315Snjl void *Object) 640123315Snjl{ 641123315Snjl 642123315Snjl if (!Object) 643123315Snjl { 644123315Snjl return ("NULL OBJECT"); 645123315Snjl } 646123315Snjl 647123315Snjl if (ACPI_GET_DESCRIPTOR_TYPE (Object) > ACPI_DESC_TYPE_MAX) 648123315Snjl { 649167802Sjkim return (ACPI_CAST_PTR (char, AcpiGbl_BadType)); 650123315Snjl } 651123315Snjl 652167802Sjkim return (ACPI_CAST_PTR (char, 653167802Sjkim AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)])); 654123315Snjl 655123315Snjl} 656123315Snjl 657123315Snjl 658193267Sjkim/******************************************************************************* 659193267Sjkim * 660193267Sjkim * FUNCTION: AcpiUtGetReferenceName 661193267Sjkim * 662193267Sjkim * PARAMETERS: Object - An ACPI reference object 663193267Sjkim * 664193267Sjkim * RETURN: Pointer to a string 665193267Sjkim * 666193267Sjkim * DESCRIPTION: Decode a reference object sub-type to a string. 667193267Sjkim * 668193267Sjkim ******************************************************************************/ 669193267Sjkim 670193267Sjkim/* Printable names of reference object sub-types */ 671193267Sjkim 672193267Sjkimstatic const char *AcpiGbl_RefClassNames[] = 673193267Sjkim{ 674193267Sjkim /* 00 */ "Local", 675193267Sjkim /* 01 */ "Argument", 676193267Sjkim /* 02 */ "RefOf", 677193267Sjkim /* 03 */ "Index", 678193267Sjkim /* 04 */ "DdbHandle", 679193267Sjkim /* 05 */ "Named Object", 680193267Sjkim /* 06 */ "Debug" 681193267Sjkim}; 682193267Sjkim 683193267Sjkimconst char * 684193267SjkimAcpiUtGetReferenceName ( 685193267Sjkim ACPI_OPERAND_OBJECT *Object) 686193267Sjkim{ 687193267Sjkim 688193267Sjkim if (!Object) 689193267Sjkim { 690193267Sjkim return ("NULL Object"); 691193267Sjkim } 692193267Sjkim 693193267Sjkim if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND) 694193267Sjkim { 695193267Sjkim return ("Not an Operand object"); 696193267Sjkim } 697193267Sjkim 698193267Sjkim if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE) 699193267Sjkim { 700193267Sjkim return ("Not a Reference object"); 701193267Sjkim } 702193267Sjkim 703193267Sjkim if (Object->Reference.Class > ACPI_REFCLASS_MAX) 704193267Sjkim { 705193267Sjkim return ("Unknown Reference class"); 706193267Sjkim } 707193267Sjkim 708193267Sjkim return (AcpiGbl_RefClassNames[Object->Reference.Class]); 709193267Sjkim} 710193267Sjkim 711193267Sjkim 712102550Siwasaki#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 713100966Siwasaki/* 714100966Siwasaki * Strings and procedures used for debug only 715100966Siwasaki */ 71699679Siwasaki 717151937Sjkim/******************************************************************************* 718100966Siwasaki * 719100966Siwasaki * FUNCTION: AcpiUtGetMutexName 720100966Siwasaki * 721151937Sjkim * PARAMETERS: MutexId - The predefined ID for this mutex. 722100966Siwasaki * 723151937Sjkim * RETURN: String containing the name of the mutex. Always returns a valid 724151937Sjkim * pointer. 725100966Siwasaki * 726100966Siwasaki * DESCRIPTION: Translate a mutex ID into a name string (Debug only) 727100966Siwasaki * 728151937Sjkim ******************************************************************************/ 72969746Smsmith 730114237Snjlchar * 731100966SiwasakiAcpiUtGetMutexName ( 732100966Siwasaki UINT32 MutexId) 73369746Smsmith{ 73469746Smsmith 735167802Sjkim if (MutexId > ACPI_MAX_MUTEX) 736100966Siwasaki { 737100966Siwasaki return ("Invalid Mutex ID"); 738100966Siwasaki } 73969746Smsmith 740100966Siwasaki return (AcpiGbl_MutexNames[MutexId]); 741100966Siwasaki} 742193267Sjkim 743193267Sjkim 744193267Sjkim/******************************************************************************* 745193267Sjkim * 746193267Sjkim * FUNCTION: AcpiUtGetNotifyName 747193267Sjkim * 748193267Sjkim * PARAMETERS: NotifyValue - Value from the Notify() request 749193267Sjkim * 750193267Sjkim * RETURN: String corresponding to the Notify Value. 751193267Sjkim * 752193267Sjkim * DESCRIPTION: Translate a Notify Value to a notify namestring. 753193267Sjkim * 754193267Sjkim ******************************************************************************/ 755193267Sjkim 756193267Sjkim/* Names for Notify() values, used for debug output */ 757193267Sjkim 758193267Sjkimstatic const char *AcpiGbl_NotifyValueNames[] = 759193267Sjkim{ 760193267Sjkim "Bus Check", 761193267Sjkim "Device Check", 762193267Sjkim "Device Wake", 763193267Sjkim "Eject Request", 764193267Sjkim "Device Check Light", 765193267Sjkim "Frequency Mismatch", 766193267Sjkim "Bus Mode Mismatch", 767193267Sjkim "Power Fault", 768193267Sjkim "Capabilities Check", 769193267Sjkim "Device PLD Check", 770193267Sjkim "Reserved", 771193267Sjkim "System Locality Update" 772193267Sjkim}; 773193267Sjkim 774193267Sjkimconst char * 775193267SjkimAcpiUtGetNotifyName ( 776193267Sjkim UINT32 NotifyValue) 777193267Sjkim{ 778193267Sjkim 779193267Sjkim if (NotifyValue <= ACPI_NOTIFY_MAX) 780193267Sjkim { 781193267Sjkim return (AcpiGbl_NotifyValueNames[NotifyValue]); 782193267Sjkim } 783193267Sjkim else if (NotifyValue <= ACPI_MAX_SYS_NOTIFY) 784193267Sjkim { 785193267Sjkim return ("Reserved"); 786193267Sjkim } 787193267Sjkim else /* Greater or equal to 0x80 */ 788193267Sjkim { 789193267Sjkim return ("**Device Specific**"); 790193267Sjkim } 791193267Sjkim} 79267754Smsmith#endif 79367754Smsmith 79467754Smsmith 795151937Sjkim/******************************************************************************* 79667754Smsmith * 79777424Smsmith * FUNCTION: AcpiUtValidObjectType 79867754Smsmith * 799107325Siwasaki * PARAMETERS: Type - Object type to be validated 80067754Smsmith * 801151937Sjkim * RETURN: TRUE if valid object type, FALSE otherwise 80267754Smsmith * 80367754Smsmith * DESCRIPTION: Validate an object type 80467754Smsmith * 805151937Sjkim ******************************************************************************/ 80667754Smsmith 80767754SmsmithBOOLEAN 80877424SmsmithAcpiUtValidObjectType ( 80991116Smsmith ACPI_OBJECT_TYPE Type) 81067754Smsmith{ 81167754Smsmith 812107325Siwasaki if (Type > ACPI_TYPE_LOCAL_MAX) 81367754Smsmith { 814107325Siwasaki /* Note: Assumes all TYPEs are contiguous (external/local) */ 815107325Siwasaki 816107325Siwasaki return (FALSE); 81767754Smsmith } 81867754Smsmith 81967754Smsmith return (TRUE); 82067754Smsmith} 82167754Smsmith 82267754Smsmith 823151937Sjkim/******************************************************************************* 82467754Smsmith * 825151937Sjkim * FUNCTION: AcpiUtInitGlobals 82667754Smsmith * 827151937Sjkim * PARAMETERS: None 82867754Smsmith * 829193267Sjkim * RETURN: Status 83067754Smsmith * 83167754Smsmith * DESCRIPTION: Init library globals. All globals that require specific 83267754Smsmith * initialization should be initialized here! 83367754Smsmith * 834151937Sjkim ******************************************************************************/ 83567754Smsmith 836193267SjkimACPI_STATUS 83777424SmsmithAcpiUtInitGlobals ( 83867754Smsmith void) 83967754Smsmith{ 840151937Sjkim ACPI_STATUS Status; 84167754Smsmith UINT32 i; 84267754Smsmith 84367754Smsmith 844167802Sjkim ACPI_FUNCTION_TRACE (UtInitGlobals); 84567754Smsmith 846127175Snjl 847151937Sjkim /* Create all memory caches */ 84882367Smsmith 849151937Sjkim Status = AcpiUtCreateCaches (); 850151937Sjkim if (ACPI_FAILURE (Status)) 851151937Sjkim { 852193267Sjkim return_ACPI_STATUS (Status); 853151937Sjkim } 85482367Smsmith 85567754Smsmith /* Mutex locked flags */ 85667754Smsmith 857167802Sjkim for (i = 0; i < ACPI_NUM_MUTEX; i++) 85867754Smsmith { 859117521Snjl AcpiGbl_MutexInfo[i].Mutex = NULL; 860151937Sjkim AcpiGbl_MutexInfo[i].ThreadId = ACPI_MUTEX_NOT_ACQUIRED; 861117521Snjl AcpiGbl_MutexInfo[i].UseCount = 0; 86267754Smsmith } 86367754Smsmith 864167802Sjkim for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++) 865167802Sjkim { 866167802Sjkim AcpiGbl_OwnerIdMask[i] = 0; 867167802Sjkim } 868167802Sjkim 869193267Sjkim /* Last OwnerID is never valid */ 870193267Sjkim 871193267Sjkim AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; 872193267Sjkim 873193267Sjkim /* Event counters */ 874193267Sjkim 875193267Sjkim AcpiMethodCount = 0; 876193267Sjkim AcpiSciCount = 0; 877193267Sjkim AcpiGpeCount = 0; 878193267Sjkim 879193267Sjkim for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) 880193267Sjkim { 881193267Sjkim AcpiFixedEventCount[i] = 0; 882193267Sjkim } 883193267Sjkim 884114237Snjl /* GPE support */ 885114237Snjl 886117521Snjl AcpiGbl_GpeXruptListHead = NULL; 887117521Snjl AcpiGbl_GpeFadtBlocks[0] = NULL; 888117521Snjl AcpiGbl_GpeFadtBlocks[1] = NULL; 889193267Sjkim AcpiCurrentGpeCount = 0; 890114237Snjl 891193267Sjkim /* Global handlers */ 89267754Smsmith 893117521Snjl AcpiGbl_SystemNotify.Handler = NULL; 894117521Snjl AcpiGbl_DeviceNotify.Handler = NULL; 895138287Smarks AcpiGbl_ExceptionHandler = NULL; 89699679Siwasaki AcpiGbl_InitHandler = NULL; 897193267Sjkim AcpiGbl_TableHandler = NULL; 89867754Smsmith 89967754Smsmith /* Global Lock support */ 90067754Smsmith 901167802Sjkim AcpiGbl_GlobalLockSemaphore = NULL; 902167802Sjkim AcpiGbl_GlobalLockMutex = NULL; 90367754Smsmith AcpiGbl_GlobalLockAcquired = FALSE; 90491116Smsmith AcpiGbl_GlobalLockHandle = 0; 905193267Sjkim AcpiGbl_GlobalLockPresent = FALSE; 90667754Smsmith 90767754Smsmith /* Miscellaneous variables */ 90867754Smsmith 90967754Smsmith AcpiGbl_CmSingleStep = FALSE; 91067754Smsmith AcpiGbl_DbTerminateThreads = FALSE; 91167754Smsmith AcpiGbl_Shutdown = FALSE; 91267754Smsmith AcpiGbl_NsLookupCount = 0; 91367754Smsmith AcpiGbl_PsFindCount = 0; 91467754Smsmith AcpiGbl_AcpiHardwarePresent = TRUE; 915167802Sjkim AcpiGbl_LastOwnerIdIndex = 0; 916167802Sjkim AcpiGbl_NextOwnerIdOffset = 0; 917151937Sjkim AcpiGbl_TraceMethodName = 0; 918151937Sjkim AcpiGbl_TraceDbgLevel = 0; 919151937Sjkim AcpiGbl_TraceDbgLayer = 0; 92067754Smsmith AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING; 92191116Smsmith AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT; 922193267Sjkim AcpiGbl_OsiData = 0; 92367754Smsmith 92467754Smsmith /* Hardware oriented */ 92567754Smsmith 926104470Siwasaki AcpiGbl_EventsInitialized = FALSE; 927129684Snjl AcpiGbl_SystemAwakeAndRunning = TRUE; 92867754Smsmith 92967754Smsmith /* Namespace */ 93067754Smsmith 93167754Smsmith AcpiGbl_RootNode = NULL; 93299146Siwasaki AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME; 933167802Sjkim AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED; 934107325Siwasaki AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_DEVICE; 93567754Smsmith AcpiGbl_RootNodeStruct.Child = NULL; 93667754Smsmith AcpiGbl_RootNodeStruct.Peer = NULL; 93767754Smsmith AcpiGbl_RootNodeStruct.Object = NULL; 93867754Smsmith AcpiGbl_RootNodeStruct.Flags = ANOBJ_END_OF_PEER_LIST; 93967754Smsmith 94067754Smsmith 941102550Siwasaki#ifdef ACPI_DEBUG_OUTPUT 942193267Sjkim AcpiGbl_LowestStackPointer = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX); 94383174Smsmith#endif 94483174Smsmith 945167802Sjkim#ifdef ACPI_DBG_TRACK_ALLOCATIONS 946167802Sjkim AcpiGbl_DisplayFinalMemStats = FALSE; 947167802Sjkim#endif 948167802Sjkim 949193267Sjkim return_ACPI_STATUS (AE_OK); 95067754Smsmith} 95167754Smsmith 952167802Sjkim/* Public globals */ 95367754Smsmith 954193267SjkimACPI_EXPORT_SYMBOL (AcpiGbl_FADT) 955167802SjkimACPI_EXPORT_SYMBOL (AcpiDbgLevel) 956167802SjkimACPI_EXPORT_SYMBOL (AcpiDbgLayer) 957167802SjkimACPI_EXPORT_SYMBOL (AcpiGpeCount) 958193267SjkimACPI_EXPORT_SYMBOL (AcpiCurrentGpeCount) 959167802Sjkim 960167802Sjkim 961