ReactOS  0.4.14-dev-606-g14ebc0b
acutils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  acpi_pkg_info
 

Macros

#define ACPI_MSG_REDIRECT_BEGIN
 
#define ACPI_MSG_REDIRECT_END
 
#define ACPI_MSG_ERROR   "ACPI Error: "
 
#define ACPI_MSG_WARNING   "ACPI Warning: "
 
#define ACPI_MSG_INFO   "ACPI: "
 
#define ACPI_MSG_BIOS_ERROR   "Firmware Error (ACPI): "
 
#define ACPI_MSG_BIOS_WARNING   "Firmware Warning (ACPI): "
 
#define ACPI_MSG_SUFFIX   AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber)
 
#define ACPI_IMPLICIT_CONVERSION   TRUE
 
#define ACPI_NO_IMPLICIT_CONVERSION   FALSE
 
#define ACPI_INVALID_RESOURCE   0
 
#define ACPI_FIXED_LENGTH   1
 
#define ACPI_VARIABLE_LENGTH   2
 
#define ACPI_SMALL_VARIABLE_LENGTH   3
 
#define REF_INCREMENT   (UINT16) 0
 
#define REF_DECREMENT   (UINT16) 1
 
#define DB_BYTE_DISPLAY   0x01
 
#define DB_WORD_DISPLAY   0x02
 
#define DB_DWORD_DISPLAY   0x04
 
#define DB_QWORD_DISPLAY   0x08
 
#define DB_DISPLAY_DATA_ONLY   0x10
 
#define AcpiUtCreateInternalObject(t)   AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
 
#define AcpiUtAllocateObjectDesc()   AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
 
#define ACPI_ANY_BASE   0
 

Typedefs

typedef ACPI_STATUS(* ACPI_WALK_AML_CALLBACK) (UINT8 *Aml, UINT32 Length, UINT32 Offset, UINT8 ResourceIndex, void **Context)
 
typedef ACPI_STATUS(* ACPI_PKG_CALLBACK) (UINT8 ObjectType, ACPI_OPERAND_OBJECT *SourceObject, ACPI_GENERIC_STATE *State, void *Context)
 
typedef struct acpi_pkg_info ACPI_PKG_INFO
 

Functions

BOOLEAN AcpiUtValidNameseg (char *Signature)
 
BOOLEAN AcpiUtValidNameChar (char Character, UINT32 Position)
 
void AcpiUtCheckAndRepairAscii (UINT8 *Name, char *RepairedName, UINT32 Count)
 
void AcpiUtStrupr (char *SrcString)
 
void AcpiUtStrlwr (char *SrcString)
 
int AcpiUtStricmp (char *String1, char *String2)
 
ACPI_STATUS AcpiUtConvertOctalString (char *String, UINT64 *ReturnValue)
 
ACPI_STATUS AcpiUtConvertDecimalString (char *String, UINT64 *ReturnValuePtr)
 
ACPI_STATUS AcpiUtConvertHexString (char *String, UINT64 *ReturnValuePtr)
 
char AcpiUtRemoveWhitespace (char **String)
 
char AcpiUtRemoveLeadingZeros (char **String)
 
BOOLEAN AcpiUtDetectHexPrefix (char **String)
 
void AcpiUtRemoveHexPrefix (char **String)
 
BOOLEAN AcpiUtDetectOctalPrefix (char **String)
 
ACPI_STATUS AcpiUtStrtoul64 (char *String, UINT64 *RetInteger)
 
UINT64 AcpiUtExplicitStrtoul64 (char *String)
 
UINT64 AcpiUtImplicitStrtoul64 (char *String)
 
ACPI_STATUS AcpiUtInitGlobals (void)
 
const charAcpiUtGetMutexName (UINT32 MutexId)
 
const charAcpiUtGetTypeName (ACPI_OBJECT_TYPE Type)
 
const charAcpiUtGetNodeName (void *Object)
 
const charAcpiUtGetDescriptorName (void *Object)
 
const charAcpiUtGetReferenceName (ACPI_OPERAND_OBJECT *Object)
 
const charAcpiUtGetObjectTypeName (ACPI_OPERAND_OBJECT *ObjDesc)
 
const charAcpiUtGetRegionName (UINT8 SpaceId)
 
const charAcpiUtGetEventName (UINT32 EventId)
 
const charAcpiUtGetArgumentTypeName (UINT32 ArgType)
 
char AcpiUtHexToAsciiChar (UINT64 Integer, UINT32 Position)
 
ACPI_STATUS AcpiUtAsciiToHexByte (char *TwoAsciiChars, UINT8 *ReturnByte)
 
UINT8 AcpiUtAsciiCharToHex (int HexChar)
 
BOOLEAN AcpiUtValidObjectType (ACPI_OBJECT_TYPE Type)
 
ACPI_STATUS AcpiUtHardwareInitialize (void)
 
void AcpiUtSubsystemShutdown (void)
 
ACPI_STATUS AcpiUtBuildSimpleObject (ACPI_OPERAND_OBJECT *Obj, ACPI_OBJECT *UserObj, UINT8 *DataSpace, UINT32 *BufferSpaceUsed)
 
ACPI_STATUS AcpiUtBuildPackageObject (ACPI_OPERAND_OBJECT *Obj, UINT8 *Buffer, UINT32 *SpaceUsed)
 
ACPI_STATUS AcpiUtCopyIobjectToEobject (ACPI_OPERAND_OBJECT *Obj, ACPI_BUFFER *RetBuffer)
 
ACPI_STATUS AcpiUtCopyEobjectToIobject (ACPI_OBJECT *Obj, ACPI_OPERAND_OBJECT **InternalObj)
 
ACPI_STATUS AcpiUtCopyISimpleToIsimple (ACPI_OPERAND_OBJECT *SourceObj, ACPI_OPERAND_OBJECT *DestObj)
 
ACPI_STATUS AcpiUtCopyIobjectToIobject (ACPI_OPERAND_OBJECT *SourceDesc, ACPI_OPERAND_OBJECT **DestDesc, ACPI_WALK_STATE *WalkState)
 
ACPI_STATUS AcpiUtUpdateObjectReference (ACPI_OPERAND_OBJECT *Object, UINT16 Action)
 
void AcpiUtInitStackPtrTrace (void)
 
void AcpiUtTrackStackPtr (void)
 
void AcpiUtTrace (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId)
 
void AcpiUtTracePtr (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, const void *Pointer)
 
void AcpiUtTraceU32 (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, UINT32 Integer)
 
void AcpiUtTraceStr (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, const char *String)
 
void AcpiUtExit (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId)
 
void AcpiUtStatusExit (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, ACPI_STATUS Status)
 
void AcpiUtValueExit (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, UINT64 Value)
 
void AcpiUtPtrExit (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, UINT8 *Ptr)
 
void AcpiUtStrExit (UINT32 LineNumber, const char *FunctionName, const char *ModuleName, UINT32 ComponentId, const char *String)
 
void AcpiUtDebugDumpBuffer (UINT8 *Buffer, UINT32 Count, UINT32 Display, UINT32 ComponentId)
 
void AcpiUtDumpBuffer (UINT8 *Buffer, UINT32 Count, UINT32 Display, UINT32 Offset)
 
void AcpiUtReportError (char *ModuleName, UINT32 LineNumber)
 
void AcpiUtReportInfo (char *ModuleName, UINT32 LineNumber)
 
void AcpiUtReportWarning (char *ModuleName, UINT32 LineNumber)
 
void AcpiUtAddReference (ACPI_OPERAND_OBJECT *Object)
 
void AcpiUtRemoveReference (ACPI_OPERAND_OBJECT *Object)
 
void AcpiUtDeleteInternalPackageObject (ACPI_OPERAND_OBJECT *Object)
 
void AcpiUtDeleteInternalSimpleObject (ACPI_OPERAND_OBJECT *Object)
 
void AcpiUtDeleteInternalObjectList (ACPI_OPERAND_OBJECT **ObjList)
 
ACPI_STATUS AcpiUtEvaluateObject (ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
 
ACPI_STATUS AcpiUtEvaluateNumericObject (const char *ObjectName, ACPI_NAMESPACE_NODE *DeviceNode, UINT64 *Value)
 
ACPI_STATUS AcpiUtExecute_STA (ACPI_NAMESPACE_NODE *DeviceNode, UINT32 *StatusFlags)
 
ACPI_STATUS AcpiUtExecutePowerMethods (ACPI_NAMESPACE_NODE *DeviceNode, const char **MethodNames, UINT8 MethodCount, UINT8 *OutValues)
 
ACPI_STATUS AcpiUtExecute_HID (ACPI_NAMESPACE_NODE *DeviceNode, ACPI_PNP_DEVICE_ID **ReturnId)
 
ACPI_STATUS AcpiUtExecute_UID (ACPI_NAMESPACE_NODE *DeviceNode, ACPI_PNP_DEVICE_ID **ReturnId)
 
ACPI_STATUS AcpiUtExecute_CID (ACPI_NAMESPACE_NODE *DeviceNode, ACPI_PNP_DEVICE_ID_LIST **ReturnCidList)
 
ACPI_STATUS AcpiUtExecute_CLS (ACPI_NAMESPACE_NODE *DeviceNode, ACPI_PNP_DEVICE_ID **ReturnId)
 
ACPI_STATUS AcpiUtCreateRwLock (ACPI_RW_LOCK *Lock)
 
void AcpiUtDeleteRwLock (ACPI_RW_LOCK *Lock)
 
ACPI_STATUS AcpiUtAcquireReadLock (ACPI_RW_LOCK *Lock)
 
ACPI_STATUS AcpiUtReleaseReadLock (ACPI_RW_LOCK *Lock)
 
ACPI_STATUS AcpiUtAcquireWriteLock (ACPI_RW_LOCK *Lock)
 
void AcpiUtReleaseWriteLock (ACPI_RW_LOCK *Lock)
 
ACPI_OPERAND_OBJECTAcpiUtCreateInternalObjectDbg (const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId, ACPI_OBJECT_TYPE Type)
 
voidAcpiUtAllocateObjectDescDbg (const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId)
 
void AcpiUtDeleteObjectDesc (ACPI_OPERAND_OBJECT *Object)
 
BOOLEAN AcpiUtValidInternalObject (void *Object)
 
ACPI_OPERAND_OBJECTAcpiUtCreatePackageObject (UINT32 Count)
 
ACPI_OPERAND_OBJECTAcpiUtCreateIntegerObject (UINT64 Value)
 
ACPI_OPERAND_OBJECTAcpiUtCreateBufferObject (ACPI_SIZE BufferSize)
 
ACPI_OPERAND_OBJECTAcpiUtCreateStringObject (ACPI_SIZE StringSize)
 
ACPI_STATUS AcpiUtGetObjectSize (ACPI_OPERAND_OBJECT *Obj, ACPI_SIZE *ObjLength)
 
ACPI_STATUS AcpiUtInitializeInterfaces (void)
 
ACPI_STATUS AcpiUtInterfaceTerminate (void)
 
ACPI_STATUS AcpiUtInstallInterface (ACPI_STRING InterfaceName)
 
ACPI_STATUS AcpiUtRemoveInterface (ACPI_STRING InterfaceName)
 
ACPI_STATUS AcpiUtUpdateInterfaces (UINT8 Action)
 
ACPI_INTERFACE_INFOAcpiUtGetInterface (ACPI_STRING InterfaceName)
 
ACPI_STATUS AcpiUtOsiImplementation (ACPI_WALK_STATE *WalkState)
 
const ACPI_PREDEFINED_INFOAcpiUtGetNextPredefinedMethod (const ACPI_PREDEFINED_INFO *ThisName)
 
const ACPI_PREDEFINED_INFOAcpiUtMatchPredefinedMethod (char *Name)
 
void AcpiUtGetExpectedReturnTypes (char *Buffer, UINT32 ExpectedBtypes)
 
void AcpiUtPushGenericState (ACPI_GENERIC_STATE **ListHead, ACPI_GENERIC_STATE *State)
 
ACPI_GENERIC_STATEAcpiUtPopGenericState (ACPI_GENERIC_STATE **ListHead)
 
ACPI_GENERIC_STATEAcpiUtCreateGenericState (void)
 
ACPI_THREAD_STATEAcpiUtCreateThreadState (void)
 
ACPI_GENERIC_STATEAcpiUtCreateUpdateState (ACPI_OPERAND_OBJECT *Object, UINT16 Action)
 
ACPI_GENERIC_STATEAcpiUtCreatePkgState (void *InternalObject, void *ExternalObject, UINT32 Index)
 
ACPI_STATUS AcpiUtCreateUpdateStateAndPush (ACPI_OPERAND_OBJECT *Object, UINT16 Action, ACPI_GENERIC_STATE **StateList)
 
ACPI_GENERIC_STATEAcpiUtCreateControlState (void)
 
void AcpiUtDeleteGenericState (ACPI_GENERIC_STATE *State)
 
ACPI_STATUS AcpiUtDivide (UINT64 InDividend, UINT64 InDivisor, UINT64 *OutQuotient, UINT64 *OutRemainder)
 
ACPI_STATUS AcpiUtShortDivide (UINT64 InDividend, UINT32 Divisor, UINT64 *OutQuotient, UINT32 *OutRemainder)
 
ACPI_STATUS AcpiUtShortMultiply (UINT64 InMultiplicand, UINT32 Multiplier, UINT64 *Outproduct)
 
ACPI_STATUS AcpiUtShortShiftLeft (UINT64 Operand, UINT32 Count, UINT64 *OutResult)
 
ACPI_STATUS AcpiUtShortShiftRight (UINT64 Operand, UINT32 Count, UINT64 *OutResult)
 
const ACPI_EXCEPTION_INFOAcpiUtValidateException (ACPI_STATUS Status)
 
BOOLEAN AcpiUtIsPciRootBridge (char *Id)
 
ACPI_STATUS AcpiUtWalkPackageTree (ACPI_OPERAND_OBJECT *SourceObject, void *TargetObject, ACPI_PKG_CALLBACK WalkCallback, void *Context)
 
UINT32 AcpiUtDwordByteSwap (UINT32 Value)
 
void AcpiUtSetIntegerWidth (UINT8 Revision)
 
ACPI_STATUS AcpiUtAllocateOwnerId (ACPI_OWNER_ID *OwnerId)
 
void AcpiUtReleaseOwnerId (ACPI_OWNER_ID *OwnerId)
 
ACPI_STATUS AcpiUtWalkAmlResources (ACPI_WALK_STATE *WalkState, UINT8 *Aml, ACPI_SIZE AmlLength, ACPI_WALK_AML_CALLBACK UserFunction, void **Context)
 
ACPI_STATUS AcpiUtValidateResource (ACPI_WALK_STATE *WalkState, void *Aml, UINT8 *ReturnIndex)
 
UINT32 AcpiUtGetDescriptorLength (void *Aml)
 
UINT16 AcpiUtGetResourceLength (void *Aml)
 
UINT8 AcpiUtGetResourceHeaderLength (void *Aml)
 
UINT8 AcpiUtGetResourceType (void *Aml)
 
ACPI_STATUS AcpiUtGetResourceEndTag (ACPI_OPERAND_OBJECT *ObjDesc, UINT8 **EndTag)
 
void AcpiUtPrintString (char *String, UINT16 MaxLength)
 
void AcpiUtRepairName (char *Name)
 
ACPI_STATUS AcpiUtMutexInitialize (void)
 
void AcpiUtMutexTerminate (void)
 
ACPI_STATUS AcpiUtAcquireMutex (ACPI_MUTEX_HANDLE MutexId)
 
ACPI_STATUS AcpiUtReleaseMutex (ACPI_MUTEX_HANDLE MutexId)
 
ACPI_STATUS AcpiUtCreateCaches (void)
 
ACPI_STATUS AcpiUtDeleteCaches (void)
 
ACPI_STATUS AcpiUtValidateBuffer (ACPI_BUFFER *Buffer)
 
ACPI_STATUS AcpiUtInitializeBuffer (ACPI_BUFFER *Buffer, ACPI_SIZE RequiredLength)
 
ACPI_STATUS AcpiUtAddAddressRange (ACPI_ADR_SPACE_TYPE SpaceId, ACPI_PHYSICAL_ADDRESS Address, UINT32 Length, ACPI_NAMESPACE_NODE *RegionNode)
 
void AcpiUtRemoveAddressRange (ACPI_ADR_SPACE_TYPE SpaceId, ACPI_NAMESPACE_NODE *RegionNode)
 
UINT32 AcpiUtCheckAddressRange (ACPI_ADR_SPACE_TYPE SpaceId, ACPI_PHYSICAL_ADDRESS Address, UINT32 Length, BOOLEAN Warn)
 
void AcpiUtDeleteAddressLists (void)
 
void ACPI_INTERNAL_VAR_XFACE AcpiUtPredefinedWarning (const char *ModuleName, UINT32 LineNumber, char *Pathname, UINT16 NodeFlags, const char *Format,...)
 
void ACPI_INTERNAL_VAR_XFACE AcpiUtPredefinedInfo (const char *ModuleName, UINT32 LineNumber, char *Pathname, UINT16 NodeFlags, const char *Format,...)
 
void ACPI_INTERNAL_VAR_XFACE AcpiUtPredefinedBiosError (const char *ModuleName, UINT32 LineNumber, char *Pathname, UINT16 NodeFlags, const char *Format,...)
 
void AcpiUtPrefixedNamespaceError (const char *ModuleName, UINT32 LineNumber, ACPI_GENERIC_STATE *PrefixScope, const char *InternalName, ACPI_STATUS LookupStatus)
 
void AcpiUtMethodError (const char *ModuleName, UINT32 LineNumber, const char *Message, ACPI_NAMESPACE_NODE *Node, const char *Path, ACPI_STATUS LookupStatus)
 
const AH_PREDEFINED_NAMEAcpiAhMatchPredefinedName (char *Nameseg)
 
const AH_DEVICE_IDAcpiAhMatchHardwareId (char *Hid)
 
const charAcpiAhMatchUuid (UINT8 *Data)
 

Variables

const UINT8 AcpiGbl_ResourceAmlSizes []
 
const UINT8 AcpiGbl_ResourceAmlSerialBusSizes []
 

Macro Definition Documentation

◆ ACPI_ANY_BASE

#define ACPI_ANY_BASE   0

Definition at line 863 of file acutils.h.

◆ ACPI_FIXED_LENGTH

#define ACPI_FIXED_LENGTH   1

Definition at line 150 of file acutils.h.

◆ ACPI_IMPLICIT_CONVERSION

#define ACPI_IMPLICIT_CONVERSION   TRUE

Definition at line 144 of file acutils.h.

◆ ACPI_INVALID_RESOURCE

#define ACPI_INVALID_RESOURCE   0

Definition at line 149 of file acutils.h.

◆ ACPI_MSG_BIOS_ERROR

#define ACPI_MSG_BIOS_ERROR   "Firmware Error (ACPI): "

Definition at line 130 of file acutils.h.

◆ ACPI_MSG_BIOS_WARNING

#define ACPI_MSG_BIOS_WARNING   "Firmware Warning (ACPI): "

Definition at line 133 of file acutils.h.

◆ ACPI_MSG_ERROR

#define ACPI_MSG_ERROR   "ACPI Error: "

Definition at line 120 of file acutils.h.

◆ ACPI_MSG_INFO

#define ACPI_MSG_INFO   "ACPI: "

Definition at line 126 of file acutils.h.

◆ ACPI_MSG_REDIRECT_BEGIN

#define ACPI_MSG_REDIRECT_BEGIN

Definition at line 112 of file acutils.h.

◆ ACPI_MSG_REDIRECT_END

#define ACPI_MSG_REDIRECT_END

Definition at line 113 of file acutils.h.

◆ ACPI_MSG_SUFFIX

#define ACPI_MSG_SUFFIX   AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber)

Definition at line 139 of file acutils.h.

◆ ACPI_MSG_WARNING

#define ACPI_MSG_WARNING   "ACPI Warning: "

Definition at line 123 of file acutils.h.

◆ ACPI_NO_IMPLICIT_CONVERSION

#define ACPI_NO_IMPLICIT_CONVERSION   FALSE

Definition at line 145 of file acutils.h.

◆ ACPI_SMALL_VARIABLE_LENGTH

#define ACPI_SMALL_VARIABLE_LENGTH   3

Definition at line 152 of file acutils.h.

◆ ACPI_VARIABLE_LENGTH

#define ACPI_VARIABLE_LENGTH   2

Definition at line 151 of file acutils.h.

◆ AcpiUtAllocateObjectDesc

#define AcpiUtAllocateObjectDesc ( )    AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)

Definition at line 656 of file acutils.h.

◆ AcpiUtCreateInternalObject

#define AcpiUtCreateInternalObject (   t)    AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)

Definition at line 655 of file acutils.h.

◆ DB_BYTE_DISPLAY

#define DB_BYTE_DISPLAY   0x01

Definition at line 185 of file acutils.h.

◆ DB_DISPLAY_DATA_ONLY

#define DB_DISPLAY_DATA_ONLY   0x10

Definition at line 189 of file acutils.h.

◆ DB_DWORD_DISPLAY

#define DB_DWORD_DISPLAY   0x04

Definition at line 187 of file acutils.h.

◆ DB_QWORD_DISPLAY

#define DB_QWORD_DISPLAY   0x08

Definition at line 188 of file acutils.h.

◆ DB_WORD_DISPLAY

#define DB_WORD_DISPLAY   0x02

Definition at line 186 of file acutils.h.

◆ REF_DECREMENT

#define REF_DECREMENT   (UINT16) 1

Definition at line 181 of file acutils.h.

◆ REF_INCREMENT

#define REF_INCREMENT   (UINT16) 0

Definition at line 180 of file acutils.h.

Typedef Documentation

◆ ACPI_PKG_CALLBACK

typedef ACPI_STATUS(* ACPI_PKG_CALLBACK) (UINT8 ObjectType, ACPI_OPERAND_OBJECT *SourceObject, ACPI_GENERIC_STATE *State, void *Context)

Definition at line 163 of file acutils.h.

◆ ACPI_PKG_INFO

◆ ACPI_WALK_AML_CALLBACK

typedef ACPI_STATUS(* ACPI_WALK_AML_CALLBACK) (UINT8 *Aml, UINT32 Length, UINT32 Offset, UINT8 ResourceIndex, void **Context)

Definition at line 155 of file acutils.h.

Function Documentation

◆ AcpiAhMatchHardwareId()

const AH_DEVICE_ID* AcpiAhMatchHardwareId ( char Hid)

◆ AcpiAhMatchPredefinedName()

const AH_PREDEFINED_NAME* AcpiAhMatchPredefinedName ( char Nameseg)

◆ AcpiAhMatchUuid()

const char* AcpiAhMatchUuid ( UINT8 Data)

◆ AcpiUtAcquireMutex()

ACPI_STATUS AcpiUtAcquireMutex ( ACPI_MUTEX_HANDLE  MutexId)

Definition at line 256 of file utmutex.c.

258 {
260  ACPI_THREAD_ID ThisThreadId;
261 
262 
263  ACPI_FUNCTION_NAME (UtAcquireMutex);
264 
265 
266  if (MutexId > ACPI_MAX_MUTEX)
267  {
268  return (AE_BAD_PARAMETER);
269  }
270 
271  ThisThreadId = AcpiOsGetThreadId ();
272 
273 #ifdef ACPI_MUTEX_DEBUG
274  {
275  UINT32 i;
276  /*
277  * Mutex debug code, for internal debugging only.
278  *
279  * Deadlock prevention. Check if this thread owns any mutexes of value
280  * greater than or equal to this one. If so, the thread has violated
281  * the mutex ordering rule. This indicates a coding error somewhere in
282  * the ACPI subsystem code.
283  */
284  for (i = MutexId; i < ACPI_NUM_MUTEX; i++)
285  {
286  if (AcpiGbl_MutexInfo[i].ThreadId == ThisThreadId)
287  {
288  if (i == MutexId)
289  {
291  "Mutex [%s] already acquired by this thread [%u]",
292  AcpiUtGetMutexName (MutexId),
293  (UINT32) ThisThreadId));
294 
295  return (AE_ALREADY_ACQUIRED);
296  }
297 
299  "Invalid acquire order: Thread %u owns [%s], wants [%s]",
300  (UINT32) ThisThreadId, AcpiUtGetMutexName (i),
301  AcpiUtGetMutexName (MutexId)));
302 
303  return (AE_ACQUIRE_DEADLOCK);
304  }
305  }
306  }
307 #endif
308 
310  "Thread %u attempting to acquire Mutex [%s]\n",
311  (UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId)));
312 
314  AcpiGbl_MutexInfo[MutexId].Mutex, ACPI_WAIT_FOREVER);
315  if (ACPI_SUCCESS (Status))
316  {
318  "Thread %u acquired Mutex [%s]\n",
319  (UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId)));
320 
321  AcpiGbl_MutexInfo[MutexId].UseCount++;
322  AcpiGbl_MutexInfo[MutexId].ThreadId = ThisThreadId;
323  }
324  else
325  {
327  "Thread %u could not acquire Mutex [%s] (0x%X)",
328  (UINT32) ThisThreadId, AcpiUtGetMutexName (MutexId), MutexId));
329  }
330 
331  return (Status);
332 }
#define ACPI_EXCEPTION(plist)
Definition: acoutput.h:239
#define ACPI_NUM_MUTEX
Definition: aclocal.h:92
const char * AcpiUtGetMutexName(UINT32 MutexId)
Definition: utdecode.c:478
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
ACPI_THREAD_ID AcpiOsGetThreadId(void)
Definition: osl.c:217
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_MAX_MUTEX
Definition: aclocal.h:91
ACPI_STATUS AcpiOsAcquireMutex(ACPI_MUTEX Handle, UINT16 Timeout)
Definition: osl.c:306
UINT32 ACPI_STATUS
Definition: actypes.h:460
Definition: Mutex.h:15
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
#define AE_ACQUIRE_DEADLOCK
Definition: acexcep.h:126
#define ACPI_WAIT_FOREVER
Definition: actypes.h:501
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
Status
Definition: gdiplustypes.h:24
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_FUNCTION_NAME(a)
Definition: acoutput.h:479
#define ACPI_THREAD_ID
Definition: actypes.h:144
#define AE_ALREADY_ACQUIRED
Definition: acexcep.h:129
#define ACPI_DB_MUTEX
Definition: acoutput.h:182

Referenced by AcpiAttachData(), AcpiCheckAddressRange(), AcpiDebugTrace(), AcpiDetachData(), AcpiDisableAllGpes(), AcpiEnableAllRuntimeGpes(), AcpiEnableAllWakeupGpes(), AcpiEvDeleteGpeBlock(), AcpiEvDetachRegion(), AcpiEvGpeInitialize(), AcpiEvInitializeOpRegions(), AcpiEvInstallGpeBlock(), AcpiEvInstallGpeHandler(), AcpiEvInstallRegionHandlers(), AcpiEvOrphanEcRegMethod(), AcpiEvUpdateGpes(), AcpiExEnterInterpreter(), AcpiGetData(), AcpiGetDevices(), AcpiGetName(), AcpiGetNextObject(), AcpiGetObjectInfo(), AcpiGetParent(), AcpiGetTable(), AcpiGetTableByIndex(), AcpiGetType(), AcpiInstallAddressSpaceHandler(), AcpiInstallExceptionHandler(), AcpiInstallFixedEventHandler(), AcpiInstallGlobalEventHandler(), AcpiInstallGpeBlock(), AcpiInstallMethod(), AcpiInstallNotifyHandler(), AcpiInstallSciHandler(), AcpiInstallTableHandler(), AcpiNsDeleteNamespaceByOwner(), AcpiNsDeleteNamespaceSubtree(), AcpiNsGetDeviceCallback(), AcpiNsGetNode(), AcpiNsRootInitialize(), AcpiNsTerminate(), AcpiNsWalkNamespace(), AcpiPutTable(), AcpiReallocateRootTable(), AcpiRemoveAddressSpaceHandler(), AcpiRemoveFixedEventHandler(), AcpiRemoveGpeBlock(), AcpiRemoveGpeHandler(), AcpiRemoveNotifyHandler(), AcpiRemoveSciHandler(), AcpiRemoveTableHandler(), AcpiTbAllocateOwnerId(), AcpiTbDeleteNamespaceByOwner(), AcpiTbFindTable(), AcpiTbGetOwnerId(), AcpiTbInstallStandardTable(), AcpiTbIsTableLoaded(), AcpiTbLoadNamespace(), AcpiTbReleaseOwnerId(), AcpiTbSetTableLoadedFlag(), AcpiTbTerminate(), AcpiUnloadParentTable(), AcpiUpdateAllGpes(), AcpiUtAllocateOwnerId(), AcpiUtReleaseOwnerId(), and AcpiWalkNamespace().

◆ AcpiUtAcquireReadLock()

ACPI_STATUS AcpiUtAcquireReadLock ( ACPI_RW_LOCK Lock)

Definition at line 117 of file utlock.c.

119 {
121 
122 
124  if (ACPI_FAILURE (Status))
125  {
126  return (Status);
127  }
128 
129  /* Acquire the write lock only for the first reader */
130 
131  Lock->NumReaders++;
132  if (Lock->NumReaders == 1)
133  {
135  }
136 
137  AcpiOsReleaseMutex (Lock->ReaderMutex);
138  return (Status);
139 }
ACPI_STATUS AcpiOsAcquireMutex(ACPI_MUTEX Handle, UINT16 Timeout)
Definition: osl.c:306
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define ACPI_WAIT_FOREVER
Definition: actypes.h:501
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
Status
Definition: gdiplustypes.h:24
void AcpiOsReleaseMutex(ACPI_MUTEX Handle)
Definition: osl.c:333

Referenced by AcpiWalkNamespace().

◆ AcpiUtAcquireWriteLock()

ACPI_STATUS AcpiUtAcquireWriteLock ( ACPI_RW_LOCK Lock)

Definition at line 185 of file utlock.c.

187 {
189 
190 
192  return (Status);
193 }
ACPI_STATUS AcpiOsAcquireMutex(ACPI_MUTEX Handle, UINT16 Timeout)
Definition: osl.c:306
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_WAIT_FOREVER
Definition: actypes.h:501
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
Status
Definition: gdiplustypes.h:24

Referenced by AcpiTbDeleteNamespaceByOwner().

◆ AcpiUtAddAddressRange()

ACPI_STATUS AcpiUtAddAddressRange ( ACPI_ADR_SPACE_TYPE  SpaceId,
ACPI_PHYSICAL_ADDRESS  Address,
UINT32  Length,
ACPI_NAMESPACE_NODE RegionNode 
)

Definition at line 78 of file utaddress.c.

83 {
84  ACPI_ADDRESS_RANGE *RangeInfo;
85 
86 
87  ACPI_FUNCTION_TRACE (UtAddAddressRange);
88 
89 
92  {
94  }
95 
96  /* Allocate/init a new info block, add it to the appropriate list */
97 
98  RangeInfo = ACPI_ALLOCATE (sizeof (ACPI_ADDRESS_RANGE));
99  if (!RangeInfo)
100  {
102  }
103 
104  RangeInfo->StartAddress = Address;
105  RangeInfo->EndAddress = (Address + Length - 1);
106  RangeInfo->RegionNode = RegionNode;
107 
108  RangeInfo->Next = AcpiGbl_AddressRangeList[SpaceId];
109  AcpiGbl_AddressRangeList[SpaceId] = RangeInfo;
110 
112  "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
113  AcpiUtGetNodeName (RangeInfo->RegionNode),
115  ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
116 
118 }
#define AE_NO_MEMORY
Definition: acexcep.h:112
ACPI_PHYSICAL_ADDRESS StartAddress
Definition: aclocal.h:851
#define ACPI_ALLOCATE(a)
Definition: actypes.h:384
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE SpaceId
Definition: acpixf.h:828
#define ACPI_ADR_SPACE_SYSTEM_IO
Definition: actypes.h:852
static WCHAR Address[46]
Definition: ping.c:68
ACPI_PHYSICAL_ADDRESS EndAddress
Definition: aclocal.h:852
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
struct acpi_address_range * Next
Definition: aclocal.h:849
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_FORMAT_UINT64(i)
Definition: acmacros.h:71
#define ACPI_DB_NAMES
Definition: acoutput.h:166
const char * AcpiUtGetNodeName(void *Object)
Definition: utdecode.c:305
ACPI_NAMESPACE_NODE * RegionNode
Definition: aclocal.h:850
#define ACPI_ADR_SPACE_SYSTEM_MEMORY
Definition: actypes.h:851
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiDsEvalRegionOperands(), and AcpiDsGetRegionArguments().

◆ AcpiUtAddReference()

void AcpiUtAddReference ( ACPI_OPERAND_OBJECT Object)

Definition at line 746 of file utdelete.c.

748 {
749 
750  ACPI_FUNCTION_NAME (UtAddReference);
751 
752 
753  /* Ensure that we have a valid object */
754 
756  {
757  return;
758  }
759 
761  "Obj %p Current Refs=%X [To Be Incremented]\n",
762  Object, Object->Common.ReferenceCount));
763 
764  /* Increment the reference count */
765 
767  return;
768 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
ACPI_STATUS AcpiUtUpdateObjectReference(ACPI_OPERAND_OBJECT *Object, UINT16 Action)
Definition: utdelete.c:539
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
static IUnknown Object
Definition: main.c:512
BOOLEAN AcpiUtValidInternalObject(void *Object)
Definition: utobject.c:376
#define ACPI_FUNCTION_NAME(a)
Definition: acoutput.h:479
#define ACPI_DB_ALLOCATIONS
Definition: acoutput.h:175
#define REF_INCREMENT
Definition: acutils.h:180

Referenced by AcpiDsBuildInternalPackageObj(), AcpiDsDoImplicitReturn(), AcpiDsExecEndOp(), AcpiDsMethodDataGetValue(), AcpiDsMethodDataSetValue(), AcpiEvAttachRegion(), AcpiExOpcode_1A_0T_1R(), AcpiExOpcode_1A_1T_1R(), AcpiExOpcode_2A_1T_1R(), AcpiExPrepFieldValue(), AcpiExResolveNodeToValue(), AcpiExResolveObjectToValue(), AcpiExStoreObjectToIndex(), AcpiInstallNotifyHandler(), AcpiNsAttachObject(), AcpiNsConvertToReference(), AcpiNsResolveReferences(), and AcpiUtCopySimpleObject().

◆ AcpiUtAllocateObjectDescDbg()

void* AcpiUtAllocateObjectDescDbg ( const char ModuleName,
UINT32  LineNumber,
UINT32  ComponentId 
)

Definition at line 429 of file utobject.c.

433 {
435 
436 
437  ACPI_FUNCTION_TRACE (UtAllocateObjectDescDbg);
438 
439 
440  Object = AcpiOsAcquireObject (AcpiGbl_OperandCache);
441  if (!Object)
442  {
444  "Could not allocate an object descriptor"));
445 
446  return_PTR (NULL);
447  }
448 
449  /* Mark the descriptor type */
450 
452 
453  ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
454  Object, (UINT32) sizeof (ACPI_OPERAND_OBJECT)));
455 
456  return_PTR (Object);
457 }
#define return_PTR(s)
Definition: acoutput.h:497
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
Definition: acpixf.h:1270
unsigned int UINT32
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_DESC_TYPE_OPERAND
Definition: acobject.h:573
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
static IUnknown Object
Definition: main.c:512
#define ACPI_SET_DESCRIPTOR_TYPE(d, t)
Definition: acmacros.h:415
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1212
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
void * AcpiOsAcquireObject(ACPI_CACHE_T *Cache)
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_DB_ALLOCATIONS
Definition: acoutput.h:175

Referenced by AcpiUtCreateInternalObjectDbg().

◆ AcpiUtAllocateOwnerId()

ACPI_STATUS AcpiUtAllocateOwnerId ( ACPI_OWNER_ID OwnerId)

Definition at line 68 of file utownerid.c.

70 {
71  UINT32 i;
72  UINT32 j;
73  UINT32 k;
75 
76 
77  ACPI_FUNCTION_TRACE (UtAllocateOwnerId);
78 
79 
80  /* Guard against multiple allocations of ID to the same location */
81 
82  if (*OwnerId)
83  {
85  "Owner ID [0x%3.3X] already exists", *OwnerId));
87  }
88 
89  /* Mutex for the global ID mask */
90 
92  if (ACPI_FAILURE (Status))
93  {
95  }
96 
97  /*
98  * Find a free owner ID, cycle through all possible IDs on repeated
99  * allocations. (ACPI_NUM_OWNERID_MASKS + 1) because first index
100  * may have to be scanned twice.
101  */
102  for (i = 0, j = AcpiGbl_LastOwnerIdIndex;
103  i < (ACPI_NUM_OWNERID_MASKS + 1);
104  i++, j++)
105  {
106  if (j >= ACPI_NUM_OWNERID_MASKS)
107  {
108  j = 0; /* Wraparound to start of mask array */
109  }
110 
111  for (k = AcpiGbl_NextOwnerIdOffset; k < 32; k++)
112  {
113  if (AcpiGbl_OwnerIdMask[j] == ACPI_UINT32_MAX)
114  {
115  /* There are no free IDs in this mask */
116 
117  break;
118  }
119 
120  /*
121  * Note: the UINT32 cast ensures that 1 is stored as a unsigned
122  * integer. Omitting the cast may result in 1 being stored as an
123  * int. Some compilers or runtime error detection may flag this as
124  * an error.
125  */
126  if (!(AcpiGbl_OwnerIdMask[j] & ((UINT32) 1 << k)))
127  {
128  /*
129  * Found a free ID. The actual ID is the bit index plus one,
130  * making zero an invalid Owner ID. Save this as the last ID
131  * allocated and update the global ID mask.
132  */
133  AcpiGbl_OwnerIdMask[j] |= ((UINT32) 1 << k);
134 
135  AcpiGbl_LastOwnerIdIndex = (UINT8) j;
136  AcpiGbl_NextOwnerIdOffset = (UINT8) (k + 1);
137 
138  /*
139  * Construct encoded ID from the index and bit position
140  *
141  * Note: Last [j].k (bit 4095) is never used and is marked
142  * permanently allocated (prevents +1 overflow)
143  */
144  *OwnerId = (ACPI_OWNER_ID) ((k + 1) + ACPI_MUL_32 (j));
145 
147  "Allocated OwnerId: 0x%3.3X\n", (unsigned int) *OwnerId));
148  goto Exit;
149  }
150  }
151 
152  AcpiGbl_NextOwnerIdOffset = 0;
153  }
154 
155  /*
156  * All OwnerIds have been allocated. This typically should
157  * not happen since the IDs are reused after deallocation. The IDs are
158  * allocated upon table load (one per table) and method execution, and
159  * they are released when a table is unloaded or a method completes
160  * execution.
161  *
162  * If this error happens, there may be very deep nesting of invoked
163  * control methods, or there may be a bug where the IDs are not released.
164  */
167  "Could not allocate new OwnerId (4095 max), AE_OWNER_ID_LIMIT"));
168 
169 Exit:
172 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define ACPI_DB_VALUES
Definition: acoutput.h:173
#define ACPI_MUL_32(a)
Definition: acmacros.h:223
#define ACPI_NUM_OWNERID_MASKS
Definition: acconfig.h:136
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ACPI_STATUS AcpiUtReleaseMutex(ACPI_MUTEX_HANDLE MutexId)
Definition: utmutex.c:348
ACPI_STATUS AcpiUtAcquireMutex(ACPI_MUTEX_HANDLE MutexId)
Definition: utmutex.c:256
unsigned int UINT32
#define ACPI_MTX_CACHES
Definition: aclocal.h:88
#define AE_INFO
Definition: acoutput.h:230
#define AE_OWNER_ID_LIMIT
Definition: acexcep.h:135
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
static void Exit(void)
Definition: sock.c:1331
#define AE_ALREADY_EXISTS
Definition: acexcep.h:115
#define ACPI_UINT32_MAX
Definition: actypes.h:66
UINT16 ACPI_OWNER_ID
Definition: actypes.h:486
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
_Must_inspect_result_ _In_opt_ PVOID OwnerId
Definition: fsrtlfuncs.h:907
unsigned char UINT8
int k
Definition: mpi.c:3369

Referenced by AcpiDsBeginMethodExecution(), and AcpiTbAllocateOwnerId().

◆ AcpiUtAsciiCharToHex()

UINT8 AcpiUtAsciiCharToHex ( int  HexChar)

Definition at line 135 of file uthex.c.

137 {
138 
139  /* Values 0-9 */
140 
141  if (HexChar <= '9')
142  {
143  return ((UINT8) (HexChar - '0'));
144  }
145 
146  /* Upper case A-F */
147 
148  if (HexChar <= 'F')
149  {
150  return ((UINT8) (HexChar - 0x37));
151  }
152 
153  /* Lower case a-f */
154 
155  return ((UINT8) (HexChar - 0x57));
156 }
unsigned char UINT8

Referenced by AcpiUtAsciiToHexByte(), and AcpiUtInsertDigit().

◆ AcpiUtAsciiToHexByte()

ACPI_STATUS AcpiUtAsciiToHexByte ( char TwoAsciiChars,
UINT8 ReturnByte 
)

Definition at line 100 of file uthex.c.

103 {
104 
105  /* Both ASCII characters must be valid hex digits */
106 
107  if (!isxdigit ((int) TwoAsciiChars[0]) ||
108  !isxdigit ((int) TwoAsciiChars[1]))
109  {
110  return (AE_BAD_HEX_CONSTANT);
111  }
112 
113  *ReturnByte =
114  AcpiUtAsciiCharToHex (TwoAsciiChars[1]) |
115  (AcpiUtAsciiCharToHex (TwoAsciiChars[0]) << 4);
116 
117  return (AE_OK);
118 }
#define AE_BAD_HEX_CONSTANT
Definition: acexcep.h:155
UINT8 AcpiUtAsciiCharToHex(int HexChar)
Definition: uthex.c:135
#define isxdigit(c)
Definition: acclib.h:70
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiEvMatchGpeMethod().

◆ AcpiUtBuildPackageObject()

ACPI_STATUS AcpiUtBuildPackageObject ( ACPI_OPERAND_OBJECT Obj,
UINT8 Buffer,
UINT32 SpaceUsed 
)

◆ AcpiUtBuildSimpleObject()

ACPI_STATUS AcpiUtBuildSimpleObject ( ACPI_OPERAND_OBJECT Obj,
ACPI_OBJECT UserObj,
UINT8 DataSpace,
UINT32 BufferSpaceUsed 
)

◆ AcpiUtCheckAddressRange()

UINT32 AcpiUtCheckAddressRange ( ACPI_ADR_SPACE_TYPE  SpaceId,
ACPI_PHYSICAL_ADDRESS  Address,
UINT32  Length,
BOOLEAN  Warn 
)

Definition at line 211 of file utaddress.c.

216 {
217  ACPI_ADDRESS_RANGE *RangeInfo;
218  ACPI_PHYSICAL_ADDRESS EndAddress;
219  char *Pathname;
220  UINT32 OverlapCount = 0;
221 
222 
223  ACPI_FUNCTION_TRACE (UtCheckAddressRange);
224 
225 
228  {
229  return_UINT32 (0);
230  }
231 
232  RangeInfo = AcpiGbl_AddressRangeList[SpaceId];
233  EndAddress = Address + Length - 1;
234 
235  /* Check entire list for all possible conflicts */
236 
237  while (RangeInfo)
238  {
239  /*
240  * Check if the requested address/length overlaps this
241  * address range. There are four cases to consider:
242  *
243  * 1) Input address/length is contained completely in the
244  * address range
245  * 2) Input address/length overlaps range at the range start
246  * 3) Input address/length overlaps range at the range end
247  * 4) Input address/length completely encompasses the range
248  */
249  if ((Address <= RangeInfo->EndAddress) &&
250  (EndAddress >= RangeInfo->StartAddress))
251  {
252  /* Found an address range overlap */
253 
254  OverlapCount++;
255  if (Warn) /* Optional warning message */
256  {
258 
260  "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
263  ACPI_FORMAT_UINT64 (EndAddress),
264  ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
265  ACPI_FORMAT_UINT64 (RangeInfo->EndAddress),
266  Pathname));
268  }
269  }
270 
271  RangeInfo = RangeInfo->Next;
272  }
273 
274  return_UINT32 (OverlapCount);
275 }
#define ACPI_FREE(a)
Definition: actypes.h:386
#define TRUE
Definition: types.h:120
#define ACPI_WARNING(plist)
Definition: acoutput.h:238
#define return_UINT32(s)
Definition: acoutput.h:501
ACPI_PHYSICAL_ADDRESS StartAddress
Definition: aclocal.h:851
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE SpaceId
Definition: acpixf.h:828
#define ACPI_ADR_SPACE_SYSTEM_IO
Definition: actypes.h:852
const char * AcpiUtGetRegionName(UINT8 SpaceId)
Definition: utdecode.c:124
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
static WCHAR Address[46]
Definition: ping.c:68
ACPI_PHYSICAL_ADDRESS EndAddress
Definition: aclocal.h:852
Definition: video.h:581
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
char * AcpiNsGetNormalizedPathname(ACPI_NAMESPACE_NODE *Node, BOOLEAN NoTrailing)
Definition: nsnames.c:373
struct acpi_address_range * Next
Definition: aclocal.h:849
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_FORMAT_UINT64(i)
Definition: acmacros.h:71
ACPI_NAMESPACE_NODE * RegionNode
Definition: aclocal.h:850
#define ACPI_ADR_SPACE_SYSTEM_MEMORY
Definition: actypes.h:851
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING Pathname
Definition: acpixf.h:700

Referenced by AcpiCheckAddressRange().

◆ AcpiUtCheckAndRepairAscii()

void AcpiUtCheckAndRepairAscii ( UINT8 Name,
char RepairedName,
UINT32  Count 
)

Definition at line 140 of file utascii.c.

144 {
145  UINT32 i;
146 
147 
148  for (i = 0; i < Count; i++)
149  {
150  RepairedName[i] = (char) Name[i];
151 
152  if (!Name[i])
153  {
154  return;
155  }
156  if (!isprint (Name[i]))
157  {
158  RepairedName[i] = ' ';
159  }
160  }
161 }
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
unsigned char
Definition: typeof.h:29
#define isprint(c)
Definition: acclib.h:73

◆ AcpiUtConvertDecimalString()

ACPI_STATUS AcpiUtConvertDecimalString ( char String,
UINT64 ReturnValuePtr 
)

Definition at line 146 of file utstrsuppt.c.

149 {
150  UINT64 AccumulatedValue = 0;
152 
153 
154  /* Convert each ASCII byte in the input string */
155 
156  while (*String)
157  {
158  /* Character must be ASCII 0-9, otherwise terminate with no error */
159 
160  if (!isdigit (*String))
161  {
162  break;
163  }
164 
165  /* Convert and insert this decimal digit into the accumulator */
166 
167  Status = AcpiUtInsertDigit (&AccumulatedValue, 10, *String);
168  if (ACPI_FAILURE (Status))
169  {
171  break;
172  }
173 
174  String++;
175  }
176 
177  /* Always return the value that has been accumulated */
178 
179  *ReturnValuePtr = AccumulatedValue;
180  return (Status);
181 }
#define AE_DECIMAL_OVERFLOW
Definition: acexcep.h:141
static WCHAR String[]
Definition: stringtable.c:55
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define isdigit(c)
Definition: acclib.h:68
Status
Definition: gdiplustypes.h:24
static ACPI_STATUS AcpiUtInsertDigit(UINT64 *AccumulatedValue, UINT32 Base, int AsciiDigit)
Definition: utstrsuppt.c:406
unsigned long long UINT64
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiUtExplicitStrtoul64(), and AcpiUtStrtoul64().

◆ AcpiUtConvertHexString()

ACPI_STATUS AcpiUtConvertHexString ( char String,
UINT64 ReturnValuePtr 
)

Definition at line 202 of file utstrsuppt.c.

205 {
206  UINT64 AccumulatedValue = 0;
208 
209 
210  /* Convert each ASCII byte in the input string */
211 
212  while (*String)
213  {
214  /* Must be ASCII A-F, a-f, or 0-9, otherwise terminate with no error */
215 
216  if (!isxdigit (*String))
217  {
218  break;
219  }
220 
221  /* Convert and insert this hex digit into the accumulator */
222 
223  Status = AcpiUtInsertDigit (&AccumulatedValue, 16, *String);
224  if (ACPI_FAILURE (Status))
225  {
227  break;
228  }
229 
230  String++;
231  }
232 
233  /* Always return the value that has been accumulated */
234 
235  *ReturnValuePtr = AccumulatedValue;
236  return (Status);
237 }
static WCHAR String[]
Definition: stringtable.c:55
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_HEX_OVERFLOW
Definition: acexcep.h:140
Status
Definition: gdiplustypes.h:24
#define isxdigit(c)
Definition: acclib.h:70
static ACPI_STATUS AcpiUtInsertDigit(UINT64 *AccumulatedValue, UINT32 Base, int AsciiDigit)
Definition: utstrsuppt.c:406
unsigned long long UINT64
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiUtExplicitStrtoul64(), AcpiUtImplicitStrtoul64(), and AcpiUtStrtoul64().

◆ AcpiUtConvertOctalString()

ACPI_STATUS AcpiUtConvertOctalString ( char String,
UINT64 ReturnValue 
)

Definition at line 90 of file utstrsuppt.c.

93 {
94  UINT64 AccumulatedValue = 0;
96 
97 
98  /* Convert each ASCII byte in the input string */
99 
100  while (*String)
101  {
102  /* Character must be ASCII 0-7, otherwise terminate with no error */
103 
104  if (!(ACPI_IS_OCTAL_DIGIT (*String)))
105  {
106  break;
107  }
108 
109  /* Convert and insert this octal digit into the accumulator */
110 
111  Status = AcpiUtInsertDigit (&AccumulatedValue, 8, *String);
112  if (ACPI_FAILURE (Status))
113  {
115  break;
116  }
117 
118  String++;
119  }
120 
121  /* Always return the value that has been accumulated */
122 
123  *ReturnValuePtr = AccumulatedValue;
124  return (Status);
125 }
#define AE_OCTAL_OVERFLOW
Definition: acexcep.h:142
static WCHAR String[]
Definition: stringtable.c:55
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
Status
Definition: gdiplustypes.h:24
#define ACPI_IS_OCTAL_DIGIT(d)
Definition: acmacros.h:501
static ACPI_STATUS AcpiUtInsertDigit(UINT64 *AccumulatedValue, UINT32 Base, int AsciiDigit)
Definition: utstrsuppt.c:406
unsigned long long UINT64
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiUtStrtoul64().

◆ AcpiUtCopyEobjectToIobject()

ACPI_STATUS AcpiUtCopyEobjectToIobject ( ACPI_OBJECT Obj,
ACPI_OPERAND_OBJECT **  InternalObj 
)

Definition at line 670 of file utcopy.c.

673 {
675 
676 
677  ACPI_FUNCTION_TRACE (UtCopyEobjectToIobject);
678 
679 
680  if (ExternalObject->Type == ACPI_TYPE_PACKAGE)
681  {
683  ExternalObject, InternalObject);
684  }
685  else
686  {
687  /*
688  * Build a simple object (no nested objects)
689  */
690  Status = AcpiUtCopyEsimpleToIsimple (ExternalObject,
691  InternalObject);
692  }
693 
695 }
static ACPI_STATUS AcpiUtCopyEsimpleToIsimple(ACPI_OBJECT *UserObj, ACPI_OPERAND_OBJECT **ReturnObj)
Definition: utcopy.c:471
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
static ACPI_STATUS AcpiUtCopyEpackageToIpackage(ACPI_OBJECT *ExternalObject, ACPI_OPERAND_OBJECT **InternalObject)
Definition: utcopy.c:603

Referenced by AcpiEvaluateObject(), and AcpiUtCopyEpackageToIpackage().

◆ AcpiUtCopyIobjectToEobject()

ACPI_STATUS AcpiUtCopyIobjectToEobject ( ACPI_OPERAND_OBJECT Obj,
ACPI_BUFFER RetBuffer 
)

Definition at line 414 of file utcopy.c.

417 {
419 
420 
421  ACPI_FUNCTION_TRACE (UtCopyIobjectToEobject);
422 
423 
424  if (InternalObject->Common.Type == ACPI_TYPE_PACKAGE)
425  {
426  /*
427  * Package object: Copy all subobjects (including
428  * nested packages)
429  */
430  Status = AcpiUtCopyIpackageToEpackage (InternalObject,
431  RetBuffer->Pointer, &RetBuffer->Length);
432  }
433  else
434  {
435  /*
436  * Build a simple object (no nested objects)
437  */
438  Status = AcpiUtCopyIsimpleToEsimple (InternalObject,
439  ACPI_CAST_PTR (ACPI_OBJECT, RetBuffer->Pointer),
440  ACPI_ADD_PTR (UINT8, RetBuffer->Pointer,
442  &RetBuffer->Length);
443  /*
444  * build simple does not include the object size in the length
445  * so we add it in here
446  */
447  RetBuffer->Length += sizeof (ACPI_OBJECT);
448  }
449 
451 }
union acpi_object ACPI_OBJECT
ACPI_SIZE Length
Definition: actypes.h:1042
void * Pointer
Definition: actypes.h:1043
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a)
Definition: acmacros.h:254
static ACPI_STATUS AcpiUtCopyIpackageToEpackage(ACPI_OPERAND_OBJECT *InternalObject, UINT8 *Buffer, ACPI_SIZE *SpaceUsed)
Definition: utcopy.c:350
static ACPI_STATUS AcpiUtCopyIsimpleToEsimple(ACPI_OPERAND_OBJECT *InternalObject, ACPI_OBJECT *ExternalObject, UINT8 *DataSpace, ACPI_SIZE *BufferSpaceUsed)
Definition: utcopy.c:124
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
unsigned char UINT8

Referenced by AcpiEvaluateObject().

◆ AcpiUtCopyIobjectToIobject()

ACPI_STATUS AcpiUtCopyIobjectToIobject ( ACPI_OPERAND_OBJECT SourceDesc,
ACPI_OPERAND_OBJECT **  DestDesc,
ACPI_WALK_STATE WalkState 
)

Definition at line 1037 of file utcopy.c.

1041 {
1043 
1044 
1045  ACPI_FUNCTION_TRACE (UtCopyIobjectToIobject);
1046 
1047 
1048  /* Create the top level object */
1049 
1050  *DestDesc = AcpiUtCreateInternalObject (SourceDesc->Common.Type);
1051  if (!*DestDesc)
1052  {
1054  }
1055 
1056  /* Copy the object and possible subobjects */
1057 
1058  if (SourceDesc->Common.Type == ACPI_TYPE_PACKAGE)
1059  {
1061  SourceDesc, *DestDesc, WalkState);
1062  }
1063  else
1064  {
1065  Status = AcpiUtCopySimpleObject (SourceDesc, *DestDesc);
1066  }
1067 
1068  /* Delete the allocated object if copy failed */
1069 
1070  if (ACPI_FAILURE (Status))
1071  {
1072  AcpiUtRemoveReference (*DestDesc);
1073  }
1074 
1076 }
static ACPI_STATUS AcpiUtCopyIpackageToIpackage(ACPI_OPERAND_OBJECT *SourceObj, ACPI_OPERAND_OBJECT *DestObj, ACPI_WALK_STATE *WalkState)
Definition: utcopy.c:978
#define AE_NO_MEMORY
Definition: acexcep.h:112
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
static ACPI_STATUS AcpiUtCopySimpleObject(ACPI_OPERAND_OBJECT *SourceDesc, ACPI_OPERAND_OBJECT *DestDesc)
Definition: utcopy.c:713
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:655
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiDsEvaluateNamePath(), AcpiDsStoreObjectToLocal(), AcpiExOpcode_1A_1T_1R(), AcpiExStoreDirectToNode(), AcpiExStoreObjectToIndex(), and AcpiExStoreObjectToObject().

◆ AcpiUtCopyISimpleToIsimple()

ACPI_STATUS AcpiUtCopyISimpleToIsimple ( ACPI_OPERAND_OBJECT SourceObj,
ACPI_OPERAND_OBJECT DestObj 
)

◆ AcpiUtCreateBufferObject()

ACPI_OPERAND_OBJECT* AcpiUtCreateBufferObject ( ACPI_SIZE  BufferSize)

Definition at line 258 of file utobject.c.

260 {
261  ACPI_OPERAND_OBJECT *BufferDesc;
262  UINT8 *Buffer = NULL;
263 
264 
265  ACPI_FUNCTION_TRACE_U32 (UtCreateBufferObject, BufferSize);
266 
267 
268  /* Create a new Buffer object */
269 
271  if (!BufferDesc)
272  {
273  return_PTR (NULL);
274  }
275 
276  /* Create an actual buffer only if size > 0 */
277 
278  if (BufferSize > 0)
279  {
280  /* Allocate the actual buffer */
281 
283  if (!Buffer)
284  {
285  ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
286  (UINT32) BufferSize));
287 
288  AcpiUtRemoveReference (BufferDesc);
289  return_PTR (NULL);
290  }
291  }
292 
293  /* Complete buffer object initialization */
294 
295  BufferDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
296  BufferDesc->Buffer.Pointer = Buffer;
297  BufferDesc->Buffer.Length = (UINT32) BufferSize;
298 
299  /* Return the new buffer descriptor */
300 
301  return_PTR (BufferDesc);
302 }
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define return_PTR(s)
Definition: acoutput.h:497
#define ACPI_TYPE_BUFFER
Definition: actypes.h:681
#define ACPI_FUNCTION_TRACE_U32(a, b)
Definition: acoutput.h:482
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
ACPI_OBJECT_BUFFER Buffer
Definition: acobject.h:519
#define BufferSize
Definition: classpnp.h:419
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define AOPOBJ_DATA_VALID
Definition: acobject.h:96
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:655
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
unsigned char UINT8

Referenced by AcpiExConcatTemplate(), AcpiExConvertToBuffer(), AcpiExDoConcatenate(), AcpiExReadDataFromField(), AcpiExReadSerialBus(), AcpiExWriteSerialBus(), AcpiNsConvertToBuffer(), AcpiNsConvertToResource(), AcpiNsConvertToUnicode(), AcpiNsRepair_FDE(), and AcpiNsRepairNullElement().

◆ AcpiUtCreateCaches()

ACPI_STATUS AcpiUtCreateCaches ( void  )

Definition at line 104 of file utalloc.c.

106 {
108 
109 
110  /* Object Caches, for frequently used objects */
111 
112  Status = AcpiOsCreateCache ("Acpi-Namespace", sizeof (ACPI_NAMESPACE_NODE),
113  ACPI_MAX_NAMESPACE_CACHE_DEPTH, &AcpiGbl_NamespaceCache);
114  if (ACPI_FAILURE (Status))
115  {
116  return (Status);
117  }
118 
119  Status = AcpiOsCreateCache ("Acpi-State", sizeof (ACPI_GENERIC_STATE),
120  ACPI_MAX_STATE_CACHE_DEPTH, &AcpiGbl_StateCache);
121  if (ACPI_FAILURE (Status))
122  {
123  return (Status);
124  }
125 
126  Status = AcpiOsCreateCache ("Acpi-Parse", sizeof (ACPI_PARSE_OBJ_COMMON),
127  ACPI_MAX_PARSE_CACHE_DEPTH, &AcpiGbl_PsNodeCache);
128  if (ACPI_FAILURE (Status))
129  {
130  return (Status);
131  }
132 
133  Status = AcpiOsCreateCache ("Acpi-ParseExt", sizeof (ACPI_PARSE_OBJ_NAMED),
134  ACPI_MAX_EXTPARSE_CACHE_DEPTH, &AcpiGbl_PsNodeExtCache);
135  if (ACPI_FAILURE (Status))
136  {
137  return (Status);
138  }
139 
140  Status = AcpiOsCreateCache ("Acpi-Operand", sizeof (ACPI_OPERAND_OBJECT),
141  ACPI_MAX_OBJECT_CACHE_DEPTH, &AcpiGbl_OperandCache);
142  if (ACPI_FAILURE (Status))
143  {
144  return (Status);
145  }
146 
147 #ifdef ACPI_ASL_COMPILER
148  /*
149  * For use with the ASL-/ASL+ option. This cache keeps track of regular
150  * 0xA9 0x01 comments.
151  */
152  Status = AcpiOsCreateCache ("Acpi-Comment", sizeof (ACPI_COMMENT_NODE),
153  ACPI_MAX_COMMENT_CACHE_DEPTH, &AcpiGbl_RegCommentCache);
154  if (ACPI_FAILURE (Status))
155  {
156  return (Status);
157  }
158 
159  /*
160  * This cache keeps track of the starting addresses of where the comments
161  * lie. This helps prevent duplication of comments.
162  */
163  Status = AcpiOsCreateCache ("Acpi-Comment-Addr", sizeof (ACPI_COMMENT_ADDR_NODE),
164  ACPI_MAX_COMMENT_CACHE_DEPTH, &AcpiGbl_CommentAddrCache);
165  if (ACPI_FAILURE (Status))
166  {
167  return (Status);
168  }
169 
170  /*
171  * This cache will be used for nodes that represent files.
172  */
173  Status = AcpiOsCreateCache ("Acpi-File", sizeof (ACPI_FILE_NODE),
174  ACPI_MAX_COMMENT_CACHE_DEPTH, &AcpiGbl_FileCache);
175  if (ACPI_FAILURE (Status))
176  {
177  return (Status);
178  }
179 #endif
180 
181 
182 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
183 
184  /* Memory allocation lists */
185 
186  Status = AcpiUtCreateList ("Acpi-Global", 0,
187  &AcpiGbl_GlobalList);
188  if (ACPI_FAILURE (Status))
189  {
190  return (Status);
191  }
192 
193  Status = AcpiUtCreateList ("Acpi-Namespace", sizeof (ACPI_NAMESPACE_NODE),
194  &AcpiGbl_NsNodeList);
195  if (ACPI_FAILURE (Status))
196  {
197  return (Status);
198  }
199 #endif
200 
201  return (AE_OK);
202 }
#define ACPI_MAX_COMMENT_CACHE_DEPTH
Definition: acconfig.h:82
#define ACPI_MAX_NAMESPACE_CACHE_DEPTH
Definition: acconfig.h:81
ACPI_STATUS AcpiOsCreateCache(char *CacheName, UINT16 ObjectSize, UINT16 MaxDepth, ACPI_CACHE_T **ReturnCache)
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_MAX_OBJECT_CACHE_DEPTH
Definition: acconfig.h:80
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define ACPI_MAX_PARSE_CACHE_DEPTH
Definition: acconfig.h:78
#define ACPI_MAX_EXTPARSE_CACHE_DEPTH
Definition: acconfig.h:79
Status
Definition: gdiplustypes.h:24
#define ACPI_MAX_STATE_CACHE_DEPTH
Definition: acconfig.h:77
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiUtInitGlobals().

◆ AcpiUtCreateControlState()

ACPI_GENERIC_STATE* AcpiUtCreateControlState ( void  )

Definition at line 300 of file utstate.c.

302 {
304 
305 
307 
308 
309  /* Create the generic state object */
310 
312  if (!State)
313  {
314  return (NULL);
315  }
316 
317  /* Init fields specific to the control struct */
318 
319  State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_CONTROL;
321 
322  return (State);
323 }
State(char *beg, char *end)
ACPI_GENERIC_STATE * AcpiUtCreateGenericState(void)
Definition: utstate.c:130
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
enum State_ State
Definition: pofuncs.h:54
#define ACPI_DESC_TYPE_STATE_CONTROL
Definition: acobject.h:564
#define ACPI_CONTROL_CONDITIONAL_EXECUTING
Definition: aclocal.h:670

Referenced by AcpiDsExecBeginControlOp().

◆ AcpiUtCreateGenericState()

ACPI_GENERIC_STATE* AcpiUtCreateGenericState ( void  )

Definition at line 130 of file utstate.c.

132 {
134 
135 
137 
138 
139  State = AcpiOsAcquireObject (AcpiGbl_StateCache);
140  if (State)
141  {
142  /* Initialize */
143  State->Common.DescriptorType = ACPI_DESC_TYPE_STATE;
144  }
145 
146  return (State);
147 }
#define ACPI_DESC_TYPE_STATE
Definition: acobject.h:561
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
enum State_ State
Definition: pofuncs.h:54
void * AcpiOsAcquireObject(ACPI_CACHE_T *Cache)

Referenced by AcpiDsResultStackPush(), AcpiDsScopeStackPush(), AcpiEvQueueNotifyRequest(), AcpiPsInitScope(), AcpiPsPushScope(), AcpiUtCreateControlState(), AcpiUtCreatePkgState(), AcpiUtCreateThreadState(), and AcpiUtCreateUpdateState().

◆ AcpiUtCreateIntegerObject()

ACPI_OPERAND_OBJECT* AcpiUtCreateIntegerObject ( UINT64  Value)

Definition at line 223 of file utobject.c.

225 {
226  ACPI_OPERAND_OBJECT *IntegerDesc;
227 
228 
229  ACPI_FUNCTION_TRACE (UtCreateIntegerObject);
230 
231 
232  /* Create and initialize a new integer object */
233 
235  if (!IntegerDesc)
236  {
237  return_PTR (NULL);
238  }
239 
240  IntegerDesc->Integer.Value = InitialValue;
241  return_PTR (IntegerDesc);
242 }
#define return_PTR(s)
Definition: acoutput.h:497
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
smooth NULL
Definition: ftsmooth.c:416
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:655

Referenced by AcpiDsMethodDataGetValue(), AcpiEvExecuteRegMethod(), AcpiExConvertToInteger(), AcpiExLoadTableOp(), AcpiExOpcode_0A_0T_1R(), AcpiExOpcode_1A_0T_1R(), AcpiExOpcode_6A_0T_1R(), AcpiExReadDataFromField(), AcpiNsConvertToInteger(), AcpiNsRepairNullElement(), AcpiPsExecuteMethod(), and AcpiPsParseAml().

◆ AcpiUtCreateInternalObjectDbg()

ACPI_OPERAND_OBJECT* AcpiUtCreateInternalObjectDbg ( const char ModuleName,
UINT32  LineNumber,
UINT32  ComponentId,
ACPI_OBJECT_TYPE  Type 
)

Definition at line 94 of file utobject.c.

99 {
101  ACPI_OPERAND_OBJECT *SecondObject;
102 
103 
104  ACPI_FUNCTION_TRACE_STR (UtCreateInternalObjectDbg,
106 
107 
108  /* Allocate the raw object descriptor */
109 
112  if (!Object)
113  {
114  return_PTR (NULL);
115  }
116 
117  switch (Type)
118  {
119  case ACPI_TYPE_REGION:
122 
123  /* These types require a secondary object */
124 
125  SecondObject = AcpiUtAllocateObjectDescDbg (
127  if (!SecondObject)
128  {
130  return_PTR (NULL);
131  }
132 
133  SecondObject->Common.Type = ACPI_TYPE_LOCAL_EXTRA;
134  SecondObject->Common.ReferenceCount = 1;
135 
136  /* Link the second object to the first */
137 
138  Object->Common.NextObject = SecondObject;
139  break;
140 
141  default:
142 
143  /* All others have no secondary object */
144  break;
145  }
146 
147  /* Save the object type in the object descriptor */
148 
149  Object->Common.Type = (UINT8) Type;
150 
151  /* Init the reference count */
152 
153  Object->Common.ReferenceCount = 1;
154 
155  /* Any per-type initialization should go here */
156 
157  return_PTR (Object);
158 }
void * AcpiUtAllocateObjectDescDbg(const char *ModuleName, UINT32 LineNumber, UINT32 ComponentId)
Definition: utobject.c:429
#define return_PTR(s)
Definition: acoutput.h:497
Type
Definition: Type.h:6
#define ACPI_TYPE_LOCAL_EXTRA
Definition: actypes.h:726
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
Definition: acpixf.h:1270
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
Definition: acpixf.h:1270
void AcpiUtDeleteObjectDesc(ACPI_OPERAND_OBJECT *Object)
Definition: utobject.c:473
smooth NULL
Definition: ftsmooth.c:416
static IUnknown Object
Definition: main.c:512
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1212
#define ACPI_TYPE_BUFFER_FIELD
Definition: actypes.h:692
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
#define ACPI_FUNCTION_TRACE_STR(a, b)
Definition: acoutput.h:483
const char * AcpiUtGetTypeName(ACPI_OBJECT_TYPE Type)
Definition: utdecode.c:249
#define ACPI_TYPE_REGION
Definition: actypes.h:688
#define ACPI_TYPE_LOCAL_BANK_FIELD
Definition: actypes.h:708
unsigned char UINT8

◆ AcpiUtCreatePackageObject()

ACPI_OPERAND_OBJECT* AcpiUtCreatePackageObject ( UINT32  Count)

Definition at line 174 of file utobject.c.

176 {
177  ACPI_OPERAND_OBJECT *PackageDesc;
178  ACPI_OPERAND_OBJECT **PackageElements;
179 
180 
181  ACPI_FUNCTION_TRACE_U32 (UtCreatePackageObject, Count);
182 
183 
184  /* Create a new Package object */
185 
187  if (!PackageDesc)
188  {
189  return_PTR (NULL);
190  }
191 
192  /*
193  * Create the element array. Count+1 allows the array to be null
194  * terminated.
195  */
196  PackageElements = ACPI_ALLOCATE_ZEROED (
197  ((ACPI_SIZE) Count + 1) * sizeof (void *));
198  if (!PackageElements)
199  {
200  ACPI_FREE (PackageDesc);
201  return_PTR (NULL);
202  }
203 
204  PackageDesc->Package.Count = Count;
205  PackageDesc->Package.Elements = PackageElements;
206  return_PTR (PackageDesc);
207 }
#define ACPI_FREE(a)
Definition: actypes.h:386
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define return_PTR(s)
Definition: acoutput.h:497
ACPI_OBJECT_PACKAGE Package
Definition: acobject.h:520
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#define ACPI_FUNCTION_TRACE_U32(a, b)
Definition: acoutput.h:482
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
smooth NULL
Definition: ftsmooth.c:416
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:655
union acpi_operand_object ** Elements
Definition: acobject.h:161

Referenced by AcpiNsWrapWithPackage(), AcpiUtCopyEpackageToIpackage(), and AcpiUtCopyIelementToIelement().

◆ AcpiUtCreatePkgState()

ACPI_GENERIC_STATE* AcpiUtCreatePkgState ( void InternalObject,
void ExternalObject,
UINT32  Index 
)

Definition at line 255 of file utstate.c.

259 {
261 
262 
264 
265 
266  /* Create the generic state object */
267 
269  if (!State)
270  {
271  return (NULL);
272  }
273 
274  /* Init fields specific to the update struct */
275 
276  State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_PACKAGE;
277  State->Pkg.SourceObject = (ACPI_OPERAND_OBJECT *) InternalObject;
278  State->Pkg.DestObject = ExternalObject;
279  State->Pkg.Index= Index;
280  State->Pkg.NumPackages = 1;
281 
282  return (State);
283 }
ACPI_GENERIC_STATE * AcpiUtCreateGenericState(void)
Definition: utstate.c:130
#define ACPI_DESC_TYPE_STATE_PACKAGE
Definition: acobject.h:563
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
static const UCHAR Index[8]
Definition: usbohci.c:18
enum State_ State
Definition: pofuncs.h:54

Referenced by AcpiUtWalkPackageTree().

◆ AcpiUtCreateRwLock()

ACPI_STATUS AcpiUtCreateRwLock ( ACPI_RW_LOCK Lock)

Definition at line 66 of file utlock.c.

68 {
70 
71 
72  Lock->NumReaders = 0;
73  Status = AcpiOsCreateMutex (&Lock->ReaderMutex);
74  if (ACPI_FAILURE (Status))
75  {
76  return (Status);
77  }
78 
79  Status = AcpiOsCreateMutex (&Lock->WriterMutex);
80  return (Status);
81 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
Status
Definition: gdiplustypes.h:24
ACPI_STATUS AcpiOsCreateMutex(ACPI_MUTEX *OutHandle)
Definition: osl.c:271

Referenced by AcpiUtMutexInitialize().

◆ AcpiUtCreateStringObject()

ACPI_OPERAND_OBJECT* AcpiUtCreateStringObject ( ACPI_SIZE  StringSize)

Definition at line 320 of file utobject.c.

322 {
323  ACPI_OPERAND_OBJECT *StringDesc;
324  char *String;
325 
326 
327  ACPI_FUNCTION_TRACE_U32 (UtCreateStringObject, StringSize);
328 
329 
330  /* Create a new String object */
331 
333  if (!StringDesc)
334  {
335  return_PTR (NULL);
336  }
337 
338  /*
339  * Allocate the actual string buffer -- (Size + 1) for NULL terminator.
340  * NOTE: Zero-length strings are NULL terminated
341  */
342  String = ACPI_ALLOCATE_ZEROED (StringSize + 1);
343  if (!String)
344  {
345  ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
346  (UINT32) StringSize));
347 
348  AcpiUtRemoveReference (StringDesc);
349  return_PTR (NULL);
350  }
351 
352  /* Complete string object initialization */
353 
354  StringDesc->String.Pointer = String;
355  StringDesc->String.Length = (UINT32) StringSize;
356 
357  /* Return the new string descriptor */
358 
359  return_PTR (StringDesc);
360 }
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define return_PTR(s)
Definition: acoutput.h:497
static WCHAR String[]
Definition: stringtable.c:55
#define ACPI_FUNCTION_TRACE_U32(a, b)
Definition: acoutput.h:482
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
smooth NULL
Definition: ftsmooth.c:416
ACPI_OBJECT_STRING String
Definition: acobject.h:518
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_TYPE_STRING
Definition: actypes.h:680
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:655

Referenced by AcpiExConvertToObjectTypeString(), AcpiExConvertToString(), AcpiExDoConcatenate(), AcpiExOpcode_2A_1T_1R(), AcpiNsConvertToString(), AcpiNsRepair_HID(), and AcpiNsRepairNullElement().

◆ AcpiUtCreateThreadState()

ACPI_THREAD_STATE* AcpiUtCreateThreadState ( void  )

Definition at line 164 of file utstate.c.

166 {
168 
169 
171 
172 
173  /* Create the generic state object */
174 
176  if (!State)
177  {
178  return (NULL);
179  }
180 
181  /* Init fields specific to the update struct */
182 
183  State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_THREAD;
184  State->Thread.ThreadId = AcpiOsGetThreadId ();
185 
186  /* Check for invalid thread ID - zero is very bad, it will break things */
187 
188  if (!State->Thread.ThreadId)
189  {
190  ACPI_ERROR ((AE_INFO, "Invalid zero ID from AcpiOsGetThreadId"));
191  State->Thread.ThreadId = (ACPI_THREAD_ID) 1;
192  }
193 
194  return ((ACPI_THREAD_STATE *) State);
195 }
ACPI_GENERIC_STATE * AcpiUtCreateGenericState(void)
Definition: utstate.c:130
ACPI_THREAD_ID AcpiOsGetThreadId(void)
Definition: osl.c:217
#define ACPI_DESC_TYPE_STATE_THREAD
Definition: acobject.h:570
#define AE_INFO
Definition: acoutput.h:230
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
enum State_ State
Definition: pofuncs.h:54
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_THREAD_ID
Definition: actypes.h:144

Referenced by AcpiPsParseAml().

◆ AcpiUtCreateUpdateState()

ACPI_GENERIC_STATE* AcpiUtCreateUpdateState ( ACPI_OPERAND_OBJECT Object,
UINT16  Action 
)

Definition at line 214 of file utstate.c.

217 {
219 
220 
222 
223 
224  /* Create the generic state object */
225 
227  if (!State)
228  {
229  return (NULL);
230  }
231 
232  /* Init fields specific to the update struct */
233 
234  State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_UPDATE;
235  State->Update.Object = Object;
236  State->Update.Value = Action;
237  return (State);
238 }
ACPI_GENERIC_STATE * AcpiUtCreateGenericState(void)
Definition: utstate.c:130
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_DESC_TYPE_STATE_UPDATE
Definition: acobject.h:562
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
static IUnknown Object
Definition: main.c:512
enum State_ State
Definition: pofuncs.h:54

Referenced by AcpiUtCreateUpdateStateAndPush().

◆ AcpiUtCreateUpdateStateAndPush()

ACPI_STATUS AcpiUtCreateUpdateStateAndPush ( ACPI_OPERAND_OBJECT Object,
UINT16  Action,
ACPI_GENERIC_STATE **  StateList 
)

Definition at line 219 of file utmisc.c.

223 {
225 
226 
228 
229 
230  /* Ignore null objects; these are expected */
231 
232  if (!Object)
233  {
234  return (AE_OK);
235  }
236 
238  if (!State)
239  {
240  return (AE_NO_MEMORY);
241  }
242 
243  AcpiUtPushGenericState (StateList, State);
244  return (AE_OK);
245 }
#define AE_NO_MEMORY
Definition: acexcep.h:112
void AcpiUtPushGenericState(ACPI_GENERIC_STATE **ListHead, ACPI_GENERIC_STATE *State)
Definition: utstate.c:65
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
static IUnknown Object
Definition: main.c:512
enum State_ State
Definition: pofuncs.h:54
ACPI_GENERIC_STATE * AcpiUtCreateUpdateState(ACPI_OPERAND_OBJECT *Object, UINT16 Action)
Definition: utstate.c:214
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiUtUpdateObjectReference().

◆ AcpiUtDebugDumpBuffer()

void AcpiUtDebugDumpBuffer ( UINT8 Buffer,
UINT32  Count,
UINT32  Display,
UINT32  ComponentId 
)

Definition at line 219 of file utbuffer.c.

224 {
225 
226  /* Only dump the buffer if tracing is enabled */
227 
228  if (!((ACPI_LV_TABLES & AcpiDbgLevel) &&
229  (ComponentId & AcpiDbgLayer)))
230  {
231  return;
232  }
233 
235 }
#define ACPI_LV_TABLES
Definition: acoutput.h:105
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
void AcpiUtDumpBuffer(UINT8 *Buffer, UINT32 Count, UINT32 Display, UINT32 BaseOffset)
Definition: utbuffer.c:71
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
Definition: acpixf.h:1270
Definition: bufpool.h:45
int Display
Definition: x11stubs.h:25

◆ AcpiUtDeleteAddressLists()

void AcpiUtDeleteAddressLists ( void  )

Definition at line 292 of file utaddress.c.

294 {
295  ACPI_ADDRESS_RANGE *Next;
296  ACPI_ADDRESS_RANGE *RangeInfo;
297  int i;
298 
299 
300  /* Delete all elements in all address range lists */
301 
302  for (i = 0; i < ACPI_ADDRESS_RANGE_MAX; i++)
303  {
304  Next = AcpiGbl_AddressRangeList[i];
305 
306  while (Next)
307  {
308  RangeInfo = Next;
309  Next = RangeInfo->Next;
310  ACPI_FREE (RangeInfo);
311  }
312 
313  AcpiGbl_AddressRangeList[i] = NULL;
314  }
315 }
#define ACPI_FREE(a)
Definition: actypes.h:386
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define ACPI_ADDRESS_RANGE_MAX
Definition: acconfig.h:148
struct acpi_address_range * Next
Definition: aclocal.h:849

Referenced by AcpiUtTerminate().

◆ AcpiUtDeleteCaches()

ACPI_STATUS AcpiUtDeleteCaches ( void  )

Definition at line 218 of file utalloc.c.

220 {
221 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
222  char Buffer[7];
223 
224 
225  if (AcpiGbl_DisplayFinalMemStats)
226  {
227  strcpy (Buffer, "MEMORY");
229  }
230 #endif
231 
232  (void) AcpiOsDeleteCache (AcpiGbl_NamespaceCache);
233  AcpiGbl_NamespaceCache = NULL;
234 
235  (void) AcpiOsDeleteCache (AcpiGbl_StateCache);
236  AcpiGbl_StateCache = NULL;
237 
238  (void) AcpiOsDeleteCache (AcpiGbl_OperandCache);
239  AcpiGbl_OperandCache = NULL;
240 
241  (void) AcpiOsDeleteCache (AcpiGbl_PsNodeCache);
242  AcpiGbl_PsNodeCache = NULL;
243 
244  (void) AcpiOsDeleteCache (AcpiGbl_PsNodeExtCache);
245  AcpiGbl_PsNodeExtCache = NULL;
246 
247 #ifdef ACPI_ASL_COMPILER
248  (void) AcpiOsDeleteCache (AcpiGbl_RegCommentCache);
249  AcpiGbl_RegCommentCache = NULL;
250 
251  (void) AcpiOsDeleteCache (AcpiGbl_CommentAddrCache);
252  AcpiGbl_CommentAddrCache = NULL;
253 
254  (void) AcpiOsDeleteCache (AcpiGbl_FileCache);
255  AcpiGbl_FileCache = NULL;
256 #endif
257 
258 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
259 
260  /* Debug only - display leftover memory allocation, if any */
261 
262  AcpiUtDumpAllocations (ACPI_UINT32_MAX, NULL);
263 
264  /* Free memory lists */
265 
266  AcpiOsFree (AcpiGbl_GlobalList);
267  AcpiGbl_GlobalList = NULL;
268 
269  AcpiOsFree (AcpiGbl_NsNodeList);
270  AcpiGbl_NsNodeList = NULL;
271 #endif
272 
273  return (AE_OK);
274 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
ACPI_STATUS AcpiOsDeleteCache(ACPI_CACHE_T *Cache)
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define ACPI_UINT32_MAX
Definition: actypes.h:66
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
void AcpiOsFree(void *Memory)
Definition: osl.c:167
#define AE_OK
Definition: acexcep.h:97
ACPI_STATUS AcpiDbDisplayStatistics(char *TypeArg)

Referenced by AcpiUtSubsystemShutdown().

◆ AcpiUtDeleteGenericState()

void AcpiUtDeleteGenericState ( ACPI_GENERIC_STATE State)

Definition at line 340 of file utstate.c.

342 {
344 
345 
346  /* Ignore null state */
347 
348  if (State)
349  {
350  (void) AcpiOsReleaseObject (AcpiGbl_StateCache, State);
351  }
352 
353  return;
354 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
ACPI_STATUS AcpiOsReleaseObject(ACPI_CACHE_T *Cache, void *Object)

Referenced by AcpiDsDeleteWalkState(), AcpiDsExecEndControlOp(), AcpiDsResultStackPop(), AcpiDsScopeStackClear(), AcpiDsScopeStackPop(), AcpiEvNotifyDispatch(), AcpiEvQueueNotifyRequest(), AcpiPsCleanupScope(), AcpiPsCompleteOp(), AcpiPsParseAml(), AcpiPsPopScope(), AcpiUtUpdateObjectReference(), and AcpiUtWalkPackageTree().

◆ AcpiUtDeleteInternalObjectList()

void AcpiUtDeleteInternalObjectList ( ACPI_OPERAND_OBJECT **  ObjList)

Definition at line 376 of file utdelete.c.

378 {
379  ACPI_OPERAND_OBJECT **InternalObj;
380 
381 
383 
384 
385  /* Walk the null-terminated internal list */
386 
387  for (InternalObj = ObjList; *InternalObj; InternalObj++)
388  {
389  AcpiUtRemoveReference (*InternalObj);
390  }
391 
392  /* Free the combined parameter pointer list and object array */
393 
394  ACPI_FREE (ObjList);
395  return;
396 }
#define ACPI_FREE(a)
Definition: actypes.h:386
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484

Referenced by AcpiEvaluateObject().

◆ AcpiUtDeleteInternalPackageObject()

void AcpiUtDeleteInternalPackageObject ( ACPI_OPERAND_OBJECT Object)

◆ AcpiUtDeleteInternalSimpleObject()

void AcpiUtDeleteInternalSimpleObject ( ACPI_OPERAND_OBJECT Object)

◆ AcpiUtDeleteObjectDesc()

void AcpiUtDeleteObjectDesc ( ACPI_OPERAND_OBJECT Object)

Definition at line 473 of file utobject.c.

475 {
476  ACPI_FUNCTION_TRACE_PTR (UtDeleteObjectDesc, Object);
477 
478 
479  /* Object must be of type ACPI_OPERAND_OBJECT */
480 
482  {
484  "%p is not an ACPI Operand object [%s]", Object,
486  return_VOID;
487  }
488 
489  (void) AcpiOsReleaseObject (AcpiGbl_OperandCache, Object);
490  return_VOID;
491 }
const char * AcpiUtGetDescriptorName(void *Object)
Definition: utdecode.c:381
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define AE_INFO
Definition: acoutput.h:230
#define ACPI_FUNCTION_TRACE_PTR(a, b)
Definition: acoutput.h:481
#define ACPI_DESC_TYPE_OPERAND
Definition: acobject.h:573
static IUnknown Object
Definition: main.c:512
#define return_VOID
Definition: acoutput.h:495
ACPI_STATUS AcpiOsReleaseObject(ACPI_CACHE_T *Cache, void *Object)
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414

Referenced by AcpiDsBuildInternalBufferObj(), AcpiDsBuildInternalPackageObj(), AcpiDsCreateMethodMutex(), AcpiDsCreateOperand(), AcpiExPrepFieldValue(), AcpiUtCreateInternalObjectDbg(), and AcpiUtDeleteInternalObj().

◆ AcpiUtDeleteRwLock()

void AcpiUtDeleteRwLock ( ACPI_RW_LOCK Lock)

Definition at line 85 of file utlock.c.

87 {
88 
89  AcpiOsDeleteMutex (Lock->ReaderMutex);
90  AcpiOsDeleteMutex (Lock->WriterMutex);
91 
92  Lock->NumReaders = 0;
93  Lock->ReaderMutex = NULL;
94  Lock->WriterMutex = NULL;
95 }
smooth NULL
Definition: ftsmooth.c:416
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
void AcpiOsDeleteMutex(ACPI_MUTEX Handle)
Definition: osl.c:293

Referenced by AcpiUtMutexTerminate().

◆ AcpiUtDetectHexPrefix()

BOOLEAN AcpiUtDetectHexPrefix ( char **  String)

Definition at line 311 of file utstrsuppt.c.

313 {
314  char *InitialPosition = *String;
315 
317  if (*String != InitialPosition)
318  {
319  return (TRUE); /* String is past leading 0x */
320  }
321 
322  return (FALSE); /* Not a hex string */
323 }
#define TRUE
Definition: types.h:120
void AcpiUtRemoveHexPrefix(char **String)
Definition: utstrsuppt.c:339
static WCHAR String[]
Definition: stringtable.c:55

Referenced by AcpiUtExplicitStrtoul64(), and AcpiUtStrtoul64().

◆ AcpiUtDetectOctalPrefix()

BOOLEAN AcpiUtDetectOctalPrefix ( char **  String)

Definition at line 364 of file utstrsuppt.c.

366 {
367 
368  if (**String == ACPI_ASCII_ZERO)
369  {
370  *String += 1; /* Go past the leading 0 */
371  return (TRUE);
372  }
373 
374  return (FALSE); /* Not an octal string */
375 }
#define TRUE
Definition: types.h:120
static WCHAR String[]
Definition: stringtable.c:55
#define ACPI_ASCII_ZERO
Definition: aclocal.h:1356

Referenced by AcpiUtStrtoul64().

◆ AcpiUtDivide()

ACPI_STATUS AcpiUtDivide ( UINT64  InDividend,
UINT64  InDivisor,
UINT64 OutQuotient,
UINT64 OutRemainder 
)

Definition at line 402 of file utmath.c.

407 {
408  UINT64_OVERLAY Dividend;
410  UINT64_OVERLAY Quotient;
412  UINT64_OVERLAY NormalizedDividend;
413  UINT64_OVERLAY NormalizedDivisor;
414  UINT32 Partial1;
415  UINT64_OVERLAY Partial2;
416  UINT64_OVERLAY Partial3;
417 
418 
419  ACPI_FUNCTION_TRACE (UtDivide);
420 
421 
422  /* Always check for a zero divisor */
423 
424  if (InDivisor == 0)
425  {
426  ACPI_ERROR ((AE_INFO, "Divide by zero"));
428  }
429 
430  Divisor.Full = InDivisor;
431  Dividend.Full = InDividend;
432  if (Divisor.Part.Hi == 0)
433  {
434  /*
435  * 1) Simplest case is where the divisor is 32 bits, we can
436  * just do two divides
437  */
438  Remainder.Part.Hi = 0;
439 
440  /*
441  * The quotient is 64 bits, the remainder is always 32 bits,
442  * and is generated by the second divide.
443  */
444  ACPI_DIV_64_BY_32 (0, Dividend.Part.Hi, Divisor.Part.Lo,
445  Quotient.Part.Hi, Partial1);
446 
447  ACPI_DIV_64_BY_32 (Partial1, Dividend.Part.Lo, Divisor.Part.Lo,
448  Quotient.Part.Lo, Remainder.Part.Lo);
449  }
450 
451  else
452  {
453  /*
454  * 2) The general case where the divisor is a full 64 bits
455  * is more difficult
456  */
457  Quotient.Part.Hi = 0;
458  NormalizedDividend = Dividend;
459  NormalizedDivisor = Divisor;
460 
461  /* Normalize the operands (shift until the divisor is < 32 bits) */
462 
463  do
464  {
466  NormalizedDivisor.Part.Hi, NormalizedDivisor.Part.Lo);
468  NormalizedDividend.Part.Hi, NormalizedDividend.Part.Lo);
469 
470  } while (NormalizedDivisor.Part.Hi != 0);
471 
472  /* Partial divide */
473 
474  ACPI_DIV_64_BY_32 (
475  NormalizedDividend.Part.Hi, NormalizedDividend.Part.Lo,
476  NormalizedDivisor.Part.Lo, Quotient.Part.Lo, Partial1);
477 
478  /*
479  * The quotient is always 32 bits, and simply requires
480  * adjustment. The 64-bit remainder must be generated.
481  */
482  Partial1 = Quotient.Part.Lo * Divisor.Part.Hi;
483  Partial2.Full = (UINT64) Quotient.Part.Lo * Divisor.Part.Lo;
484  Partial3.Full = (UINT64) Partial2.Part.Hi + Partial1;
485 
486  Remainder.Part.Hi = Partial3.Part.Lo;
487  Remainder.Part.Lo = Partial2.Part.Lo;
488 
489  if (Partial3.Part.Hi == 0)
490  {
491  if (Partial3.Part.Lo >= Dividend.Part.Hi)
492  {
493  if (Partial3.Part.Lo == Dividend.Part.Hi)
494  {
495  if (Partial2.Part.Lo > Dividend.Part.Lo)
496  {
497  Quotient.Part.Lo--;
498  Remainder.Full -= Divisor.Full;
499  }
500  }
501  else
502  {
503  Quotient.Part.Lo--;
504  Remainder.Full -= Divisor.Full;
505  }
506  }
507 
508  Remainder.Full = Remainder.Full - Dividend.Full;
509  Remainder.Part.Hi = (UINT32) -((INT32) Remainder.Part.Hi);
510  Remainder.Part.Lo = (UINT32) -((INT32) Remainder.Part.Lo);
511 
512  if (Remainder.Part.Lo)
513  {
514  Remainder.Part.Hi--;
515  }
516  }
517  }
518 
519  /* Return only what was requested */
520 
521  if (OutQuotient)
522  {
523  *OutQuotient = Quotient.Full;
524  }
525  if (OutRemainder)
526  {
527  *OutRemainder = Remainder.Full;
528  }
529 
531 }
UINT64_STRUCT Part
Definition: utmath.c:63
#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo)
Definition: acos2.h:84
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
UINT64 Full
Definition: utmath.c:62
UINT32 Hi
Definition: utmath.c:56
UINT32 Lo
Definition: utmath.c:55
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
_In_ LARGE_INTEGER Divisor
Definition: rtlfuncs.h:3046
signed int INT32
unsigned long long UINT64
#define AE_AML_DIVIDE_BY_ZERO
Definition: acexcep.h:191
#define AE_OK
Definition: acexcep.h:97
_In_ LARGE_INTEGER _Out_opt_ PLARGE_INTEGER Remainder
Definition: rtlfuncs.h:3046

Referenced by AcpiExOpcode_2A_1T_1R(), AcpiExOpcode_2A_2T_1R(), and AcpiUtPutNumber().

◆ AcpiUtDumpBuffer()

void AcpiUtDumpBuffer ( UINT8 Buffer,
UINT32  Count,
UINT32  Display,
UINT32  Offset 
)

Definition at line 71 of file utbuffer.c.

76 {
77  UINT32 i = 0;
78  UINT32 j;
79  UINT32 Temp32;
80  UINT8 BufChar;
81  UINT32 DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY;
82 
83 
85  if (!Buffer)
86  {
87  AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
88  return;
89  }
90 
91  if ((Count < 4) || (Count & 0x01))
92  {
94  }
95 
96  /* Nasty little dump buffer routine! */
97 
98  while (i < Count)
99  {
100  /* Print current offset */
101 
102  if (!DisplayDataOnly)
103  {
104  AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
105  }
106 
107  /* Print 16 hex chars */
108 
109  for (j = 0; j < 16;)
110  {
111  if (i + j >= Count)
112  {
113  /* Dump fill spaces */
114 
115  AcpiOsPrintf ("%*s", ((Display * 2) + 1), " ");
116  j += Display;
117  continue;
118  }
119 
120  switch (Display)
121  {
122  case DB_BYTE_DISPLAY:
123  default: /* Default is BYTE display */
124 
125  AcpiOsPrintf ("%02X ", Buffer[(ACPI_SIZE) i + j]);
126  break;
127 
128  case DB_WORD_DISPLAY:
129 
130  ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
131  AcpiOsPrintf ("%04X ", Temp32);
132  break;
133 
134  case DB_DWORD_DISPLAY:
135 
136  ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
137  AcpiOsPrintf ("%08X ", Temp32);
138  break;
139 
140  case DB_QWORD_DISPLAY:
141 
142  ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
143  AcpiOsPrintf ("%08X", Temp32);
144 
145  ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]);
146  AcpiOsPrintf ("%08X ", Temp32);
147  break;
148  }
149 
150  j += Display;
151  }
152 
153  /*
154  * Print the ASCII equivalent characters but watch out for the bad
155  * unprintable ones (printable chars are 0x20 through 0x7E)
156  */
157  if (!DisplayDataOnly)
158  {
159  AcpiOsPrintf (" ");
160  for (j = 0; j < 16; j++)
161  {
162  if (i + j >= Count)
163  {
164  AcpiOsPrintf ("\n");
165  return;
166  }
167 
168  /*
169  * Add comment characters so rest of line is ignored when
170  * compiled
171  */
172  if (j == 0)
173  {
174  AcpiOsPrintf ("// ");
175  }
176 
177  BufChar = Buffer[(ACPI_SIZE) i + j];
178  if (isprint (BufChar))
179  {
180  AcpiOsPrintf ("%c", BufChar);
181  }
182  else
183  {
184  AcpiOsPrintf (".");
185  }
186  }
187 
188  /* Done with that line. */
189 
190  AcpiOsPrintf ("\n");
191  }
192  i += 16;
193  }
194 
195  return;
196 }
#define DB_QWORD_DISPLAY
Definition: acutils.h:188
#define DB_WORD_DISPLAY
Definition: acutils.h:186
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#define DB_DWORD_DISPLAY
Definition: acutils.h:187
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define DB_BYTE_DISPLAY
Definition: acutils.h:185
unsigned int UINT32
Definition: bufpool.h:45
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
void ACPI_INTERNAL_VAR_XFACE AcpiOsPrintf(const char *Format,...)
Definition: osl.c:851
#define ACPI_MOVE_32_TO_32(d, s)
Definition: acmacros.h:148
#define DB_DISPLAY_DATA_ONLY
Definition: acutils.h:189
#define isprint(c)
Definition: acclib.h:73
int Display
Definition: x11stubs.h:25
unsigned char UINT8
#define ACPI_MOVE_16_TO_32(d, s)
Definition: acmacros.h:142

Referenced by AcpiExDoDebugObject(), AcpiPsGetAmlOpcode(), and AcpiUtDebugDumpBuffer().

◆ AcpiUtDwordByteSwap()

UINT32 AcpiUtDwordByteSwap ( UINT32  Value)

Definition at line 136 of file utmisc.c.

138 {
139  union
140  {
141  UINT32 Value;
142  UINT8 Bytes[4];
143  } Out;
144  union
145  {
146  UINT32 Value;
147  UINT8 Bytes[4];
148  } In;
149 
150 
152 
153 
154  In.Value = Value;
155 
156  Out.Bytes[0] = In.Bytes[3];
157  Out.Bytes[1] = In.Bytes[2];
158  Out.Bytes[2] = In.Bytes[1];
159  Out.Bytes[3] = In.Bytes[0];
160 
161  return (Out.Value);
162 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
_In_ UINT Bytes
Definition: mmcopy.h:9
unsigned int UINT32
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
unsigned char UINT8

Referenced by AcpiExEisaIdToString().

◆ AcpiUtEvaluateNumericObject()

ACPI_STATUS AcpiUtEvaluateNumericObject ( const char ObjectName,
ACPI_NAMESPACE_NODE DeviceNode,
UINT64 Value 
)

Definition at line 221 of file uteval.c.

225 {
226  ACPI_OPERAND_OBJECT *ObjDesc;
228 
229 
230  ACPI_FUNCTION_TRACE (UtEvaluateNumericObject);
231 
232 
234  ACPI_BTYPE_INTEGER, &ObjDesc);
235  if (ACPI_FAILURE (Status))
236  {
238  }
239 
240  /* Get the returned Integer */
241 
242  *Value = ObjDesc->Integer.Value;
243 
244  /* On exit, we must delete the return object */
245 
246  AcpiUtRemoveReference (ObjDesc);
248 }
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:62
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784

Referenced by AcpiEvPciConfigRegionSetup(), AcpiGetObjectInfo(), and AcpiHwGetPciDeviceInfo().

◆ AcpiUtEvaluateObject()

ACPI_STATUS AcpiUtEvaluateObject ( ACPI_NAMESPACE_NODE PrefixNode,
const char Path,
UINT32  ExpectedReturnBtypes,
ACPI_OPERAND_OBJECT **  ReturnDesc 
)

Definition at line 73 of file uteval.c.

78 {
81  UINT32 ReturnBtype;
82 
83 
84  ACPI_FUNCTION_TRACE (UtEvaluateObject);
85 
86 
87  /* Allocate the evaluation information block */
88 
90  if (!Info)
91  {
93  }
94 
95  Info->PrefixNode = PrefixNode;
96  Info->RelativePathname = Path;
97 
98  /* Evaluate the object/method */
99 
101  if (ACPI_FAILURE (Status))
102  {
103  if (Status == AE_NOT_FOUND)
104  {
105  ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s.%s] was not found\n",
106  AcpiUtGetNodeName (PrefixNode), Path));
107  }
108  else
109  {
110  ACPI_ERROR_METHOD ("Method execution failed",
111  PrefixNode, Path, Status);
112  }
113 
114  goto Cleanup;
115  }
116 
117  /* Did we get a return object? */
118 
119  if (!Info->ReturnObject)
120  {
121  if (ExpectedReturnBtypes)
122  {
123  ACPI_ERROR_METHOD ("No object was returned from",
124  PrefixNode, Path, AE_NOT_EXIST);
125 
127  }
128 
129  goto Cleanup;
130  }
131 
132  /* Map the return object type to the bitmapped type */
133 
134  switch ((Info->ReturnObject)->Common.Type)
135  {
136  case ACPI_TYPE_INTEGER:
137 
138  ReturnBtype = ACPI_BTYPE_INTEGER;
139  break;
140 
141  case ACPI_TYPE_BUFFER:
142 
143  ReturnBtype = ACPI_BTYPE_BUFFER;
144  break;
145 
146  case ACPI_TYPE_STRING:
147 
148  ReturnBtype = ACPI_BTYPE_STRING;
149  break;
150 
151  case ACPI_TYPE_PACKAGE:
152 
153  ReturnBtype = ACPI_BTYPE_PACKAGE;
154  break;
155 
156  default:
157 
158  ReturnBtype = 0;
159  break;
160  }
161 
162  if ((AcpiGbl_EnableInterpreterSlack) &&
163  (!ExpectedReturnBtypes))
164  {
165  /*
166  * We received a return object, but one was not expected. This can
167  * happen frequently if the "implicit return" feature is enabled.
168  * Just delete the return object and return AE_OK.
169  */
170  AcpiUtRemoveReference (Info->ReturnObject);
171  goto Cleanup;
172  }
173 
174  /* Is the return object one of the expected types? */
175 
176  if (!(ExpectedReturnBtypes & ReturnBtype))
177  {
178  ACPI_ERROR_METHOD ("Return object type is incorrect",
179  PrefixNode, Path, AE_TYPE);
180 
182  "Type returned from %s was incorrect: %s, expected Btypes: 0x%X",
183  Path, AcpiUtGetObjectTypeName (Info->ReturnObject),
184  ExpectedReturnBtypes));
185 
186  /* On error exit, we must delete the return object */
187 
188  AcpiUtRemoveReference (Info->ReturnObject);
189  Status = AE_TYPE;
190  goto Cleanup;
191  }
192 
193  /* Object type is OK, return it */
194 
195  *ReturnDesc = Info->ReturnObject;
196 
197 Cleanup:
198  ACPI_FREE (Info);
200 }
#define ACPI_FREE(a)
Definition: actypes.h:386
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define AE_NO_MEMORY
Definition: acexcep.h:112
#define ACPI_TYPE_BUFFER
Definition: actypes.h:681
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
ACPI_STATUS AcpiNsEvaluate(ACPI_EVALUATE_INFO *Info)
Definition: nseval.c:82
UINT32 ACPI_STATUS
Definition: actypes.h:460
struct TraceInfo Info
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
#define AE_INFO
Definition: acoutput.h:230
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
#define AE_NOT_FOUND
Definition: acexcep.h:113
#define ACPI_ERROR_METHOD(s, n, p, e)
Definition: acmacros.h:463
#define AE_NOT_EXIST
Definition: acexcep.h:114
#define AE_TYPE
Definition: acexcep.h:116
static const WCHAR Cleanup[]
Definition: register.c:80
#define ACPI_BTYPE_PACKAGE
Definition: aclocal.h:335
#define ACPI_BTYPE_STRING
Definition: aclocal.h:333
Status
Definition: gdiplustypes.h:24
#define ACPI_DB_EXEC
Definition: acoutput.h:165
PRTL_UNICODE_STRING_BUFFER Path
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
const char * AcpiUtGetNodeName(void *Object)
Definition: utdecode.c:305
#define ACPI_TYPE_STRING
Definition: actypes.h:680
#define ACPI_BTYPE_BUFFER
Definition: aclocal.h:334
const char * AcpiUtGetObjectTypeName(ACPI_OPERAND_OBJECT *ObjDesc)
Definition: utdecode.c:263

Referenced by AcpiRsGetAeiMethodData(), AcpiRsGetCrsMethodData(), AcpiRsGetMethodData(), AcpiRsGetPrsMethodData(), AcpiRsGetPrtMethodData(), AcpiUtEvaluateNumericObject(), AcpiUtExecute_CID(), AcpiUtExecute_CLS(), AcpiUtExecute_HID(), AcpiUtExecute_STA(), AcpiUtExecute_UID(), and AcpiUtExecutePowerMethods().

◆ AcpiUtExecute_CID()

ACPI_STATUS AcpiUtExecute_CID ( ACPI_NAMESPACE_NODE DeviceNode,
ACPI_PNP_DEVICE_ID_LIST **  ReturnCidList 
)

Definition at line 253 of file utids.c.

256 {
257  ACPI_OPERAND_OBJECT **CidObjects;
258  ACPI_OPERAND_OBJECT *ObjDesc;
259  ACPI_PNP_DEVICE_ID_LIST *CidList;
260  char *NextIdString;
261  UINT32 StringAreaSize;
262  UINT32 Length;
263  UINT32 CidListSize;
265  UINT32 Count;
266  UINT32 i;
267 
268 
269  ACPI_FUNCTION_TRACE (UtExecute_CID);
270 
271 
272  /* Evaluate the _CID method for this device */
273 
276  &ObjDesc);
277  if (ACPI_FAILURE (Status))
278  {
280  }
281 
282  /*
283  * Get the count and size of the returned _CIDs. _CID can return either
284  * a Package of Integers/Strings or a single Integer or String.
285  * Note: This section also validates that all CID elements are of the
286  * correct type (Integer or String).
287  */
288  if (ObjDesc->Common.Type == ACPI_TYPE_PACKAGE)
289  {
290  Count = ObjDesc->Package.Count;
291  CidObjects = ObjDesc->Package.Elements;
292  }
293  else /* Single Integer or String CID */
294  {
295  Count = 1;
296  CidObjects = &ObjDesc;
297  }
298 
299  StringAreaSize = 0;
300  for (i = 0; i < Count; i++)
301  {
302  /* String lengths include null terminator */
303 
304  switch (CidObjects[i]->Common.Type)
305  {
306  case ACPI_TYPE_INTEGER:
307 
308  StringAreaSize += ACPI_EISAID_STRING_SIZE;
309  break;
310 
311  case ACPI_TYPE_STRING:
312 
313  StringAreaSize += CidObjects[i]->String.Length + 1;
314  break;
315 
316  default:
317 
318  Status = AE_TYPE;
319  goto Cleanup;
320  }
321  }
322 
323  /*
324  * Now that we know the length of the CIDs, allocate return buffer:
325  * 1) Size of the base structure +
326  * 2) Size of the CID PNP_DEVICE_ID array +
327  * 3) Size of the actual CID strings
328  */
329  CidListSize = sizeof (ACPI_PNP_DEVICE_ID_LIST) +
330  ((Count - 1) * sizeof (ACPI_PNP_DEVICE_ID)) +
331  StringAreaSize;
332 
333  CidList = ACPI_ALLOCATE_ZEROED (CidListSize);
334  if (!CidList)
335  {
337  goto Cleanup;
338  }
339 
340  /* Area for CID strings starts after the CID PNP_DEVICE_ID array */
341 
342  NextIdString = ACPI_CAST_PTR (char, CidList->Ids) +
343  ((ACPI_SIZE) Count * sizeof (ACPI_PNP_DEVICE_ID));
344 
345  /* Copy/convert the CIDs to the return buffer */
346 
347  for (i = 0; i < Count; i++)
348  {
349  if (CidObjects[i]->Common.Type == ACPI_TYPE_INTEGER)
350  {
351  /* Convert the Integer (EISAID) CID to a string */
352 
354  NextIdString, CidObjects[i]->Integer.Value);
356  }
357  else /* ACPI_TYPE_STRING */
358  {
359  /* Copy the String CID from the returned object */
360 
361  strcpy (NextIdString, CidObjects[i]->String.Pointer);
362  Length = CidObjects[i]->String.Length + 1;
363  }
364 
365  CidList->Ids[i].String = NextIdString;
366  CidList->Ids[i].Length = Length;
367  NextIdString += Length;
368  }
369 
370  /* Finish the CID list */
371 
372  CidList->Count = Count;
373  CidList->ListSize = CidListSize;
374  *ReturnCidList = CidList;
375 
376 
377 Cleanup:
378 
379  /* On exit, we must delete the _CID return object */
380 
381  AcpiUtRemoveReference (ObjDesc);
383 }
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define AE_NO_MEMORY
Definition: acexcep.h:112
struct acpi_pnp_device_id_list ACPI_PNP_DEVICE_ID_LIST
ACPI_OBJECT_PACKAGE Package
Definition: acobject.h:520
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
ACPI_PNP_DEVICE_ID Ids[1]
Definition: actypes.h:1272
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
static WCHAR String[]
Definition: stringtable.c:55
UINT32 ACPI_STATUS
Definition: actypes.h:460
struct acpi_pnp_device_id ACPI_PNP_DEVICE_ID
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
#define ACPI_EISAID_STRING_SIZE
Definition: actypes.h:1248
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
#define METHOD_NAME__CID
Definition: acnames.h:53
#define AE_TYPE
Definition: acexcep.h:116
static const WCHAR Cleanup[]
Definition: register.c:80
#define ACPI_BTYPE_PACKAGE
Definition: aclocal.h:335
#define ACPI_BTYPE_STRING
Definition: aclocal.h:333
ACPI_OBJECT_STRING String
Definition: acobject.h:518
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define ACPI_TYPE_STRING
Definition: actypes.h:680
void AcpiExEisaIdToString(char *OutString, UINT64 CompressedId)
Definition: exutils.c:366
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
union acpi_operand_object ** Elements
Definition: acobject.h:161

Referenced by AcpiEvIsPciRootBridge(), AcpiGetObjectInfo(), and AcpiNsGetDeviceCallback().

◆ AcpiUtExecute_CLS()

ACPI_STATUS AcpiUtExecute_CLS ( ACPI_NAMESPACE_NODE DeviceNode,
ACPI_PNP_DEVICE_ID **  ReturnId 
)

Definition at line 406 of file utids.c.

409 {
410  ACPI_OPERAND_OBJECT *ObjDesc;
411  ACPI_OPERAND_OBJECT **ClsObjects;
412  UINT32 Count;
413  ACPI_PNP_DEVICE_ID *Cls;
414  UINT32 Length;
416  UINT8 ClassCode[3] = {0, 0, 0};
417 
418 
419  ACPI_FUNCTION_TRACE (UtExecute_CLS);
420 
421 
423  ACPI_BTYPE_PACKAGE, &ObjDesc);
424  if (ACPI_FAILURE (Status))
425  {
427  }
428 
429  /* Get the size of the String to be returned, includes null terminator */
430 
432  ClsObjects = ObjDesc->Package.Elements;
433  Count = ObjDesc->Package.Count;
434 
435  if (ObjDesc->Common.Type == ACPI_TYPE_PACKAGE)
436  {
437  if (Count > 0 && ClsObjects[0]->Common.Type == ACPI_TYPE_INTEGER)
438  {
439  ClassCode[0] = (UINT8) ClsObjects[0]->Integer.Value;
440  }
441  if (Count > 1 && ClsObjects[1]->Common.Type == ACPI_TYPE_INTEGER)
442  {
443  ClassCode[1] = (UINT8) ClsObjects[1]->Integer.Value;
444  }
445  if (Count > 2 && ClsObjects[2]->Common.Type == ACPI_TYPE_INTEGER)
446  {
447  ClassCode[2] = (UINT8) ClsObjects[2]->Integer.Value;
448  }
449  }
450 
451  /* Allocate a buffer for the CLS */
452 
453  Cls = ACPI_ALLOCATE_ZEROED (
454  sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
455  if (!Cls)
456  {
458  goto Cleanup;
459  }
460 
461  /* Area for the string starts after PNP_DEVICE_ID struct */
462 
463  Cls->String = ACPI_ADD_PTR (char, Cls, sizeof (ACPI_PNP_DEVICE_ID));
464 
465  /* Simply copy existing string */
466 
467  AcpiExPciClsToString (Cls->String, ClassCode);
468  Cls->Length = Length;
469  *ReturnId = Cls;
470 
471 
472 Cleanup:
473 
474  /* On exit, we must delete the return object */
475 
476  AcpiUtRemoveReference (ObjDesc);
478 }
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define AE_NO_MEMORY
Definition: acexcep.h:112
#define ACPI_PCICLS_STRING_SIZE
Definition: actypes.h:1256
ACPI_OBJECT_PACKAGE Package
Definition: acobject.h:520
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
UINT32 ACPI_STATUS
Definition: actypes.h:460
void AcpiExPciClsToString(char *OutString, UINT8 ClassCode[3])
Definition: exutils.c:461
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
#define METHOD_NAME__CLS
Definition: acnames.h:54
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
static const WCHAR Cleanup[]
Definition: register.c:80
#define ACPI_BTYPE_PACKAGE
Definition: aclocal.h:335
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
unsigned char UINT8
union acpi_operand_object ** Elements
Definition: acobject.h:161

Referenced by AcpiGetObjectInfo().

◆ AcpiUtExecute_HID()

ACPI_STATUS AcpiUtExecute_HID ( ACPI_NAMESPACE_NODE DeviceNode,
ACPI_PNP_DEVICE_ID **  ReturnId 
)

Definition at line 72 of file utids.c.

75 {
76  ACPI_OPERAND_OBJECT *ObjDesc;
77  ACPI_PNP_DEVICE_ID *Hid;
78  UINT32 Length;
80 
81 
82  ACPI_FUNCTION_TRACE (UtExecute_HID);
83 
84 
87  if (ACPI_FAILURE (Status))
88  {
90  }
91 
92  /* Get the size of the String to be returned, includes null terminator */
93 
94  if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
95  {
97  }
98  else
99  {
100  Length = ObjDesc->String.Length + 1;
101  }
102 
103  /* Allocate a buffer for the HID */
104 
105  Hid = ACPI_ALLOCATE_ZEROED (
106  sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
107  if (!Hid)
108  {
110  goto Cleanup;
111  }
112 
113  /* Area for the string starts after PNP_DEVICE_ID struct */
114 
115  Hid->String = ACPI_ADD_PTR (char, Hid, sizeof (ACPI_PNP_DEVICE_ID));
116 
117  /* Convert EISAID to a string or simply copy existing string */
118 
119  if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
120  {
121  AcpiExEisaIdToString (Hid->String, ObjDesc->Integer.Value);
122  }
123  else
124  {
125  strcpy (Hid->String, ObjDesc->String.Pointer);
126  }
127 
128  Hid->Length = Length;
129  *ReturnId = Hid;
130 
131 
132 Cleanup:
133 
134  /* On exit, we must delete the return object */
135 
136  AcpiUtRemoveReference (ObjDesc);
138 }
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define AE_NO_MEMORY
Definition: acexcep.h:112
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
#define ACPI_EISAID_STRING_SIZE
Definition: actypes.h:1248
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
static const WCHAR Cleanup[]
Definition: register.c:80
#define ACPI_BTYPE_STRING
Definition: aclocal.h:333
ACPI_OBJECT_STRING String
Definition: acobject.h:518
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
void AcpiExEisaIdToString(char *OutString, UINT64 CompressedId)
Definition: exutils.c:366
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
#define METHOD_NAME__HID
Definition: acnames.h:58

Referenced by AcpiEvIsPciRootBridge(), AcpiGetObjectInfo(), and AcpiNsGetDeviceCallback().

◆ AcpiUtExecute_STA()

ACPI_STATUS AcpiUtExecute_STA ( ACPI_NAMESPACE_NODE DeviceNode,
UINT32 StatusFlags 
)

Definition at line 269 of file uteval.c.

272 {
273  ACPI_OPERAND_OBJECT *ObjDesc;
275 
276 
277  ACPI_FUNCTION_TRACE (UtExecute_STA);
278 
279 
281  ACPI_BTYPE_INTEGER, &ObjDesc);
282  if (ACPI_FAILURE (Status))
283  {
284  if (AE_NOT_FOUND == Status)
285  {
286  /*
287  * if _STA does not exist, then (as per the ACPI specification),
288  * the returned flags will indicate that the device is present,
289  * functional, and enabled.
290  */
292  "_STA on %4.4s was not found, assuming device is present\n",
294 
296  Status = AE_OK;
297  }
298 
300  }
301 
302  /* Extract the status flags */
303 
304  *Flags = (UINT32) ObjDesc->Integer.Value;
305 
306  /* On exit, we must delete the return object */
307 
308  AcpiUtRemoveReference (ObjDesc);
310 }
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
#define METHOD_NAME__STA
Definition: acnames.h:73
UINT32 ACPI_STATUS
Definition: actypes.h:460
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
#define ACPI_UINT32_MAX
Definition: actypes.h:66
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
#define AE_NOT_FOUND
Definition: acexcep.h:113
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
Status
Definition: gdiplustypes.h:24
#define ACPI_DB_EXEC
Definition: acoutput.h:165
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
const char * AcpiUtGetNodeName(void *Object)
Definition: utdecode.c:305
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiNsGetDeviceCallback(), and AcpiNsInitOneDevice().

◆ AcpiUtExecute_UID()

ACPI_STATUS AcpiUtExecute_UID ( ACPI_NAMESPACE_NODE DeviceNode,
ACPI_PNP_DEVICE_ID **  ReturnId 
)

Definition at line 160 of file utids.c.

163 {
164  ACPI_OPERAND_OBJECT *ObjDesc;
165  ACPI_PNP_DEVICE_ID *Uid;
166  UINT32 Length;
168 
169 
170  ACPI_FUNCTION_TRACE (UtExecute_UID);
171 
172 
175  if (ACPI_FAILURE (Status))
176  {
178  }
179 
180  /* Get the size of the String to be returned, includes null terminator */
181 
182  if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
183  {
185  }
186  else
187  {
188  Length = ObjDesc->String.Length + 1;
189  }
190 
191  /* Allocate a buffer for the UID */
192 
193  Uid = ACPI_ALLOCATE_ZEROED (
194  sizeof (ACPI_PNP_DEVICE_ID) + (ACPI_SIZE) Length);
195  if (!Uid)
196  {
198  goto Cleanup;
199  }
200 
201  /* Area for the string starts after PNP_DEVICE_ID struct */
202 
203  Uid->String = ACPI_ADD_PTR (char, Uid, sizeof (ACPI_PNP_DEVICE_ID));
204 
205  /* Convert an Integer to string, or just copy an existing string */
206 
207  if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
208  {
209  AcpiExIntegerToString (Uid->String, ObjDesc->Integer.Value);
210  }
211  else
212  {
213  strcpy (Uid->String, ObjDesc->String.Pointer);
214  }
215 
216  Uid->Length = Length;
217  *ReturnId = Uid;
218 
219 
220 Cleanup:
221 
222  /* On exit, we must delete the return object */
223 
224  AcpiUtRemoveReference (ObjDesc);
226 }
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define AE_NO_MEMORY
Definition: acexcep.h:112
#define ACPI_TYPE_INTEGER
Definition: actypes.h:679
UINT32 ACPI_STATUS
Definition: actypes.h:460
void AcpiExIntegerToString(char *OutString, UINT64 Value)
Definition: exutils.c:421
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
unsigned int UINT32
#define ACPI_MAX64_DECIMAL_DIGITS
Definition: actypes.h:492
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
static const WCHAR Cleanup[]
Definition: register.c:80
#define ACPI_BTYPE_STRING
Definition: aclocal.h:333
ACPI_OBJECT_STRING String
Definition: acobject.h:518
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
#define METHOD_NAME__UID
Definition: acnames.h:75
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73

Referenced by AcpiGetObjectInfo().

◆ AcpiUtExecutePowerMethods()

ACPI_STATUS AcpiUtExecutePowerMethods ( ACPI_NAMESPACE_NODE DeviceNode,
const char **  MethodNames,
UINT8  MethodCount,
UINT8 OutValues 
)

Definition at line 332 of file uteval.c.

337 {
338  ACPI_OPERAND_OBJECT *ObjDesc;
340  ACPI_STATUS FinalStatus = AE_NOT_FOUND;
341  UINT32 i;
342 
343 
344  ACPI_FUNCTION_TRACE (UtExecutePowerMethods);
345 
346 
347  for (i = 0; i < MethodCount; i++)
348  {
349  /*
350  * Execute the power method (_SxD or _SxW). The only allowable
351  * return type is an Integer.
352  */
354  ACPI_CAST_PTR (char, MethodNames[i]),
355  ACPI_BTYPE_INTEGER, &ObjDesc);
356  if (ACPI_SUCCESS (Status))
357  {
358  OutValues[i] = (UINT8) ObjDesc->Integer.Value;
359 
360  /* Delete the return object */
361 
362  AcpiUtRemoveReference (ObjDesc);
363  FinalStatus = AE_OK; /* At least one value is valid */
364  continue;
365  }
366 
367  OutValues[i] = ACPI_UINT8_MAX;
368  if (Status == AE_NOT_FOUND)
369  {
370  continue; /* Ignore if not found */
371  }
372 
373  ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Failed %s on Device %4.4s, %s\n",
374  ACPI_CAST_PTR (char, MethodNames[i]),
376  }
377 
378  return_ACPI_STATUS (FinalStatus);
379 }
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
#define ACPI_SUCCESS(a)
Definition: acexcep.h:94
UINT32 ACPI_STATUS
Definition: actypes.h:460
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const char * AcpiFormatException(ACPI_STATUS Status)
Definition: utexcep.c:70
unsigned int UINT32
#define ACPI_UINT8_MAX
Definition: actypes.h:64
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_BTYPE_INTEGER
Definition: aclocal.h:332
#define AE_NOT_FOUND
Definition: acexcep.h:113
Definition: Node.h:9
ACPI_OBJECT_INTEGER Integer
Definition: acobject.h:517
Status
Definition: gdiplustypes.h:24
#define ACPI_DB_EXEC
Definition: acoutput.h:165
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:784
const char * AcpiUtGetNodeName(void *Object)
Definition: utdecode.c:305
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
unsigned char UINT8
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiGetObjectInfo().

◆ AcpiUtExit()

void AcpiUtExit ( UINT32  LineNumber,
const char FunctionName,
const char ModuleName,
UINT32  ComponentId 
)

◆ AcpiUtExplicitStrtoul64()

UINT64 AcpiUtExplicitStrtoul64 ( char String)

Definition at line 347 of file utstrtoul64.c.

349 {
350  UINT64 ConvertedInteger = 0;
351  UINT32 Base = 10; /* Default is decimal */
352 
353 
354  ACPI_FUNCTION_TRACE_STR (UtExplicitStrtoul64, String);
355 
356 
358  {
359  return_VALUE (0);
360  }
361 
362  /*
363  * Only Hex and Decimal are supported, as per the ACPI specification.
364  * A "0x" prefix indicates hex; otherwise decimal is assumed.
365  */
367  {
368  Base = 16;
369  }
370 
372  {
373  return_VALUE (0);
374  }
375 
376  /*
377  * Ignore overflow as per the ACPI specification. This is implemented by
378  * ignoring the return status from the conversion functions called below.
379  * On overflow, the input string is simply truncated.
380  */
381  switch (Base)
382  {
383  case 10:
384  default:
385  AcpiUtConvertDecimalString (String, &ConvertedInteger);
386  break;
387 
388  case 16:
389  AcpiUtConvertHexString (String, &ConvertedInteger);
390  break;
391  }
392 
393  return_VALUE (ConvertedInteger);
394 }
#define return_VALUE(s)
Definition: acoutput.h:499
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2343
static WCHAR String[]
Definition: stringtable.c:55
unsigned int UINT32
ACPI_STATUS AcpiUtConvertHexString(char *String, UINT64 *ReturnValuePtr)
Definition: utstrsuppt.c:202
ACPI_STATUS AcpiUtConvertDecimalString(char *String, UINT64 *ReturnValuePtr)
Definition: utstrsuppt.c:146
char AcpiUtRemoveLeadingZeros(char **String)
Definition: utstrsuppt.c:256
char AcpiUtRemoveWhitespace(char **String)
Definition: utstrsuppt.c:285
#define ACPI_FUNCTION_TRACE_STR(a, b)
Definition: acoutput.h:483
BOOLEAN AcpiUtDetectHexPrefix(char **String)
Definition: utstrsuppt.c:311
unsigned long long UINT64

Referenced by AcpiExConvertToInteger().

◆ AcpiUtGetArgumentTypeName()

const char* AcpiUtGetArgumentTypeName ( UINT32  ArgType)

Referenced by AcpiPsGetNextArg().

◆ AcpiUtGetDescriptorLength()

UINT32 AcpiUtGetDescriptorLength ( void Aml)

Definition at line 605 of file utresrc.c.

607 {
609 
610 
611  /*
612  * Get the Resource Length (does not include header length) and add
613  * the header length (depends on if this is a small or large resource)
614  */
615  return (AcpiUtGetResourceLength (Aml) +
617 }
UINT8 AcpiUtGetResourceHeaderLength(void *Aml)
Definition: utresrc.c:571
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
UINT16 AcpiUtGetResourceLength(void *Aml)
Definition: utresrc.c:526
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN UINT8 * Aml
Definition: acpixf.h:1293

Referenced by AcpiRsConvertResourcesToAml(), AcpiRsGetListLength(), and AcpiUtWalkAmlResources().

◆ AcpiUtGetDescriptorName()

const char* AcpiUtGetDescriptorName ( void Object)

Definition at line 381 of file utdecode.c.

383 {
384 
385  if (!Object)
386  {
387  return ("NULL OBJECT");
388  }
389 
391  {
392  return ("Not a Descriptor");
393  }
394 
396 }
static const char * AcpiGbl_DescTypeNames[]
Definition: utdecode.c:359
#define ACPI_DESC_TYPE_MAX
Definition: acobject.h:575
static IUnknown Object
Definition: main.c:512
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414

Referenced by AcpiDsInitBufferField(), AcpiExResolveMultiple(), AcpiExResolveOperands(), AcpiNsAttachObject(), AcpiNsLookup(), AcpiUtDeleteObjectDesc(), AcpiUtGetObjectTypeName(), and AcpiUtValidInternalObject().

◆ AcpiUtGetEventName()

const char* AcpiUtGetEventName ( UINT32  EventId)

Definition at line 174 of file utdecode.c.

176 {
177 
178  if (EventId > ACPI_EVENT_MAX)
179  {
180  return ("InvalidEventID");
181  }
182 
183  return (AcpiGbl_EventTypes[EventId]);
184 }
#define ACPI_EVENT_MAX
Definition: actypes.h:759
static const char * AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS]
Definition: utdecode.c:163

Referenced by AcpiDisableEvent(), AcpiEnableEvent(), AcpiEvFixedEventDispatch(), AcpiInstallFixedEventHandler(), and AcpiRemoveFixedEventHandler().

◆ AcpiUtGetExpectedReturnTypes()

void AcpiUtGetExpectedReturnTypes ( char Buffer,
UINT32  ExpectedBtypes 
)

Definition at line 158 of file utpredef.c.

161 {
162  UINT32 ThisRtype;
163  UINT32 i;
164  UINT32 j;
165 
166 
167  if (!ExpectedBtypes)
168  {
169  strcpy (Buffer, "NONE");
170  return;
171  }
172 
173  j = 1;
174  Buffer[0] = 0;
175  ThisRtype = ACPI_RTYPE_INTEGER;
176 
177  for (i = 0; i < ACPI_NUM_RTYPES; i++)
178  {
179  /* If one of the expected types, concatenate the name of this type */
180 
181  if (ExpectedBtypes & ThisRtype)
182  {
183  strcat (Buffer, &UtRtypeNames[i][j]);
184  j = 0; /* Use name separator from now on */
185  }
186 
187  ThisRtype <<= 1; /* Next Rtype */
188  }
189 }
#define ACPI_RTYPE_INTEGER
Definition: aclocal.h:478
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT32
Definition: bufpool.h:45
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define ACPI_NUM_RTYPES
Definition: aclocal.h:485
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static const char * UtRtypeNames[]
Definition: utpredef.c:57

Referenced by AcpiNsCheckObjectType().

◆ AcpiUtGetInterface()

ACPI_INTERFACE_INFO* AcpiUtGetInterface ( ACPI_STRING  InterfaceName)

Definition at line 423 of file utosi.c.

425 {
426  ACPI_INTERFACE_INFO *NextInterface;
427 
428 
429  NextInterface = AcpiGbl_SupportedInterfaces;
430  while (NextInterface)
431  {
432  if (!strcmp (InterfaceName, NextInterface->Name))
433  {
434  return (NextInterface);
435  }
436 
437  NextInterface = NextInterface->Next;
438  }
439 
440  return (NULL);
441 }
smooth NULL
Definition: ftsmooth.c:416
struct acpi_interface_info * Next
Definition: aclocal.h:1264
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469

Referenced by AcpiInstallInterface(), and AcpiUtOsiImplementation().

◆ AcpiUtGetMutexName()

const char* AcpiUtGetMutexName ( UINT32  MutexId)

Definition at line 478 of file utdecode.c.

480 {
481 
482  if (MutexId > ACPI_MAX_MUTEX)
483  {
484  return ("Invalid Mutex ID");
485  }
486 
487  return (AcpiGbl_MutexNames[MutexId]);
488 }
#define ACPI_MAX_MUTEX
Definition: aclocal.h:91
static const char * AcpiGbl_MutexNames[ACPI_NUM_MUTEX]
Definition: utdecode.c:467

Referenced by AcpiUtAcquireMutex(), and AcpiUtReleaseMutex().

◆ AcpiUtGetNextPredefinedMethod()

const ACPI_PREDEFINED_INFO* AcpiUtGetNextPredefinedMethod ( const ACPI_PREDEFINED_INFO ThisName)

Definition at line 82 of file utpredef.c.

84 {
85 
86  /*
87  * Skip next entry in the table if this name returns a Package
88  * (next entry contains the package info)
89  */
90  if ((ThisName->Info.ExpectedBtypes & ACPI_RTYPE_PACKAGE) &&
91  (ThisName->Info.ExpectedBtypes != ACPI_RTYPE_ALL))
92  {
93  ThisName++;
94  }
95 
96  ThisName++;
97  return (ThisName);
98 }
UINT8 ExpectedBtypes
Definition: aclocal.h:377
#define ACPI_RTYPE_ALL
Definition: aclocal.h:483
#define ACPI_RTYPE_PACKAGE
Definition: aclocal.h:481
ACPI_NAME_INFO Info
Definition: aclocal.h:441

Referenced by AcpiUtMatchPredefinedMethod().

◆ AcpiUtGetNodeName()

const char* AcpiUtGetNodeName ( void Object)

Definition at line 305 of file utdecode.c.

307 {
309 
310 
311  /* Must return a string of exactly 4 characters == ACPI_NAMESEG_SIZE */
312 
313  if (!Object)
314  {
315  return ("NULL");
316  }
317 
318  /* Check for Root node */
319 
320  if ((Object == ACPI_ROOT_OBJECT) ||
321  (Object == AcpiGbl_RootNode))
322  {
323  return ("\"\\\" ");
324  }
325 
326  /* Descriptor must be a namespace node */
327 
329  {
330  return ("####");
331  }
332 
333  /*
334  * Ensure name is valid. The name was validated/repaired when the node
335  * was created, but make sure it has not been corrupted.
336  */
337  AcpiUtRepairName (Node->Name.Ascii);
338 
339  /* Return the name */
340 
341  return (Node->Name.Ascii);
342 }
void AcpiUtRepairName(char *Name)
Definition: utstring.c:183
#define ACPI_ROOT_OBJECT
Definition: actypes.h:500
static IUnknown Object
Definition: main.c:512
#define ACPI_DESC_TYPE_NAMED
Definition: acobject.h:574
Definition: dlist.c:348
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414

Referenced by AcpiDsAutoSerializeMethod(), AcpiDsBeginMethodExecution(), AcpiDsGetBankFieldArguments(), AcpiDsGetBufferFieldArguments(), AcpiDsGetRegionArguments(), AcpiDsInitBufferField(), AcpiDsInitOneObject(), AcpiDsLoad1BeginOp(), AcpiDsLoad2BeginOp(), AcpiDsRestartControlMethod(), AcpiDsScopeStackPop(), AcpiDsScopeStackPush(), AcpiEvAddressSpaceDispatch(), AcpiEvAsynchExecuteGpeMethod(), AcpiEvAttachRegion(), AcpiEvInstallSpaceHandler(), AcpiEvPciConfigRegionSetup(), AcpiEvQueueNotifyRequest(), AcpiExAcquireMutex(), AcpiExPrepFieldValue(), AcpiExReleaseMutex(), AcpiExResolveMultiple(), AcpiExSetupRegion(), AcpiNsAttachObject(), AcpiNsDetachObject(), AcpiNsHandleToName(), AcpiNsInitOneObject(), AcpiNsInstallNode(), AcpiNsLookup(), AcpiNsSearchOneScope(), AcpiNsSearchParentTree(), AcpiUtAddAddressRange(), AcpiUtEvaluateObject(), AcpiUtExecute_STA(), AcpiUtExecutePowerMethods(), and AcpiUtRemoveAddressRange().

◆ AcpiUtGetObjectSize()

ACPI_STATUS AcpiUtGetObjectSize ( ACPI_OPERAND_OBJECT Obj,
ACPI_SIZE *  ObjLength 
)

Definition at line 762 of file utobject.c.

765 {
767 
768 
770 
771 
772  if ((ACPI_GET_DESCRIPTOR_TYPE (InternalObject) ==
774  (InternalObject->Common.Type == ACPI_TYPE_PACKAGE))
775  {
776  Status = AcpiUtGetPackageObjectSize (InternalObject, ObjLength);
777  }
778  else
779  {
780  Status = AcpiUtGetSimpleObjectSize (InternalObject, ObjLength);
781  }
782 
783  return (Status);
784 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_TYPE_PACKAGE
Definition: actypes.h:682
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
#define ACPI_DESC_TYPE_OPERAND
Definition: acobject.h:573
static ACPI_STATUS AcpiUtGetSimpleObjectSize(ACPI_OPERAND_OBJECT *Obj, ACPI_SIZE *ObjLength)
Definition: utobject.c:512
Status
Definition: gdiplustypes.h:24
static ACPI_STATUS AcpiUtGetPackageObjectSize(ACPI_OPERAND_OBJECT *Obj, ACPI_SIZE *ObjLength)
Definition: utobject.c:710
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414

Referenced by AcpiEvaluateObject().

◆ AcpiUtGetObjectTypeName()

const char* AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT ObjDesc)

Definition at line 263 of file utdecode.c.

265 {
266  ACPI_FUNCTION_TRACE (UtGetObjectTypeName);
267 
268 
269  if (!ObjDesc)
270  {
271  ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
272  return_STR ("[NULL Object Descriptor]");
273  }
274 
275  /* These descriptor types share a common area */
276 
279  {
281  "Invalid object descriptor type: 0x%2.2X [%s] (%p)\n",
282  ACPI_GET_DESCRIPTOR_TYPE (ObjDesc),
283  AcpiUtGetDescriptorName (ObjDesc), ObjDesc));
284 
285  return_STR ("Invalid object");
286  }
287 
288  return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type));
289 }
const char * AcpiUtGetTypeName(ACPI_OBJECT_TYPE Type)
Definition: utdecode.c:249
#define return_STR(s)
Definition: acoutput.h:498
#define ACPI_DESC_TYPE_OPERAND
Definition: acobject.h:573
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_DB_EXEC
Definition: acoutput.h:165
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
ACPI_OBJECT_COMMON Common
Definition: acobject.h:516
const char * AcpiUtGetDescriptorName(void *Object)
Definition: utdecode.c:381
#define ACPI_DESC_TYPE_NAMED
Definition: acobject.h:574
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414

Referenced by AcpiDsInitBufferField(), AcpiDsObjStackPush(), AcpiDsResultPop(), AcpiDsResultPush(), AcpiExConvertToTargetType(), AcpiExDoDebugObject(), AcpiExGetObjectReference(), AcpiExResolveNodeToValue(), AcpiExResolveObject(), AcpiExResolveOperands(), AcpiExSetupRegion(), AcpiExStore(), AcpiExStoreDirectToNode(), AcpiExStoreObjectToIndex(), AcpiExStoreObjectToNode(), AcpiExStoreObjectToObject(), AcpiExWriteSerialBus(), AcpiNsCheckObjectType(), AcpiNsEvaluate(), AcpiNsRepairNullElement(), AcpiNsSimpleRepair(), AcpiNsWrapWithPackage(), AcpiRsCreatePciRoutingTable(), AcpiUtDeleteInternalObj(), AcpiUtEvaluateObject(), AcpiUtGetSimpleObjectSize(), and AcpiUtUpdateRefCount().

◆ AcpiUtGetReferenceName()

const char* AcpiUtGetReferenceName ( ACPI_OPERAND_OBJECT Object)

Definition at line 425 of file utdecode.c.

427 {
428 
429  if (!Object)
430  {
431  return ("NULL Object");
432  }
433 
435  {
436  return ("Not an Operand object");
437  }
438 
439  if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE)
440  {
441  return ("Not a Reference object");
442  }
443 
444  if (Object->Reference.Class > ACPI_REFCLASS_MAX)
445  {
446  return ("Unknown Reference class");
447  }
448 
449  return (AcpiGbl_RefClassNames[Object->Reference.Class]);
450 }
#define ACPI_TYPE_LOCAL_REFERENCE
Definition: actypes.h:710
static const char * AcpiGbl_RefClassNames[]
Definition: utdecode.c:413
#define ACPI_DESC_TYPE_OPERAND
Definition: acobject.h:573
static IUnknown Object
Definition: main.c:512
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414

Referenced by AcpiExDoDebugObject(), AcpiExResolveOperands(), AcpiNsCheckReference(), and AcpiUtGetSimpleObjectSize().

◆ AcpiUtGetRegionName()

const char* AcpiUtGetRegionName ( UINT8  SpaceId)

Definition at line 124 of file utdecode.c.

126 {
127 
129  {
130  return ("UserDefinedRegion");
131  }
133  {
134  return ("DataTable");
135  }
137  {
138  return ("FunctionalFixedHW");
139  }
141  {
142  return ("InvalidSpaceId");
143  }
144 
145  return (AcpiGbl_RegionTypes[SpaceId]);
146 }
#define ACPI_ADR_SPACE_DATA_TABLE
Definition: actypes.h:873
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE SpaceId
Definition: acpixf.h:828
#define ACPI_USER_REGION_BEGIN
Definition: acconfig.h:197
const char * AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS]
Definition: utdecode.c:107
#define ACPI_NUM_PREDEFINED_REGIONS
Definition: actypes.h:863
#define ACPI_ADR_SPACE_FIXED_HARDWARE
Definition: actypes.h:874

Referenced by AcpiEvAddressSpaceDispatch(), AcpiEvAttachRegion(), AcpiEvDetachRegion(), AcpiEvExecuteRegMethods(), AcpiEvInitializeRegion(), AcpiEvInstallHandler(), AcpiEvInstallSpaceHandler(), AcpiExAccessRegion(), AcpiExCreateRegion(), AcpiHwRead(), AcpiHwWrite(), AcpiRemoveAddressSpaceHandler(), and AcpiUtCheckAddressRange().

◆ AcpiUtGetResourceEndTag()

ACPI_STATUS AcpiUtGetResourceEndTag ( ACPI_OPERAND_OBJECT ObjDesc,
UINT8 **  EndTag 
)

Definition at line 635 of file utresrc.c.

638 {
640 
641 
642  ACPI_FUNCTION_TRACE (UtGetResourceEndTag);
643 
644 
645  /* Allow a buffer length of zero */
646 
647  if (!ObjDesc->Buffer.Length)
648  {
649  *EndTag = ObjDesc->Buffer.Pointer;
651  }
652 
653  /* Validate the template and get a pointer to the EndTag */
654 
655  Status = AcpiUtWalkAmlResources (NULL, ObjDesc->Buffer.Pointer,
656  ObjDesc->Buffer.Length, NULL, (void **) EndTag);
657 
659 }
UINT32 ACPI_STATUS
Definition: actypes.h:460
ACPI_STATUS AcpiUtWalkAmlResources(ACPI_WALK_STATE *WalkState, UINT8 *Aml, ACPI_SIZE AmlLength, ACPI_WALK_AML_CALLBACK UserFunction, void **Context)
Definition: utresrc.c:180
smooth NULL
Definition: ftsmooth.c:416
ACPI_OBJECT_BUFFER Buffer
Definition: acobject.h:519
Status
Definition: gdiplustypes.h:24
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
#define AE_OK
Definition: acexcep.h:97

Referenced by AcpiExConcatTemplate().

◆ AcpiUtGetResourceHeaderLength()

UINT8 AcpiUtGetResourceHeaderLength ( void Aml)

Definition at line 571 of file utresrc.c.

573 {
575 
576 
577  /* Examine the large/small bit in the resource header */
578 
580  {
581  return (sizeof (AML_RESOURCE_LARGE_HEADER));
582  }
583  else
584  {
585  return (sizeof (AML_RESOURCE_SMALL_HEADER));
586  }
587 }
#define ACPI_RESOURCE_NAME_LARGE
Definition: aclocal.h:1300
#define ACPI_GET8(ptr)
Definition: acmacros.h:57
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN UINT8 * Aml
Definition: acpixf.h:1293

Referenced by AcpiRsGetListLength(), AcpiRsSetResourceLength(), and AcpiUtGetDescriptorLength().

◆ AcpiUtGetResourceLength()

UINT16 AcpiUtGetResourceLength ( void Aml)

Definition at line 526 of file utresrc.c.

528 {
529  ACPI_RS_LENGTH ResourceLength;
530 
531 
533 
534 
535  /*
536  * Byte 0 contains the descriptor name (Resource Type)
537  * Examine the large/small bit in the resource header
538  */
540  {
541  /* Large Resource type -- bytes 1-2 contain the 16-bit length */
542 
543  ACPI_MOVE_16_TO_16 (&ResourceLength, ACPI_ADD_PTR (UINT8, Aml, 1));
544 
545  }
546  else
547  {
548  /* Small Resource type -- bits 2:0 of byte 0 contain the length */
549 
550  ResourceLength = (UINT16) (ACPI_GET8 (Aml) &
552  }
553 
554  return (ResourceLength);
555 }
#define ACPI_MOVE_16_TO_16(d, s)
Definition: acmacros.h:141
#define ACPI_RESOURCE_NAME_LARGE
Definition: aclocal.h:1300
#define ACPI_GET8(ptr)
Definition: acmacros.h:57
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK
Definition: aclocal.h:1304
unsigned short UINT16
UINT16 ACPI_RS_LENGTH
Definition: acrestyp.h:51
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
unsigned char UINT8
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN UINT8 * Aml
Definition: acpixf.h:1293

Referenced by AcpiRsConvertAmlToResource(), AcpiRsGetListLength(), AcpiUtGetDescriptorLength(), and AcpiUtValidateResource().

◆ AcpiUtGetResourceType()

UINT8 AcpiUtGetResourceType ( void Aml)

Definition at line 486 of file utresrc.c.

488 {
490 
491 
492  /*
493  * Byte 0 contains the descriptor name (Resource Type)
494  * Examine the large/small bit in the resource header
495  */
497  {
498  /* Large Resource Type -- bits 6:0 contain the name */
499 
500  return (ACPI_GET8 (Aml));
501  }
502  else
503  {
504  /* Small Resource Type -- bits 6:3 contain the name */
505 
507  }
508 }
#define ACPI_RESOURCE_NAME_SMALL_MASK
Definition: aclocal.h:1303
#define ACPI_RESOURCE_NAME_LARGE
Definition: aclocal.h:1300
#define ACPI_GET8(ptr)
Definition: acmacros.h:57
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
unsigned char UINT8
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN UINT8 * Aml
Definition: acpixf.h:1293

Referenced by AcpiRsConvertAmlToResources(), AcpiRsGetListLength(), and AcpiUtWalkAmlResources().

◆ AcpiUtGetTypeName()

◆ AcpiUtHardwareInitialize()

ACPI_STATUS AcpiUtHardwareInitialize ( void  )

◆ AcpiUtHexToAsciiChar()

char AcpiUtHexToAsciiChar ( UINT64  Integer,