From adfda8d3b37e3f8f39479d08b171878433d15dc6 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Tue, 29 Apr 2003 19:11:00 +0000 Subject: [PATCH] Resolve conflicts. --- sys/contrib/dev/acpica/acconfig.h | 69 +++++------ sys/contrib/dev/acpica/acenv.h | 12 +- sys/contrib/dev/acpica/acfreebsd.h | 10 +- sys/contrib/dev/acpica/acgcc.h | 11 +- sys/contrib/dev/acpica/acpi.h | 4 +- sys/contrib/dev/acpica/acpiosxf.h | 49 +++++++- sys/contrib/dev/acpica/acpixf.h | 27 ++++- sys/contrib/dev/acpica/acutils.h | 111 +++++++++-------- sys/contrib/dev/acpica/dbcmds.c | 104 ++++++++++------ sys/contrib/dev/acpica/dbxface.c | 188 +++++++++++++++++++---------- sys/contrib/dev/acpica/exfldio.c | 6 +- sys/contrib/dev/acpica/exsystem.c | 4 +- sys/contrib/dev/acpica/hwsleep.c | 78 ++++++++---- sys/contrib/dev/acpica/psparse.c | 61 +++------- sys/contrib/dev/acpica/rscreate.c | 32 ++--- sys/contrib/dev/acpica/tbget.c | 10 +- sys/contrib/dev/acpica/utglobal.c | 69 ++++++----- 17 files changed, 515 insertions(+), 330 deletions(-) diff --git a/sys/contrib/dev/acpica/acconfig.h b/sys/contrib/dev/acpica/acconfig.h index ce7d3cd88e6d..25d30f77e236 100644 --- a/sys/contrib/dev/acpica/acconfig.h +++ b/sys/contrib/dev/acpica/acconfig.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acconfig.h - Global configuration constants - * $Revision: 118 $ + * $Revision: 129 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -145,7 +145,7 @@ /* Version string */ -#define ACPI_CA_VERSION 0x20021115 +#define ACPI_CA_VERSION 0x20030228 /* Version of ACPI supported */ @@ -153,28 +153,28 @@ /* Maximum objects in the various object caches */ -#define MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */ -#define MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ -#define MAX_EXTPARSE_CACHE_DEPTH 64 /* Parse tree objects */ -#define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */ -#define MAX_WALK_CACHE_DEPTH 4 /* Objects for parse tree walks */ +#define ACPI_MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */ +#define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ +#define ACPI_MAX_EXTPARSE_CACHE_DEPTH 64 /* Parse tree objects */ +#define ACPI_MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */ +#define ACPI_MAX_WALK_CACHE_DEPTH 4 /* Objects for parse tree walks */ /* String size constants */ -#define MAX_STRING_LENGTH 512 -#define PATHNAME_MAX 256 /* A full namespace pathname */ +#define ACPI_MAX_STRING_LENGTH 512 +#define ACPI_PATHNAME_MAX 256 /* A full namespace pathname */ /* Maximum count for a semaphore object */ -#define MAX_SEMAPHORE_COUNT 256 +#define ACPI_MAX_SEMAPHORE_COUNT 256 /* Max reference count (for debug only) */ -#define MAX_REFERENCE_COUNT 0x400 +#define ACPI_MAX_REFERENCE_COUNT 0x400 /* Size of cached memory mapping for system memory operation region */ -#define SYSMEM_REGION_WINDOW_SIZE 4096 +#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 /****************************************************************************** @@ -197,42 +197,43 @@ * *****************************************************************************/ -/* Number of distinct GPE register blocks */ +/* Number of distinct GPE register blocks and register width */ #define ACPI_MAX_GPE_BLOCKS 2 +#define ACPI_GPE_REGISTER_WIDTH 8 /* * Method info (in WALK_STATE), containing local variables and argumetns */ -#define MTH_NUM_LOCALS 8 -#define MTH_MAX_LOCAL 7 +#define ACPI_METHOD_NUM_LOCALS 8 +#define ACPI_METHOD_MAX_LOCAL 7 -#define MTH_NUM_ARGS 7 -#define MTH_MAX_ARG 6 +#define ACPI_METHOD_NUM_ARGS 7 +#define ACPI_METHOD_MAX_ARG 6 /* Maximum length of resulting string when converting from a buffer */ #define ACPI_MAX_STRING_CONVERSION 200 /* - * Operand Stack (in WALK_STATE), Must be large enough to contain MTH_MAX_ARG + * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG */ -#define OBJ_NUM_OPERANDS 8 -#define OBJ_MAX_OPERAND 7 +#define ACPI_OBJ_NUM_OPERANDS 8 +#define ACPI_OBJ_MAX_OPERAND 7 /* Names within the namespace are 4 bytes long */ #define ACPI_NAME_SIZE 4 -#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ -#define PATH_SEPARATOR '.' +#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ +#define ACPI_PATH_SEPARATOR '.' /* Constants used in searching for the RSDP in low memory */ -#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */ -#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */ -#define LO_RSDP_WINDOW_SIZE 0x400 -#define HI_RSDP_WINDOW_SIZE 0x20000 -#define RSDP_SCAN_STEP 16 +#define ACPI_LO_RSDP_WINDOW_BASE 0 /* Physical Address */ +#define ACPI_HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */ +#define ACPI_LO_RSDP_WINDOW_SIZE 0x400 +#define ACPI_HI_RSDP_WINDOW_SIZE 0x20000 +#define ACPI_RSDP_SCAN_STEP 16 /* Operation regions */ @@ -245,12 +246,12 @@ /* Array sizes. Used for range checking also */ -#define NUM_ACCESS_TYPES 6 -#define NUM_UPDATE_RULES 3 -#define NUM_LOCK_RULES 2 -#define NUM_MATCH_OPS 6 -#define NUM_OPCODES 256 -#define NUM_FIELD_NAMES 2 +#define ACPI_NUM_ACCESS_TYPES 6 +#define ACPI_NUM_UPDATE_RULES 3 +#define ACPI_NUM_LOCK_RULES 2 +#define ACPI_NUM_MATCH_OPS 6 +#define ACPI_NUM_OPCODES 256 +#define ACPI_NUM_FIELD_NAMES 2 /* RSDP checksums */ diff --git a/sys/contrib/dev/acpica/acenv.h b/sys/contrib/dev/acpica/acenv.h index ea5cf30da69a..825ad596f9b6 100644 --- a/sys/contrib/dev/acpica/acenv.h +++ b/sys/contrib/dev/acpica/acenv.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acenv.h - Generation environment specific items - * $Revision: 101 $ + * $Revision: 104 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -189,7 +189,7 @@ /*! [Begin] no source code translation */ -#if defined(_LINUX) +#if defined(__linux__) #include "aclinux.h" #elif defined(_AED_EFI) @@ -260,14 +260,12 @@ #define DEBUGGER_SINGLE_THREADED 0 #define DEBUGGER_MULTI_THREADED 1 -#ifndef DEBUGGER_THREADING #ifdef ACPI_APPLICATION #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED #else #define DEBUGGER_THREADING DEBUGGER_MULTI_THREADED #endif -#endif /****************************************************************************** @@ -345,8 +343,8 @@ typedef char *va_list; * Storage alignment properties */ -#define _AUPBND (sizeof (NATIVE_INT) - 1) -#define _ADNBND (sizeof (NATIVE_INT) - 1) +#define _AUPBND (sizeof (ACPI_NATIVE_INT) - 1) +#define _ADNBND (sizeof (ACPI_NATIVE_INT) - 1) /* * Variable argument list macro definitions diff --git a/sys/contrib/dev/acpica/acfreebsd.h b/sys/contrib/dev/acpica/acfreebsd.h index e786c16b375b..9d3d5f32a721 100644 --- a/sys/contrib/dev/acpica/acfreebsd.h +++ b/sys/contrib/dev/acpica/acfreebsd.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acfreebsd.h - OS specific defines, etc. - * $Revision: 10 $ + * $Revision: 11 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -143,11 +143,15 @@ #include #include +#define asm __asm +#define __cli() disable_intr() +#define __sti() enable_intr() + +#ifdef ACPI_DEBUG_OUTPUT #ifdef DEBUGGER_THREADING #undef DEBUGGER_THREADING #endif /* DEBUGGER_THREADING */ #define DEBUGGER_THREADING 0 /* integrated with DDB */ -#ifdef ACPI_DEBUG_OUTPUT #include "opt_ddb.h" #ifdef DDB #define ACPI_DEBUGGER diff --git a/sys/contrib/dev/acpica/acgcc.h b/sys/contrib/dev/acpica/acgcc.h index 90ead141cd0f..af60e3aa7e67 100644 --- a/sys/contrib/dev/acpica/acgcc.h +++ b/sys/contrib/dev/acpica/acgcc.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acgcc.h - GCC specific defines, etc. - * $Revision: 23 $ + * $Revision: 25 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -122,4 +122,11 @@ */ #define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 4, 5))) +/* Some compilers complain about unused variables. Sometimes we don't want to + * use all the variables (most specifically for _THIS_MODULE). This allow us + * to to tell the compiler warning in a per-variable manner that a variable + * is unused. + */ +#define ACPI_UNUSED_VAR __attribute__ ((unused)) + #endif /* __ACGCC_H__ */ diff --git a/sys/contrib/dev/acpica/acpi.h b/sys/contrib/dev/acpica/acpi.h index 8e2023c1bb59..0ae41b20677a 100644 --- a/sys/contrib/dev/acpica/acpi.h +++ b/sys/contrib/dev/acpica/acpi.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acpi.h - Master include file, Publics and external data. - * $Revision: 55 $ + * $Revision: 56 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/acpiosxf.h b/sys/contrib/dev/acpica/acpiosxf.h index f35842e84ba9..acbd98503be5 100644 --- a/sys/contrib/dev/acpica/acpiosxf.h +++ b/sys/contrib/dev/acpica/acpiosxf.h @@ -12,7 +12,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -141,7 +141,7 @@ #define ACPI_SIGNAL_FATAL 0 #define ACPI_SIGNAL_BREAKPOINT 1 -typedef struct AcpiFatalInfo +typedef struct acpi_signal_fatal_info { UINT32 Type; UINT32 Code; @@ -185,6 +185,11 @@ AcpiOsGetRootPointer ( UINT32 Flags, ACPI_POINTER *Address); +ACPI_STATUS +AcpiOsPredefinedOverride ( + const ACPI_PREDEFINED_NAMES *InitVal, + ACPI_STRING *NewVal); + ACPI_STATUS AcpiOsTableOverride ( ACPI_TABLE_HEADER *ExistingTable, @@ -338,6 +343,14 @@ AcpiOsWritePciConfiguration ( ACPI_INTEGER Value, UINT32 Width); +/* + * Interim function needed for PCI IRQ routing + */ +void +AcpiOsDerivePciId( + ACPI_HANDLE rhandle, + ACPI_HANDLE chandle, + ACPI_PCI_ID **PciId); /* * Miscellaneous @@ -368,12 +381,12 @@ AcpiOsSignal ( void ACPI_INTERNAL_VAR_XFACE AcpiOsPrintf ( - const NATIVE_CHAR *Format, + const char *Format, ...); void AcpiOsVprintf ( - const NATIVE_CHAR *Format, + const char *Format, va_list Args); void @@ -387,9 +400,33 @@ AcpiOsRedirectOutput ( UINT32 AcpiOsGetLine ( - NATIVE_CHAR *Buffer); + char *Buffer); +/* + * Directory manipulation + */ + +void * +AcpiOsOpenDirectory ( + char *Pathname, + char *WildcardSpec, + char RequestedFileType); + +/* RequesteFileType values */ + +#define REQUEST_FILE_ONLY 0 +#define REQUEST_DIR_ONLY 1 + + +char * +AcpiOsGetNextFilename ( + void *DirHandle); + +void +AcpiOsCloseDirectory ( + void *DirHandle); + /* * Debug */ @@ -399,7 +436,7 @@ AcpiOsDbgAssert( void *FailedAssertion, void *FileName, UINT32 LineNumber, - NATIVE_CHAR *Message); + char *Message); #endif /* __ACPIOSXF_H__ */ diff --git a/sys/contrib/dev/acpica/acpixf.h b/sys/contrib/dev/acpica/acpixf.h index 7dddf89138de..ea1388889d93 100644 --- a/sys/contrib/dev/acpica/acpixf.h +++ b/sys/contrib/dev/acpica/acpixf.h @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -240,11 +240,11 @@ AcpiWalkNamespace ( UINT32 MaxDepth, ACPI_WALK_CALLBACK UserFunction, void *Context, - void * *ReturnValue); + void **ReturnValue); ACPI_STATUS AcpiGetDevices ( - NATIVE_CHAR *HID, + char *HID, ACPI_WALK_CALLBACK UserFunction, void *Context, void **ReturnValue); @@ -411,6 +411,12 @@ AcpiGetEventStatus ( * Resource interfaces */ +typedef +ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) ( + ACPI_RESOURCE *Resource, + void *Context); + + ACPI_STATUS AcpiGetCurrentResources( ACPI_HANDLE DeviceHandle, @@ -421,6 +427,13 @@ AcpiGetPossibleResources( ACPI_HANDLE DeviceHandle, ACPI_BUFFER *RetBuffer); +ACPI_STATUS +AcpiWalkResources ( + ACPI_HANDLE DeviceHandle, + char *Path, + ACPI_WALK_RESOURCE_CALLBACK UserFunction, + void *Context); + ACPI_STATUS AcpiSetCurrentResources ( ACPI_HANDLE DeviceHandle, @@ -431,6 +444,10 @@ AcpiGetIrqRoutingTable ( ACPI_HANDLE BusDeviceHandle, ACPI_BUFFER *RetBuffer); +ACPI_STATUS +AcpiResourceToAddress64 ( + ACPI_RESOURCE *Resource, + ACPI_RESOURCE_ADDRESS64 *Out); /* * Hardware (ACPI device) interfaces @@ -470,6 +487,10 @@ ACPI_STATUS AcpiEnterSleepState ( UINT8 SleepState); +ACPI_STATUS +AcpiEnterSleepStateS4bios ( + void); + ACPI_STATUS AcpiLeaveSleepState ( UINT8 SleepState); diff --git a/sys/contrib/dev/acpica/acutils.h b/sys/contrib/dev/acpica/acutils.h index e20dec647c19..31826e22d7d4 100644 --- a/sys/contrib/dev/acpica/acutils.h +++ b/sys/contrib/dev/acpica/acutils.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures - * $Revision: 148 $ + * $Revision: 154 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -140,6 +140,7 @@ typedef struct acpi_pkg_info ACPI_SIZE Length; UINT32 ObjectSpace; UINT32 NumPackages; + } ACPI_PKG_INFO; #define REF_INCREMENT (UINT16) 0 @@ -187,25 +188,25 @@ AcpiUtValidateFadt ( #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) -NATIVE_CHAR * +char * AcpiUtGetMutexName ( UINT32 MutexId); #endif -NATIVE_CHAR * +char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPE Type); -NATIVE_CHAR * +char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc); -NATIVE_CHAR * +char * AcpiUtGetRegionName ( UINT8 SpaceId); -NATIVE_CHAR * +char * AcpiUtGetEventName ( UINT32 EventId); @@ -231,51 +232,51 @@ AcpiUtAllocateOwnerId ( ACPI_SIZE AcpiUtStrlen ( - const NATIVE_CHAR *String); + const char *String); -NATIVE_CHAR * +char * AcpiUtStrcpy ( - NATIVE_CHAR *DstString, - const NATIVE_CHAR *SrcString); + char *DstString, + const char *SrcString); -NATIVE_CHAR * +char * AcpiUtStrncpy ( - NATIVE_CHAR *DstString, - const NATIVE_CHAR *SrcString, + char *DstString, + const char *SrcString, ACPI_SIZE Count); int AcpiUtStrncmp ( - const NATIVE_CHAR *String1, - const NATIVE_CHAR *String2, + const char *String1, + const char *String2, ACPI_SIZE Count); int AcpiUtStrcmp ( - const NATIVE_CHAR *String1, - const NATIVE_CHAR *String2); + const char *String1, + const char *String2); -NATIVE_CHAR * +char * AcpiUtStrcat ( - NATIVE_CHAR *DstString, - const NATIVE_CHAR *SrcString); + char *DstString, + const char *SrcString); -NATIVE_CHAR * +char * AcpiUtStrncat ( - NATIVE_CHAR *DstString, - const NATIVE_CHAR *SrcString, + char *DstString, + const char *SrcString, ACPI_SIZE Count); UINT32 AcpiUtStrtoul ( - const NATIVE_CHAR *String, - NATIVE_CHAR **Terminator, + const char *String, + char **Terminator, UINT32 Base); -NATIVE_CHAR * +char * AcpiUtStrstr ( - NATIVE_CHAR *String1, - NATIVE_CHAR *String2); + char *String1, + char *String2); void * AcpiUtMemcpy ( @@ -286,7 +287,7 @@ AcpiUtMemcpy ( void * AcpiUtMemset ( void *Dest, - NATIVE_UINT Value, + ACPI_NATIVE_UINT Value, ACPI_SIZE Count); int @@ -433,7 +434,7 @@ void AcpiUtTraceStr ( UINT32 LineNumber, ACPI_DEBUG_PRINT_INFO *DbgInfo, - NATIVE_CHAR *String); + char *String); void AcpiUtExit ( @@ -460,19 +461,19 @@ AcpiUtPtrExit ( void AcpiUtReportInfo ( - NATIVE_CHAR *ModuleName, + char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); void AcpiUtReportError ( - NATIVE_CHAR *ModuleName, + char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); void AcpiUtReportWarning ( - NATIVE_CHAR *ModuleName, + char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); @@ -536,11 +537,20 @@ AcpiUtDeleteInternalObjectList ( #define METHOD_NAME__SEG "_SEG" #define METHOD_NAME__BBN "_BBN" #define METHOD_NAME__PRT "_PRT" +#define METHOD_NAME__CRS "_CRS" +#define METHOD_NAME__PRS "_PRS" +ACPI_STATUS +AcpiUtEvaluateObject ( + ACPI_NAMESPACE_NODE *PrefixNode, + char *Path, + UINT32 ExpectedReturnBtypes, + ACPI_OPERAND_OBJECT **ReturnDesc); + ACPI_STATUS AcpiUtEvaluateNumericObject ( - NATIVE_CHAR *ObjectName, + char *ObjectName, ACPI_NAMESPACE_NODE *DeviceNode, ACPI_INTEGER *Address); @@ -600,14 +610,14 @@ AcpiUtReleaseMutex ( ACPI_OPERAND_OBJECT * AcpiUtCreateInternalObjectDbg ( - NATIVE_CHAR *ModuleName, + char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, ACPI_OBJECT_TYPE Type); void * AcpiUtAllocateObjectDescDbg ( - NATIVE_CHAR *ModuleName, + char *ModuleName, UINT32 LineNumber, UINT32 ComponentId); @@ -757,17 +767,17 @@ AcpiUtValidAcpiName ( BOOLEAN AcpiUtValidAcpiCharacter ( - NATIVE_CHAR Character); + char Character); ACPI_STATUS AcpiUtStrtoul64 ( - NATIVE_CHAR *String, + char *String, UINT32 Base, ACPI_INTEGER *RetInteger); -NATIVE_CHAR * +char * AcpiUtStrupr ( - NATIVE_CHAR *SrcString); + char *SrcString); UINT8 * AcpiUtGetResourceEndTag ( @@ -789,7 +799,8 @@ AcpiUtSetIntegerWidth ( #ifdef ACPI_DEBUG_OUTPUT void AcpiUtDisplayInitPathname ( - ACPI_HANDLE ObjHandle, + UINT8 Type, + ACPI_NAMESPACE_NODE *ObjHandle, char *Path); #endif @@ -828,14 +839,14 @@ void * AcpiUtAllocate ( ACPI_SIZE Size, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); void * AcpiUtCallocate ( ACPI_SIZE Size, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); @@ -845,21 +856,21 @@ void * AcpiUtAllocateAndTrack ( ACPI_SIZE Size, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); void * AcpiUtCallocateAndTrack ( ACPI_SIZE Size, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); void AcpiUtFreeAndTrack ( void *Address, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); ACPI_DEBUG_MEM_BLOCK * @@ -874,7 +885,7 @@ AcpiUtTrackAllocation ( ACPI_SIZE Size, UINT8 AllocType, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); ACPI_STATUS @@ -882,7 +893,7 @@ AcpiUtRemoveAllocation ( UINT32 ListId, ACPI_DEBUG_MEM_BLOCK *Address, UINT32 Component, - NATIVE_CHAR *Module, + char *Module, UINT32 Line); void @@ -892,7 +903,7 @@ AcpiUtDumpAllocationInfo ( void AcpiUtDumpAllocations ( UINT32 Component, - NATIVE_CHAR *Module); + char *Module); #endif diff --git a/sys/contrib/dev/acpica/dbcmds.c b/sys/contrib/dev/acpica/dbcmds.c index fb17c9c4168e..467256b4aeb7 100644 --- a/sys/contrib/dev/acpica/dbcmds.c +++ b/sys/contrib/dev/acpica/dbcmds.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbcmds - debug commands and output routines - * $Revision: 90 $ + * $Revision: 97 $ * ******************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -215,7 +215,7 @@ AcpiDbWalkForReferences ( void AcpiDbFindReferences ( - NATIVE_CHAR *ObjectArg) + char *ObjectArg) { ACPI_OPERAND_OBJECT *ObjDesc; @@ -273,7 +273,7 @@ AcpiDbDisplayLocks (void) void AcpiDbDisplayTableInfo ( - NATIVE_CHAR *TableArg) + char *TableArg) { UINT32 i; @@ -283,7 +283,7 @@ AcpiDbDisplayTableInfo ( if (AcpiGbl_AcpiTables[i].Pointer) { AcpiOsPrintf ("%s at %p length %X\n", AcpiGbl_AcpiTableData[i].Name, - AcpiGbl_AcpiTables[i].Pointer, + AcpiGbl_AcpiTables[i].Pointer, (UINT32) AcpiGbl_AcpiTables[i].Length); } } @@ -307,8 +307,8 @@ AcpiDbDisplayTableInfo ( void AcpiDbUnloadAcpiTable ( - NATIVE_CHAR *TableArg, - NATIVE_CHAR *InstanceArg) + char *TableArg, + char *InstanceArg) { UINT32 i; ACPI_STATUS Status; @@ -359,7 +359,7 @@ AcpiDbUnloadAcpiTable ( void AcpiDbSetMethodBreakpoint ( - NATIVE_CHAR *Location, + char *Location, ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op) { @@ -432,7 +432,7 @@ AcpiDbSetMethodCallBreakpoint ( void AcpiDbDisassembleAml ( - NATIVE_CHAR *Statements, + char *Statements, ACPI_PARSE_OBJECT *Op) { UINT32 NumStatements = 8; @@ -449,9 +449,7 @@ AcpiDbDisassembleAml ( NumStatements = ACPI_STRTOUL (Statements, NULL, 0); } -#ifdef ACPI_DISASSEMBLER AcpiDmDisassemble (NULL, Op, NumStatements); -#endif } @@ -471,8 +469,8 @@ AcpiDbDisassembleAml ( void AcpiDbDumpNamespace ( - NATIVE_CHAR *StartArg, - NATIVE_CHAR *DepthArg) + char *StartArg, + char *DepthArg) { ACPI_HANDLE SubtreeEntry = AcpiGbl_RootNode; UINT32 MaxDepth = ACPI_UINT32_MAX; @@ -547,8 +545,8 @@ AcpiDbDumpNamespace ( void AcpiDbDumpNamespaceByOwner ( - NATIVE_CHAR *OwnerArg, - NATIVE_CHAR *DepthArg) + char *OwnerArg, + char *DepthArg) { ACPI_HANDLE SubtreeEntry = AcpiGbl_RootNode; UINT32 MaxDepth = ACPI_UINT32_MAX; @@ -591,7 +589,7 @@ AcpiDbDumpNamespaceByOwner ( void AcpiDbSendNotify ( - NATIVE_CHAR *Name, + char *Name, UINT32 Value) { ACPI_NAMESPACE_NODE *Node; @@ -647,11 +645,11 @@ AcpiDbSendNotify ( void AcpiDbSetMethodData ( - NATIVE_CHAR *TypeArg, - NATIVE_CHAR *IndexArg, - NATIVE_CHAR *ValueArg) + char *TypeArg, + char *IndexArg, + char *ValueArg) { - NATIVE_CHAR Type; + char Type; UINT32 Index; UINT32 Value; ACPI_WALK_STATE *WalkState; @@ -703,7 +701,7 @@ AcpiDbSetMethodData ( /* Set a method argument */ - if (Index > MTH_MAX_ARG) + if (Index > ACPI_METHOD_MAX_ARG) { AcpiOsPrintf ("Arg%d - Invalid argument name\n", Index); return; @@ -725,7 +723,7 @@ AcpiDbSetMethodData ( /* Set a method local */ - if (Index > MTH_MAX_LOCAL) + if (Index > ACPI_METHOD_MAX_LOCAL) { AcpiOsPrintf ("Local%d - Invalid local variable name\n", Index); return; @@ -796,12 +794,12 @@ AcpiDbWalkForSpecificObjects ( switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) { case ACPI_TYPE_METHOD: - AcpiOsPrintf (" #Args %d Concurrency %X", + AcpiOsPrintf (" #Args %d Concurrency %X", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency); break; case ACPI_TYPE_INTEGER: - AcpiOsPrintf (" Value %8.8X%8.8X", + AcpiOsPrintf (" Value %8.8X%8.8X", ACPI_HIDWORD (ObjDesc->Integer.Value), ACPI_LODWORD (ObjDesc->Integer.Value)); break; @@ -811,7 +809,7 @@ AcpiDbWalkForSpecificObjects ( break; case ACPI_TYPE_REGION: - AcpiOsPrintf (" SpaceId %X Length %X Address %8.8X%8.8X", + AcpiOsPrintf (" SpaceId %X Length %X Address %8.8X%8.8X", ObjDesc->Region.SpaceId, ObjDesc->Region.Length, ACPI_HIDWORD (ObjDesc->Region.Address), @@ -852,8 +850,8 @@ AcpiDbWalkForSpecificObjects ( ACPI_STATUS AcpiDbDisplayObjects ( - NATIVE_CHAR *ObjTypeArg, - NATIVE_CHAR *DisplayCountArg) + char *ObjTypeArg, + char *DisplayCountArg) { ACPI_OBJECT_TYPE Type; @@ -904,7 +902,7 @@ AcpiDbWalkAndMatchName ( void **ReturnValue) { ACPI_STATUS Status; - NATIVE_CHAR *RequestedName = (NATIVE_CHAR *) Context; + char *RequestedName = (char *) Context; UINT32 i; ACPI_BUFFER Buffer; @@ -959,7 +957,7 @@ AcpiDbWalkAndMatchName ( ACPI_STATUS AcpiDbFindNameInNamespace ( - NATIVE_CHAR *NameArg) + char *NameArg) { if (ACPI_STRLEN (NameArg) > 4) @@ -993,7 +991,7 @@ AcpiDbFindNameInNamespace ( void AcpiDbSetScope ( - NATIVE_CHAR *Name) + char *Name) { ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; @@ -1060,7 +1058,7 @@ AcpiDbSetScope ( void AcpiDbDisplayResources ( - NATIVE_CHAR *ObjectArg) + char *ObjectArg) { #if ACPI_MACHINE_WIDTH != 16 @@ -1184,12 +1182,6 @@ AcpiDbDisplayResources ( } -typedef struct -{ - UINT32 Nodes; - UINT32 Objects; -} ACPI_INTEGRITY_INFO; - /******************************************************************************* * * FUNCTION: AcpiDbIntegrityWalk @@ -1274,4 +1266,42 @@ AcpiDbCheckIntegrity (void) } + +/******************************************************************************* + * + * FUNCTION: AcpiDbGenerateGpe + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Generate a GPE + * + ******************************************************************************/ + +void +AcpiDbGenerateGpe ( + char *GpeArg, + char *BlockArg) +{ + UINT32 BlockNumber; + UINT32 GpeNumber; + ACPI_GPE_EVENT_INFO *GpeEventInfo; + + + GpeNumber = ACPI_STRTOUL (GpeArg, NULL, 10); + BlockNumber = ACPI_STRTOUL (BlockArg, NULL, 10); + + + GpeEventInfo = AcpiEvGetGpeEventInfo (GpeNumber); + if (!GpeEventInfo) + { + AcpiOsPrintf ("Invalid GPE\n"); + return; + } + + AcpiEvGpeDispatch (GpeEventInfo); + +} + #endif /* ACPI_DEBUGGER */ diff --git a/sys/contrib/dev/acpica/dbxface.c b/sys/contrib/dev/acpica/dbxface.c index a1636a48fbb2..74542bd7d609 100644 --- a/sys/contrib/dev/acpica/dbxface.c +++ b/sys/contrib/dev/acpica/dbxface.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbxface - AML Debugger external interfaces - * $Revision: 65 $ + * $Revision: 70 $ * ******************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -127,6 +127,113 @@ ACPI_MODULE_NAME ("dbxface") +/******************************************************************************* + * + * FUNCTION: AcpiDbStartCommand + * + * PARAMETERS: WalkState - Current walk + * + * RETURN: Status + * + * DESCRIPTION: Enter debugger command loop + * + ******************************************************************************/ + +ACPI_STATUS +AcpiDbStartCommand ( + ACPI_WALK_STATE *WalkState, + ACPI_PARSE_OBJECT *Op) +{ + ACPI_STATUS Status; + + + /* TBD: [Investigate] what are the namespace locking issues here */ + + /* AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); */ + + /* Go into the command loop and await next user command */ + + + AcpiGbl_MethodExecuting = TRUE; + Status = AE_CTRL_TRUE; + while (Status == AE_CTRL_TRUE) + { + if (AcpiGbl_DebuggerConfiguration == DEBUGGER_MULTI_THREADED) + { + /* Handshake with the front-end that gets user command lines */ + + Status = AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_COMPLETE); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + else + { + /* Single threaded, we must get a command line ourselves */ + + /* Force output to console until a command is entered */ + + AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); + + /* Different prompt if method is executing */ + + if (!AcpiGbl_MethodExecuting) + { + AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT); + } + else + { + AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT); + } + + /* Get the user input line */ + + (void) AcpiOsGetLine (AcpiGbl_DbLineBuf); + } + + Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, WalkState, Op); + } + + /* AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); */ + + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbMethodEnd + * + * PARAMETERS: WalkState - Current walk + * + * RETURN: Status + * + * DESCRIPTION: + * + ******************************************************************************/ + +void +AcpiDbMethodEnd ( + ACPI_WALK_STATE *WalkState) +{ + + if (!AcpiGbl_CmSingleStep) + { + return; + } + + AcpiOsPrintf ("\n"); + + AcpiDbStartCommand (WalkState, NULL); +} + + /******************************************************************************* * * FUNCTION: AcpiDbSingleStep @@ -156,6 +263,15 @@ AcpiDbSingleStep ( ACPI_FUNCTION_ENTRY (); + + /* Check the abort flag */ + + if (AcpiGbl_AbortMethod) + { + AcpiGbl_AbortMethod = FALSE; + return (AE_ABORT_METHOD); + } + /* Check for single-step breakpoint */ if (WalkState->MethodBreakpoint && @@ -181,7 +297,6 @@ AcpiDbSingleStep ( WalkState->MethodBreakpoint = 0; } - /* * Check if this is an opcode that we are interested in -- * namely, opcodes that have arguments @@ -269,9 +384,7 @@ AcpiDbSingleStep ( /* Now we can display it */ -#ifdef ACPI_DISASSEMBLER AcpiDmDisassemble (WalkState, DisplayOp, ACPI_UINT32_MAX); -#endif if ((Op->Common.AmlOpcode == AML_IF_OP) || (Op->Common.AmlOpcode == AML_WHILE_OP)) @@ -285,7 +398,6 @@ AcpiDbSingleStep ( AcpiOsPrintf ("Predicate = [False], Skipping IF block\n"); } } - else if (Op->Common.AmlOpcode == AML_ELSE_OP) { AcpiOsPrintf ("Predicate = [False], ELSE block was executed\n"); @@ -342,60 +454,7 @@ AcpiDbSingleStep ( } - /* TBD: [Investigate] what are the namespace locking issues here */ - - /* AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); */ - - /* Go into the command loop and await next user command */ - - AcpiGbl_MethodExecuting = TRUE; - Status = AE_CTRL_TRUE; - while (Status == AE_CTRL_TRUE) - { - if (AcpiGbl_DebuggerConfiguration == DEBUGGER_MULTI_THREADED) - { - /* Handshake with the front-end that gets user command lines */ - - Status = AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_COMPLETE); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - } - - else - { - /* Single threaded, we must get a command line ourselves */ - - /* Force output to console until a command is entered */ - - AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); - - /* Different prompt if method is executing */ - - if (!AcpiGbl_MethodExecuting) - { - AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT); - } - else - { - AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT); - } - - /* Get the user input line */ - - (void) AcpiOsGetLine (AcpiGbl_DbLineBuf); - } - - Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, WalkState, Op); - } - - /* AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); */ + Status = AcpiDbStartCommand (WalkState, Op); /* User commands complete, continue execution of the interrupted method */ @@ -428,15 +487,13 @@ AcpiDbInitialize (void) AcpiGbl_DbOutputToFile = FALSE; AcpiGbl_DbDebugLevel = ACPI_LV_VERBOSITY2; - AcpiGbl_DbConsoleDebugLevel = NORMAL_DEFAULT | ACPI_LV_TABLES; + AcpiGbl_DbConsoleDebugLevel = ACPI_NORMAL_DEFAULT | ACPI_LV_TABLES; AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT; AcpiGbl_DbOpt_tables = FALSE; - AcpiGbl_DbOpt_stats = FALSE; -#ifdef ACPI_DISASSEMBLER AcpiGbl_DbOpt_disasm = FALSE; + AcpiGbl_DbOpt_stats = FALSE; AcpiGbl_DbOpt_verbose = TRUE; -#endif AcpiGbl_DbOpt_ini_methods = TRUE; AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE); @@ -467,6 +524,7 @@ AcpiDbInitialize (void) AcpiOsPrintf ("Could not get debugger mutex\n"); return (Status); } + Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY); if (ACPI_FAILURE (Status)) { @@ -484,13 +542,11 @@ AcpiDbInitialize (void) } } -#ifdef ACPI_DISASSEMBLER if (!AcpiGbl_DbOpt_verbose) { AcpiGbl_DbOpt_disasm = TRUE; AcpiGbl_DbOpt_stats = FALSE; } -#endif return (AE_OK); } diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c index 9ddd6e8f9b76..9bfc5d944498 100644 --- a/sys/contrib/dev/acpica/exfldio.c +++ b/sys/contrib/dev/acpica/exfldio.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: exfldio - Aml Field I/O - * $Revision: 90 $ + * $Revision: 92 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -260,7 +260,7 @@ AcpiExAccessRegion ( ACPI_FUNCTION_TRACE ("ExAccessRegion"); - /* + /* * Ensure that the region operands are fully evaluated and verify * the validity of the request */ diff --git a/sys/contrib/dev/acpica/exsystem.c b/sys/contrib/dev/acpica/exsystem.c index 04119b2f9dd6..36380f9f4f9b 100644 --- a/sys/contrib/dev/acpica/exsystem.c +++ b/sys/contrib/dev/acpica/exsystem.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exsystem - Interface to OS services - * $Revision: 74 $ + * $Revision: 75 $ * *****************************************************************************/ @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c index dd085b903deb..50b0fa9f114b 100644 --- a/sys/contrib/dev/acpica/hwsleep.c +++ b/sys/contrib/dev/acpica/hwsleep.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface - * $Revision: 47 $ + * $Revision: 52 $ * *****************************************************************************/ @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -288,7 +288,6 @@ AcpiEnterSleepState ( ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo; ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo; UINT32 InValue; - UINT32 Retry; ACPI_STATUS Status; @@ -337,12 +336,12 @@ AcpiEnterSleepState ( /* Get current value of PM1A control */ - Status = AcpiHwRegisterRead (ACPI_MTX_LOCK, ACPI_REGISTER_PM1_CONTROL, &PM1AControl); + Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_CONTROL, &PM1AControl); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - ACPI_DEBUG_PRINT ((ACPI_DB_OK, "Entering S%d\n", SleepState)); + ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Entering sleep state [S%d]\n", SleepState)); /* Clear SLP_EN and SLP_TYP fields */ @@ -356,13 +355,13 @@ AcpiEnterSleepState ( /* Write #1: fill in SLP_TYP data */ - Status = AcpiHwRegisterWrite (ACPI_MTX_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1AControl); + Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1AControl); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - Status = AcpiHwRegisterWrite (ACPI_MTX_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1BControl); + Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1BControl); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -377,13 +376,13 @@ AcpiEnterSleepState ( ACPI_FLUSH_CPU_CACHE (); - Status = AcpiHwRegisterWrite (ACPI_MTX_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1AControl); + Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1AControl); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - Status = AcpiHwRegisterWrite (ACPI_MTX_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1BControl); + Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1BControl); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -401,7 +400,7 @@ AcpiEnterSleepState ( */ AcpiOsStall (10000000); - Status = AcpiHwRegisterWrite (ACPI_MTX_LOCK, ACPI_REGISTER_PM1_CONTROL, + Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_CONTROL, SleepEnableRegInfo->AccessBitMask); if (ACPI_FAILURE (Status)) { @@ -411,28 +410,19 @@ AcpiEnterSleepState ( /* Wait until we enter sleep state */ - Retry = 1000; do { - Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue, ACPI_MTX_LOCK); + Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue, ACPI_MTX_DO_NOT_LOCK); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - /* - * Some BIOSes don't set WAK_STS at all, - * give up waiting for wakeup if we time out. - */ - if (Retry-- == 0) { - break; /* giving up */ - } - /* Spin until we wake */ } while (!InValue); - Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK); + Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -441,6 +431,52 @@ AcpiEnterSleepState ( return_ACPI_STATUS (AE_OK); } + +/****************************************************************************** + * + * FUNCTION: AcpiEnterSleepStateS4bios + * + * PARAMETERS: None + * + * RETURN: Status + * + * DESCRIPTION: Perform a S4 bios request. + * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED + * + ******************************************************************************/ + +ACPI_STATUS +AcpiEnterSleepStateS4bios ( + void) +{ + UINT32 InValue; + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE ("AcpiEnterSleepStateS4bios"); + + AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK); + AcpiHwClearAcpiStatus(); + + AcpiHwDisableNonWakeupGpes(); + + ACPI_FLUSH_CPU_CACHE(); + + Status = AcpiOsWritePort (AcpiGbl_FADT->SmiCmd, (ACPI_INTEGER) AcpiGbl_FADT->S4BiosReq, 8); + + do { + AcpiOsStall(1000); + Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue, ACPI_MTX_DO_NOT_LOCK); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + } while (!InValue); + + return_ACPI_STATUS (AE_OK); +} + + /****************************************************************************** * * FUNCTION: AcpiLeaveSleepState diff --git a/sys/contrib/dev/acpica/psparse.c b/sys/contrib/dev/acpica/psparse.c index 488adc7b751c..dc6c729a73ac 100644 --- a/sys/contrib/dev/acpica/psparse.c +++ b/sys/contrib/dev/acpica/psparse.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: psparse - Parser top level AML parse routines - * $Revision: 135 $ + * $Revision: 139 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -580,7 +580,7 @@ AcpiPsParseLoop ( Status = AcpiPsNextParseState (WalkState, Op, Status); } - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op)); } @@ -604,7 +604,7 @@ AcpiPsParseLoop ( { /* Get the next opcode from the AML stream */ - WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml, + WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml, ParserState->AmlStart); WalkState->Opcode = AcpiPsPeekOpcode (ParserState); @@ -835,7 +835,7 @@ AcpiPsParseLoop ( /* Op is not a constant or string, append each argument */ - while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && + while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && !WalkState->ArgCount) { WalkState->AmlOffset = ACPI_PTR_DIFF (ParserState->Aml, @@ -922,7 +922,7 @@ AcpiPsParseLoop ( { /* There are arguments (complex ones), push Op and prepare for argument */ - Status = AcpiPsPushScope (ParserState, Op, + Status = AcpiPsPushScope (ParserState, Op, WalkState->ArgTypes, WalkState->ArgCount); if (ACPI_FAILURE (Status)) { @@ -1013,7 +1013,7 @@ AcpiPsParseLoop ( case AE_CTRL_END: - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); if (Op) @@ -1039,7 +1039,7 @@ AcpiPsParseLoop ( while (!Op || (Op->Common.AmlOpcode != AML_WHILE_OP)) { - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); } @@ -1070,7 +1070,7 @@ AcpiPsParseLoop ( { AcpiPsCompleteThisOp (WalkState, Op); } - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); } while (Op); @@ -1086,7 +1086,7 @@ AcpiPsParseLoop ( { AcpiPsCompleteThisOp (WalkState, Op); } - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); } while (Op); @@ -1098,7 +1098,7 @@ AcpiPsParseLoop ( #if 0 if (Op == NULL) { - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); } #endif @@ -1111,7 +1111,7 @@ AcpiPsParseLoop ( if (AcpiPsHasCompletedScope (ParserState)) { - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op)); } @@ -1160,7 +1160,7 @@ AcpiPsParseLoop ( AcpiPsCompleteThisOp (WalkState, Op); } - AcpiPsPopScope (ParserState, &Op, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); } while (Op); @@ -1178,7 +1178,7 @@ AcpiPsParseLoop ( AcpiPsCompleteThisOp (WalkState, Op); } - AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, + AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes, &WalkState->ArgCount); } while (Op); @@ -1212,9 +1212,6 @@ AcpiPsParseAml ( ACPI_THREAD_STATE *Thread; ACPI_THREAD_STATE *PrevWalkList = AcpiGbl_CurrentWalkList; ACPI_WALK_STATE *PreviousWalkState; - ACPI_OPERAND_OBJECT **CallerReturnDesc = WalkState->CallerReturnDesc; - ACPI_OPERAND_OBJECT *EffectiveReturnDesc = NULL; - ACPI_FUNCTION_TRACE ("PsParseAml"); @@ -1259,7 +1256,7 @@ AcpiPsParseAml ( } ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Completed one call to walk loop, %s State=%p\n", + "Completed one call to walk loop, %s State=%p\n", AcpiFormatException (Status), WalkState)); if (Status == AE_CTRL_TRANSFER) @@ -1283,23 +1280,13 @@ AcpiPsParseAml ( } else if (Status != AE_OK) { - ACPI_REPORT_ERROR (("Method execution failed, %s\n", - AcpiFormatException (Status))); - ACPI_DUMP_PATHNAME (WalkState->MethodNode, "Method pathname: ", - ACPI_LV_ERROR, _COMPONENT); + ACPI_REPORT_METHOD_ERROR ("Method execution failed", + WalkState->MethodNode, NULL, Status); } /* We are done with this walk, move on to the parent if any */ WalkState = AcpiDsPopWalkState (Thread); - /* Save the last effective return value */ - - if (CallerReturnDesc && WalkState->ReturnDesc) - { - AcpiUtRemoveReference (EffectiveReturnDesc); - EffectiveReturnDesc = WalkState->ReturnDesc; - AcpiUtAddReference (EffectiveReturnDesc); - } /* Reset the current scope to the beginning of scope stack */ @@ -1342,7 +1329,7 @@ AcpiPsParseAml ( * If the method return value is not used by the parent, * The object is deleted */ - Status = AcpiDsRestartControlMethod (WalkState, + Status = AcpiDsRestartControlMethod (WalkState, PreviousWalkState->ReturnDesc); if (ACPI_SUCCESS (Status)) { @@ -1363,17 +1350,6 @@ AcpiPsParseAml ( */ else if (PreviousWalkState->CallerReturnDesc) { - /* - * Some AML code expects return value w/o ReturnOp. - * Return the saved effective return value instead. - */ - - if (PreviousWalkState->ReturnDesc == NULL && EffectiveReturnDesc != NULL) - { - PreviousWalkState->ReturnDesc = EffectiveReturnDesc; - AcpiUtAddReference (PreviousWalkState->ReturnDesc); - } - *(PreviousWalkState->CallerReturnDesc) = PreviousWalkState->ReturnDesc; /* NULL if no return value */ } else if (PreviousWalkState->ReturnDesc) @@ -1388,7 +1364,6 @@ AcpiPsParseAml ( /* Normal exit */ - AcpiUtRemoveReference (EffectiveReturnDesc); AcpiExReleaseAllMutexes (Thread); AcpiUtDeleteGenericState (ACPI_CAST_PTR (ACPI_GENERIC_STATE, Thread)); AcpiGbl_CurrentWalkList = PrevWalkList; diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c index 22355504dced..83fee4f42031 100644 --- a/sys/contrib/dev/acpica/rscreate.c +++ b/sys/contrib/dev/acpica/rscreate.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: rscreate - Create resource lists/tables - * $Revision: 61 $ + * $Revision: 64 $ * ******************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -159,7 +159,7 @@ AcpiRsCreateResourceList ( ACPI_FUNCTION_TRACE ("RsCreateResourceList"); - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ByteStreamBuffer = %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ByteStreamBuffer = %p\n", ByteStreamBuffer)); /* @@ -259,7 +259,7 @@ AcpiRsCreatePciRoutingTable ( return_ACPI_STATUS (Status); } - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "BufferSizeNeeded = %X\n", + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "BufferSizeNeeded = %X\n", (UINT32) BufferSizeNeeded)); /* Validate/Allocate/Clear caller buffer */ @@ -271,7 +271,7 @@ AcpiRsCreatePciRoutingTable ( } /* - * Loop through the ACPI_INTERNAL_OBJECTS - Each object + * Loop through the ACPI_INTERNAL_OBJECTS - Each object * should be a package that in turn contains an * ACPI_INTEGER Address, a UINT8 Pin, a Name and a UINT8 SourceIndex. */ @@ -303,7 +303,7 @@ AcpiRsCreatePciRoutingTable ( */ if (ACPI_GET_OBJECT_TYPE (*TopObjectList) != ACPI_TYPE_PACKAGE) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X]) Need sub-package, found %s\n", Index, AcpiUtGetObjectTypeName (*TopObjectList))); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); @@ -313,7 +313,7 @@ AcpiRsCreatePciRoutingTable ( if ((*TopObjectList)->Package.Count != 4) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X]) Need package of length 4, found length %d\n", Index, (*TopObjectList)->Package.Count)); return_ACPI_STATUS (AE_AML_PACKAGE_LIMIT); @@ -336,7 +336,7 @@ AcpiRsCreatePciRoutingTable ( } else { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X].Address) Need Integer, found %s\n", Index, AcpiUtGetObjectTypeName (ObjDesc))); return_ACPI_STATUS (AE_BAD_DATA); @@ -352,7 +352,7 @@ AcpiRsCreatePciRoutingTable ( } else { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X].Pin) Need Integer, found %s\n", Index, AcpiUtGetObjectTypeName (ObjDesc))); return_ACPI_STATUS (AE_BAD_DATA); @@ -368,7 +368,7 @@ AcpiRsCreatePciRoutingTable ( if (ObjDesc->Reference.Opcode != AML_INT_NAMEPATH_OP) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X].Source) Need name, found reference op %X\n", Index, ObjDesc->Reference.Opcode)); return_ACPI_STATUS (AE_BAD_DATA); @@ -379,7 +379,7 @@ AcpiRsCreatePciRoutingTable ( /* Use *remaining* length of the buffer as max for pathname */ PathBuffer.Length = OutputBuffer->Length - - (UINT32) ((UINT8 *) UserPrt->Source - + (UINT32) ((UINT8 *) UserPrt->Source - (UINT8 *) OutputBuffer->Pointer); PathBuffer.Pointer = UserPrt->Source; @@ -393,9 +393,9 @@ AcpiRsCreatePciRoutingTable ( ACPI_STRCPY (UserPrt->Source, ObjDesc->String.Pointer); - /* Add to the Length field the length of the string */ + /* Add to the Length field the length of the string (add 1 for terminator) */ - UserPrt->Length += ObjDesc->String.Length; + UserPrt->Length += ObjDesc->String.Length + 1; break; @@ -412,7 +412,7 @@ AcpiRsCreatePciRoutingTable ( default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X].Source) Need Ref/String/Integer, found %s\n", Index, AcpiUtGetObjectTypeName (ObjDesc))); return_ACPI_STATUS (AE_BAD_DATA); @@ -432,7 +432,7 @@ AcpiRsCreatePciRoutingTable ( } else { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(PRT[%X].SourceIndex) Need Integer, found %s\n", Index, AcpiUtGetObjectTypeName (ObjDesc))); return_ACPI_STATUS (AE_BAD_DATA); @@ -479,7 +479,7 @@ AcpiRsCreateByteStream ( ACPI_FUNCTION_TRACE ("RsCreateByteStream"); - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "LinkedListBuffer = %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "LinkedListBuffer = %p\n", LinkedListBuffer)); /* diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c index 6f9b9f8c3fd7..9dc70b62516f 100644 --- a/sys/contrib/dev/acpica/tbget.c +++ b/sys/contrib/dev/acpica/tbget.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: tbget - ACPI Table get* routines - * $Revision: 81 $ + * $Revision: 83 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -226,8 +226,8 @@ AcpiTbGetTableHeader ( if (ACPI_FAILURE (Status)) { ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n", - ACPI_HIDWORD (Address->Pointer.Physical), - ACPI_LODWORD (Address->Pointer.Physical), + ACPI_HIDWORD (Address->Pointer.Physical), + ACPI_LODWORD (Address->Pointer.Physical), sizeof (ACPI_TABLE_HEADER))); return_ACPI_STATUS (Status); } @@ -451,7 +451,7 @@ AcpiTbGetThisTable ( { ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n", Header->Signature, - ACPI_HIDWORD (Address->Pointer.Physical), + ACPI_HIDWORD (Address->Pointer.Physical), ACPI_LODWORD (Address->Pointer.Physical), Header->Length)); return (Status); } diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c index 52be7a0a7476..2611ea2adc90 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: 172 $ + * $Revision: 180 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. * All rights reserved. * * 2. License @@ -224,9 +224,9 @@ AcpiFormatException ( /* Debug switch - level and trace mask */ #ifdef ACPI_DEBUG_OUTPUT -UINT32 AcpiDbgLevel = DEBUG_DEFAULT; +UINT32 AcpiDbgLevel = ACPI_DEBUG_DEFAULT; #else -UINT32 AcpiDbgLevel = NORMAL_DEFAULT; +UINT32 AcpiDbgLevel = ACPI_NORMAL_DEFAULT; #endif /* Debug switch - layer (component) mask */ @@ -238,6 +238,7 @@ UINT32 AcpiGbl_NestingLevel = 0; /* Debugger globals */ BOOLEAN AcpiGbl_DbTerminateThreads = FALSE; +BOOLEAN AcpiGbl_AbortMethod = FALSE; BOOLEAN AcpiGbl_MethodExecuting = FALSE; /* System flags */ @@ -250,9 +251,13 @@ BOOLEAN AcpiGbl_Shutdown = TRUE; const UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128}; -const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES] = { - "\\_S0_","\\_S1_","\\_S2_","\\_S3_", - "\\_S4_","\\_S5_","\\_S4B"}; +const char *AcpiGbl_DbSleepStates[ACPI_S_STATE_COUNT] = { + "\\_S0_", + "\\_S1_", + "\\_S2_", + "\\_S3_", + "\\_S4_", + "\\_S5_"}; /****************************************************************************** @@ -333,7 +338,7 @@ const UINT8 AcpiGbl_NsProperties[] = /* Hex to ASCII conversion table */ -static const NATIVE_CHAR AcpiGbl_HexToAscii[] = +static const char AcpiGbl_HexToAscii[] = {'0','1','2','3','4','5','6','7', '8','9','A','B','C','D','E','F'}; @@ -451,8 +456,9 @@ ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] = /* Region type decoding */ -const NATIVE_CHAR *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = +const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = { +/*! [Begin] no source code translation (keep these ASL Keywords as-is) */ "SystemMemory", "SystemIO", "PCI_Config", @@ -460,11 +466,12 @@ const NATIVE_CHAR *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = "SMBus", "CMOS", "PCIBARTarget", - "DataTable", + "DataTable" +/*! [End] no source code translation !*/ }; -NATIVE_CHAR * +char * AcpiUtGetRegionName ( UINT8 SpaceId) { @@ -476,10 +483,10 @@ AcpiUtGetRegionName ( else if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS) { - return ("InvalidSpaceID"); + return ("InvalidSpaceId"); } - return ((NATIVE_CHAR *) AcpiGbl_RegionTypes[SpaceId]); + return ((char *) AcpiGbl_RegionTypes[SpaceId]); } @@ -497,7 +504,7 @@ AcpiUtGetRegionName ( /* Event type decoding */ -static const NATIVE_CHAR *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = +static const char *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = { "PM_Timer", "GlobalLock", @@ -507,7 +514,7 @@ static const NATIVE_CHAR *AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS] = }; -NATIVE_CHAR * +char * AcpiUtGetEventName ( UINT32 EventId) { @@ -517,7 +524,7 @@ AcpiUtGetEventName ( return ("InvalidEventID"); } - return ((NATIVE_CHAR *) AcpiGbl_EventTypes[EventId]); + return ((char *) AcpiGbl_EventTypes[EventId]); } @@ -542,10 +549,10 @@ AcpiUtGetEventName ( * indicatewhat type is actually going to be stored for this entry. */ -static const NATIVE_CHAR AcpiGbl_BadType[] = "UNDEFINED"; +static const char AcpiGbl_BadType[] = "UNDEFINED"; #define TYPE_NAME_LENGTH 12 /* Maximum length of each string */ -static const NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */ +static const char *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */ { /* 00 */ "Untyped", /* 01 */ "Integer", @@ -580,21 +587,21 @@ static const NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of AC }; -NATIVE_CHAR * +char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPE Type) { if (Type > ACPI_TYPE_INVALID) { - return ((NATIVE_CHAR *) AcpiGbl_BadType); + return ((char *) AcpiGbl_BadType); } - return ((NATIVE_CHAR *) AcpiGbl_NsTypeNames[Type]); + return ((char *) AcpiGbl_NsTypeNames[Type]); } -NATIVE_CHAR * +char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc) { @@ -627,7 +634,7 @@ AcpiUtGetObjectTypeName ( * ****************************************************************************/ -NATIVE_CHAR * +char * AcpiUtGetMutexName ( UINT32 MutexId) { @@ -768,11 +775,11 @@ AcpiUtInitGlobals ( AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ObjectSize = sizeof (ACPI_OPERAND_OBJECT); AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ObjectSize = sizeof (ACPI_WALK_STATE); - AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].MaxCacheDepth = MAX_STATE_CACHE_DEPTH; - AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].MaxCacheDepth = MAX_PARSE_CACHE_DEPTH; - AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].MaxCacheDepth = MAX_EXTPARSE_CACHE_DEPTH; - AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].MaxCacheDepth = MAX_OBJECT_CACHE_DEPTH; - AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].MaxCacheDepth = MAX_WALK_CACHE_DEPTH; + AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].MaxCacheDepth = ACPI_MAX_STATE_CACHE_DEPTH; + AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].MaxCacheDepth = ACPI_MAX_PARSE_CACHE_DEPTH; + AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].MaxCacheDepth = ACPI_MAX_EXTPARSE_CACHE_DEPTH; + AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].MaxCacheDepth = ACPI_MAX_OBJECT_CACHE_DEPTH; + AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].MaxCacheDepth = ACPI_MAX_WALK_CACHE_DEPTH; ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].ListName = "Global Memory Allocation"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ListName = "Namespace Nodes"); @@ -803,6 +810,10 @@ AcpiUtInitGlobals ( AcpiGbl_AcpiMutexInfo[i].UseCount = 0; } + /* GPE support */ + + AcpiGbl_GpeBlockListHead = NULL; + /* Global notify handlers */ AcpiGbl_SysNotify.Handler = NULL; @@ -840,8 +851,6 @@ AcpiUtInitGlobals ( /* Hardware oriented */ - AcpiGbl_GpeRegisterInfo = NULL; - AcpiGbl_GpeNumberInfo = NULL; AcpiGbl_EventsInitialized = FALSE; /* Namespace */