diff options
Diffstat (limited to 'sys/contrib/dev/acpica/utglobal.c')
-rw-r--r-- | sys/contrib/dev/acpica/utglobal.c | 361 |
1 files changed, 224 insertions, 137 deletions
diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c index 453cd02..4758da7 100644 --- a/sys/contrib/dev/acpica/utglobal.c +++ b/sys/contrib/dev/acpica/utglobal.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utglobal - Global variables for the ACPI subsystem - * $Revision: 136 $ + * $Revision: 153 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. * All rights reserved. * * 2. License @@ -125,7 +125,7 @@ #define _COMPONENT ACPI_UTILITIES - MODULE_NAME ("utglobal") + ACPI_MODULE_NAME ("utglobal") /****************************************************************************** @@ -265,7 +265,7 @@ const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES] = { * during the initialization sequence. */ -const PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = +const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = { {"_GPE", INTERNAL_TYPE_DEF_ANY}, {"_PR_", INTERNAL_TYPE_DEF_ANY}, @@ -286,45 +286,45 @@ const PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = * and the table is indexed by values of ACPI_OBJECT_TYPE */ -const UINT8 AcpiGbl_NsProperties[] = +const UINT8 AcpiGbl_NsProperties[] = { - NSP_NORMAL, /* 00 Any */ - NSP_NORMAL, /* 01 Number */ - NSP_NORMAL, /* 02 String */ - NSP_NORMAL, /* 03 Buffer */ - NSP_LOCAL, /* 04 Package */ - NSP_NORMAL, /* 05 FieldUnit */ - NSP_NEWSCOPE | NSP_LOCAL, /* 06 Device */ - NSP_LOCAL, /* 07 AcpiEvent */ - NSP_NEWSCOPE | NSP_LOCAL, /* 08 Method */ - NSP_LOCAL, /* 09 Mutex */ - NSP_LOCAL, /* 10 Region */ - NSP_NEWSCOPE | NSP_LOCAL, /* 11 Power */ - NSP_NEWSCOPE | NSP_LOCAL, /* 12 Processor */ - NSP_NEWSCOPE | NSP_LOCAL, /* 13 Thermal */ - NSP_NORMAL, /* 14 BufferField */ - NSP_NORMAL, /* 15 DdbHandle */ - NSP_NORMAL, /* 16 Debug Object */ - NSP_NORMAL, /* 17 DefField */ - NSP_NORMAL, /* 18 BankField */ - NSP_NORMAL, /* 19 IndexField */ - NSP_NORMAL, /* 20 Reference */ - NSP_NORMAL, /* 21 Alias */ - NSP_NORMAL, /* 22 Notify */ - NSP_NORMAL, /* 23 Address Handler */ - NSP_NEWSCOPE | NSP_LOCAL, /* 24 Resource Desc */ - NSP_NEWSCOPE | NSP_LOCAL, /* 25 Resource Field */ - NSP_NORMAL, /* 26 DefFieldDefn */ - NSP_NORMAL, /* 27 BankFieldDefn */ - NSP_NORMAL, /* 28 IndexFieldDefn */ - NSP_NORMAL, /* 29 If */ - NSP_NORMAL, /* 30 Else */ - NSP_NORMAL, /* 31 While */ - NSP_NEWSCOPE, /* 32 Scope */ - NSP_LOCAL, /* 33 DefAny */ - NSP_NORMAL, /* 34 Extra */ - NSP_NORMAL, /* 35 Data */ - NSP_NORMAL /* 36 Invalid */ + ACPI_NS_NORMAL, /* 00 Any */ + ACPI_NS_NORMAL, /* 01 Number */ + ACPI_NS_NORMAL, /* 02 String */ + ACPI_NS_NORMAL, /* 03 Buffer */ + ACPI_NS_LOCAL, /* 04 Package */ + ACPI_NS_NORMAL, /* 05 FieldUnit */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 06 Device */ + ACPI_NS_LOCAL, /* 07 AcpiEvent */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 08 Method */ + ACPI_NS_LOCAL, /* 09 Mutex */ + ACPI_NS_LOCAL, /* 10 Region */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 11 Power */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 12 Processor */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 13 Thermal */ + ACPI_NS_NORMAL, /* 14 BufferField */ + ACPI_NS_NORMAL, /* 15 DdbHandle */ + ACPI_NS_NORMAL, /* 16 Debug Object */ + ACPI_NS_NORMAL, /* 17 DefField */ + ACPI_NS_NORMAL, /* 18 BankField */ + ACPI_NS_NORMAL, /* 19 IndexField */ + ACPI_NS_NORMAL, /* 20 Reference */ + ACPI_NS_NORMAL, /* 21 Alias */ + ACPI_NS_NORMAL, /* 22 Notify */ + ACPI_NS_NORMAL, /* 23 Address Handler */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 24 Resource Desc */ + ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Field */ + ACPI_NS_NORMAL, /* 26 DefFieldDefn */ + ACPI_NS_NORMAL, /* 27 BankFieldDefn */ + ACPI_NS_NORMAL, /* 28 IndexFieldDefn */ + ACPI_NS_NORMAL, /* 29 If */ + ACPI_NS_NORMAL, /* 30 Else */ + ACPI_NS_NORMAL, /* 31 While */ + ACPI_NS_NEWSCOPE, /* 32 Scope */ + ACPI_NS_LOCAL, /* 33 DefAny */ + ACPI_NS_NORMAL, /* 34 Extra */ + ACPI_NS_NORMAL, /* 35 Data */ + ACPI_NS_NORMAL /* 36 Invalid */ }; @@ -360,12 +360,15 @@ AcpiUtHexToAsciiChar ( /****************************************************************************** * - * Table globals + * Table name globals * * NOTE: This table includes ONLY the ACPI tables that the subsystem consumes. * it is NOT an exhaustive list of all possible ACPI tables. All ACPI tables * that are not used by the subsystem are simply ignored. * + * Do NOT add any table to this list that is not consumed directly by this + * subsystem. + * ******************************************************************************/ @@ -374,18 +377,147 @@ ACPI_TABLE_DESC AcpiGbl_AcpiTables[NUM_ACPI_TABLES]; ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES] = { - /*********** Name, Signature, Signature size, How many allowed?, Supported? Global typed pointer */ - - /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, sizeof (RSDP_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL}, - /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, sizeof (DSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_DSDT}, - /* FADT 2 */ {FADT_SIG, FADT_SIG, sizeof (FADT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_FADT}, - /* FACS 3 */ {FACS_SIG, FACS_SIG, sizeof (FACS_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_FACS}, - /* PSDT 4 */ {PSDT_SIG, PSDT_SIG, sizeof (PSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL}, - /* SSDT 5 */ {SSDT_SIG, SSDT_SIG, sizeof (SSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL}, - /* XSDT 6 */ {XSDT_SIG, XSDT_SIG, sizeof (RSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL}, + /*********** Name, Signature, Global typed pointer Signature size, How many allowed?, Contains valid AML? */ + + /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof (RSDP_SIG)-1, ACPI_TABLE_SINGLE}, + /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void **) &AcpiGbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SINGLE | ACPI_TABLE_EXECUTABLE}, + /* FADT 2 */ {FADT_SIG, FADT_SIG, (void **) &AcpiGbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_SINGLE}, + /* FACS 3 */ {FACS_SIG, FACS_SIG, (void **) &AcpiGbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SINGLE}, + /* PSDT 4 */ {PSDT_SIG, PSDT_SIG, NULL, sizeof (PSDT_SIG)-1, ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE}, + /* SSDT 5 */ {SSDT_SIG, SSDT_SIG, NULL, sizeof (SSDT_SIG)-1, ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE}, + /* XSDT 6 */ {XSDT_SIG, XSDT_SIG, NULL, sizeof (RSDT_SIG)-1, ACPI_TABLE_SINGLE}, +}; + + +/****************************************************************************** + * + * Event and Hardware globals + * + ******************************************************************************/ + +ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG] = +{ + /* Name Parent Register Register Bit Position Register Bit Mask */ + + /* ACPI_BITREG_TIMER_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_TIMER_STATUS, ACPI_BITMASK_TIMER_STATUS}, + /* ACPI_BITREG_BUS_MASTER_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_BUS_MASTER_STATUS, ACPI_BITMASK_BUS_MASTER_STATUS}, + /* ACPI_BITREG_GLOBAL_LOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_STATUS}, + /* ACPI_BITREG_POWER_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_STATUS}, + /* ACPI_BITREG_SLEEP_BUTTON_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_STATUS}, + /* ACPI_BITREG_RT_CLOCK_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_STATUS}, + /* ACPI_BITREG_WAKE_STATUS */ {ACPI_REGISTER_PM1_STATUS, ACPI_BITPOSITION_WAKE_STATUS, ACPI_BITMASK_WAKE_STATUS}, + + /* ACPI_BITREG_TIMER_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_TIMER_ENABLE, ACPI_BITMASK_TIMER_ENABLE}, + /* ACPI_BITREG_GLOBAL_LOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, + /* ACPI_BITREG_POWER_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_ENABLE}, + /* ACPI_BITREG_SLEEP_BUTTON_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, + /* ACPI_BITREG_RT_CLOCK_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, ACPI_BITPOSITION_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_ENABLE}, + /* ACPI_BITREG_WAKE_ENABLE */ {ACPI_REGISTER_PM1_ENABLE, 0, 0}, + + /* ACPI_BITREG_SCI_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SCI_ENABLE, ACPI_BITMASK_SCI_ENABLE}, + /* ACPI_BITREG_BUS_MASTER_RLD */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_BUS_MASTER_RLD, ACPI_BITMASK_BUS_MASTER_RLD}, + /* ACPI_BITREG_GLOBAL_LOCK_RELEASE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE, ACPI_BITMASK_GLOBAL_LOCK_RELEASE}, + /* ACPI_BITREG_SLEEP_TYPE_A */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SLEEP_TYPE_X, ACPI_BITMASK_SLEEP_TYPE_X}, + /* ACPI_BITREG_SLEEP_TYPE_B */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SLEEP_TYPE_X, ACPI_BITMASK_SLEEP_TYPE_X}, + /* ACPI_BITREG_SLEEP_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SLEEP_ENABLE, ACPI_BITMASK_SLEEP_ENABLE}, + + /* ACPI_BITREG_ARB_DIS */ {ACPI_REGISTER_PM2_CONTROL, ACPI_BITPOSITION_ARB_DISABLE, ACPI_BITMASK_ARB_DISABLE} +}; + + +ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] = +{ + /* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, ACPI_BITREG_TIMER_ENABLE, ACPI_BITMASK_TIMER_STATUS, ACPI_BITMASK_TIMER_ENABLE}, + /* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, ACPI_BITREG_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, + /* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_ENABLE}, + /* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, + /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, 0, 0}, +}; + +/***************************************************************************** + * + * FUNCTION: AcpiUtGetRegionName + * + * PARAMETERS: None. + * + * RETURN: Status + * + * DESCRIPTION: Translate a Space ID into a name string (Debug only) + * + ****************************************************************************/ + +/* Region type decoding */ + +const NATIVE_CHAR *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = +{ + "SystemMemory", + "SystemIO", + "PCIConfig", + "EmbeddedControl", + "SMBus", + "CMOS", + "PCIBarTarget", + "DataTable", +}; + + +NATIVE_CHAR * +AcpiUtGetRegionName ( + UINT8 SpaceId) +{ + + if (SpaceId >= ACPI_USER_REGION_BEGIN) + { + return ("UserDefinedRegion"); + } + + else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) + { + return ("InvalidSpaceID"); + } + + return ((NATIVE_CHAR *) AcpiGbl_RegionTypes[SpaceId]); +} + + +/***************************************************************************** + * + * FUNCTION: AcpiUtGetEventName + * + * PARAMETERS: None. + * + * RETURN: Status + * + * DESCRIPTION: Translate a Event ID into a name string (Debug only) + * + ****************************************************************************/ + +/* Event type decoding */ + +const NATIVE_CHAR *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = +{ + "PM_Timer", + "GlobalLock", + "PowerButton", + "SleepButton", + "RealTimeClock", }; +NATIVE_CHAR * +AcpiUtGetEventName ( + UINT32 EventId) +{ + + if (EventId > ACPI_EVENT_MAX) + { + return ("InvalidEventID"); + } + + return ((NATIVE_CHAR *) AcpiGbl_EventTypes[EventId]); +} + + #ifdef ACPI_DEBUG /* @@ -420,6 +552,18 @@ AcpiUtGetMutexName ( } +/***************************************************************************** + * + * FUNCTION: AcpiUtGetTypeName + * + * PARAMETERS: None. + * + * RETURN: Status + * + * DESCRIPTION: Translate a Type ID into a name string (Debug only) + * + ****************************************************************************/ + /* * Elements of AcpiGbl_NsTypeNames below must match * one-to-one with values of ACPI_OBJECT_TYPE @@ -474,21 +618,9 @@ static const NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of AC }; -/***************************************************************************** - * - * FUNCTION: AcpiUtGetTypeName - * - * PARAMETERS: None. - * - * RETURN: Status - * - * DESCRIPTION: Translate a Type ID into a name string (Debug only) - * - ****************************************************************************/ - NATIVE_CHAR * AcpiUtGetTypeName ( - UINT32 Type) + ACPI_OBJECT_TYPE Type) { if (Type > INTERNAL_TYPE_INVALID) @@ -500,51 +632,6 @@ AcpiUtGetTypeName ( } -/* Region type decoding */ - -const NATIVE_CHAR *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = -{ - "SystemMemory", - "SystemIO", - "PCIConfig", - "EmbeddedControl", - "SMBus", - "CMOS", - "PCIBarTarget", -}; - - -/***************************************************************************** - * - * FUNCTION: AcpiUtGetRegionName - * - * PARAMETERS: None. - * - * RETURN: Status - * - * DESCRIPTION: Translate a Space ID into a name string (Debug only) - * - ****************************************************************************/ - -NATIVE_CHAR * -AcpiUtGetRegionName ( - UINT8 SpaceId) -{ - - if (SpaceId >= ACPI_USER_REGION_BEGIN) - { - return ("UserDefinedRegion"); - } - - else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) - { - return ("InvalidSpaceID"); - } - - return ((NATIVE_CHAR *) AcpiGbl_RegionTypes[SpaceId]); -} - - /* Data used in keeping track of fields */ const NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] = @@ -605,7 +692,7 @@ const NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] = BOOLEAN AcpiUtValidObjectType ( - UINT32 Type) + ACPI_OBJECT_TYPE Type) { if (Type > ACPI_TYPE_MAX) @@ -638,40 +725,41 @@ AcpiUtAllocateOwnerId ( ACPI_OWNER_ID OwnerId = 0xFFFF; - FUNCTION_TRACE ("UtAllocateOwnerId"); + ACPI_FUNCTION_TRACE ("UtAllocateOwnerId"); - AcpiUtAcquireMutex (ACPI_MTX_CACHES); + if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_CACHES))) + { + return (0); + } switch (IdType) { - case OWNER_TYPE_TABLE: + case ACPI_OWNER_TYPE_TABLE: OwnerId = AcpiGbl_NextTableOwnerId; AcpiGbl_NextTableOwnerId++; - if (AcpiGbl_NextTableOwnerId == FIRST_METHOD_ID) + if (AcpiGbl_NextTableOwnerId == ACPI_FIRST_METHOD_ID) { - AcpiGbl_NextTableOwnerId = FIRST_TABLE_ID; + AcpiGbl_NextTableOwnerId = ACPI_FIRST_TABLE_ID; } break; - case OWNER_TYPE_METHOD: + case ACPI_OWNER_TYPE_METHOD: OwnerId = AcpiGbl_NextMethodOwnerId; AcpiGbl_NextMethodOwnerId++; - if (AcpiGbl_NextMethodOwnerId == FIRST_TABLE_ID) + if (AcpiGbl_NextMethodOwnerId == ACPI_FIRST_TABLE_ID) { - AcpiGbl_NextMethodOwnerId = FIRST_METHOD_ID; + AcpiGbl_NextMethodOwnerId = ACPI_FIRST_METHOD_ID; } break; } - - AcpiUtReleaseMutex (ACPI_MTX_CACHES); - + (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); return_VALUE (OwnerId); } @@ -694,17 +782,17 @@ AcpiUtInitGlobals ( UINT32 i; - FUNCTION_TRACE ("UtInitGlobals"); + ACPI_FUNCTION_TRACE ("UtInitGlobals"); /* Memory allocation and cache lists */ - MEMSET (AcpiGbl_MemoryLists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS); + ACPI_MEMSET (AcpiGbl_MemoryLists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS); - AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_GENERIC_STATE *) NULL)->Common.Next); - AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_PARSE_OBJECT *) NULL)->Next); - AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_PARSE2_OBJECT *) NULL)->Next); - AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_OPERAND_OBJECT *) NULL)->Cache.Next); - AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_WALK_STATE *) NULL)->Next); + AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_GENERIC_STATE *) NULL)->Common.Next), NULL); + AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_PARSE_OBJECT *) NULL)->Next), NULL); + AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_PARSE2_OBJECT *) NULL)->Next), NULL); + AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_OPERAND_OBJECT *) NULL)->Cache.Next), NULL); + AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_WALK_STATE *) NULL)->Next), NULL); AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ObjectSize = sizeof (ACPI_NAMESPACE_NODE); AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ObjectSize = sizeof (ACPI_GENERIC_STATE); @@ -765,6 +853,7 @@ AcpiUtInitGlobals ( AcpiGbl_GlobalLockAcquired = FALSE; AcpiGbl_GlobalLockThreadCount = 0; + AcpiGbl_GlobalLockHandle = 0; /* Miscellaneous variables */ @@ -775,24 +864,22 @@ AcpiUtInitGlobals ( AcpiGbl_NsLookupCount = 0; AcpiGbl_PsFindCount = 0; AcpiGbl_AcpiHardwarePresent = TRUE; - AcpiGbl_NextTableOwnerId = FIRST_TABLE_ID; - AcpiGbl_NextMethodOwnerId = FIRST_METHOD_ID; + AcpiGbl_NextTableOwnerId = ACPI_FIRST_TABLE_ID; + AcpiGbl_NextMethodOwnerId = ACPI_FIRST_METHOD_ID; AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING; + AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT; /* Hardware oriented */ - AcpiGbl_Gpe0EnableRegisterSave = NULL; - AcpiGbl_Gpe1EnableRegisterSave = NULL; - AcpiGbl_OriginalMode = SYS_MODE_UNKNOWN; /* original ACPI/legacy mode */ - AcpiGbl_GpeRegisters = NULL; - AcpiGbl_GpeInfo = NULL; + AcpiGbl_GpeRegisterInfo = NULL; + AcpiGbl_GpeNumberInfo = NULL; /* Namespace */ AcpiGbl_RootNode = NULL; AcpiGbl_RootNodeStruct.Name = ACPI_ROOT_NAME; - AcpiGbl_RootNodeStruct.DataType = ACPI_DESC_TYPE_NAMED; + AcpiGbl_RootNodeStruct.Descriptor = ACPI_DESC_TYPE_NAMED; AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_ANY; AcpiGbl_RootNodeStruct.Child = NULL; AcpiGbl_RootNodeStruct.Peer = NULL; |