ReactOS 0.4.15-dev-7942-gd23573b
utdecode.c File Reference
#include "acpi.h"
#include "accommon.h"
#include "acnamesp.h"
#include "amlcode.h"
Include dependency graph for utdecode.c:

Go to the source code of this file.

Macros

#define _COMPONENT   ACPI_UTILITIES
 

Functions

const charAcpiUtGetRegionName (UINT8 SpaceId)
 
const charAcpiUtGetEventName (UINT32 EventId)
 
const charAcpiUtGetTypeName (ACPI_OBJECT_TYPE Type)
 
const charAcpiUtGetObjectTypeName (ACPI_OPERAND_OBJECT *ObjDesc)
 
const charAcpiUtGetNodeName (void *Object)
 
const charAcpiUtGetDescriptorName (void *Object)
 
const charAcpiUtGetReferenceName (ACPI_OPERAND_OBJECT *Object)
 
const charAcpiUtGetMutexName (UINT32 MutexId)
 
BOOLEAN AcpiUtValidObjectType (ACPI_OBJECT_TYPE Type)
 

Variables

const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES]
 
const charAcpiGbl_RegionTypes [ACPI_NUM_PREDEFINED_REGIONS]
 
static const charAcpiGbl_EventTypes [ACPI_NUM_FIXED_EVENTS]
 
static const char AcpiGbl_BadType [] = "UNDEFINED"
 
static const charAcpiGbl_NsTypeNames []
 
static const charAcpiGbl_DescTypeNames []
 
static const charAcpiGbl_RefClassNames []
 
static const charAcpiGbl_MutexNames [ACPI_NUM_MUTEX]
 

Macro Definition Documentation

◆ _COMPONENT

#define _COMPONENT   ACPI_UTILITIES

Definition at line 49 of file utdecode.c.

Function Documentation

◆ AcpiUtGetDescriptorName()

const char * AcpiUtGetDescriptorName ( void Object)

Definition at line 382 of file utdecode.c.

384{
385
386 if (!Object)
387 {
388 return ("NULL OBJECT");
389 }
390
392 {
393 return ("Not a Descriptor");
394 }
395
397}
#define ACPI_GET_DESCRIPTOR_TYPE(d)
Definition: acmacros.h:414
#define ACPI_DESC_TYPE_MAX
Definition: acobject.h:578
static const char * AcpiGbl_DescTypeNames[]
Definition: utdecode.c:360
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object

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

◆ AcpiUtGetEventName()

const char * AcpiUtGetEventName ( UINT32  EventId)

Definition at line 175 of file utdecode.c.

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

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

◆ AcpiUtGetMutexName()

const char * AcpiUtGetMutexName ( UINT32  MutexId)

Definition at line 479 of file utdecode.c.

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

Referenced by AcpiUtAcquireMutex(), and AcpiUtReleaseMutex().

◆ AcpiUtGetNodeName()

const char * AcpiUtGetNodeName ( void Object)

Definition at line 306 of file utdecode.c.

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

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().

◆ AcpiUtGetObjectTypeName()

const char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT ObjDesc)

Definition at line 264 of file utdecode.c.

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

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 426 of file utdecode.c.

428{
429
430 if (!Object)
431 {
432 return ("NULL Object");
433 }
434
436 {
437 return ("Not an Operand object");
438 }
439
440 if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE)
441 {
442 return ("Not a Reference object");
443 }
444
445 if (Object->Reference.Class > ACPI_REFCLASS_MAX)
446 {
447 return ("Unknown Reference class");
448 }
449
450 return (AcpiGbl_RefClassNames[Object->Reference.Class]);
451}
@ ACPI_REFCLASS_MAX
Definition: acobject.h:467
#define ACPI_TYPE_LOCAL_REFERENCE
Definition: actypes.h:719
static const char * AcpiGbl_RefClassNames[]
Definition: utdecode.c:414

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

◆ AcpiUtGetRegionName()

const char * AcpiUtGetRegionName ( UINT8  SpaceId)

Definition at line 125 of file utdecode.c.

127{
128
130 {
131 return ("UserDefinedRegion");
132 }
134 {
135 return ("DataTable");
136 }
138 {
139 return ("FunctionalFixedHW");
140 }
142 {
143 return ("InvalidSpaceId");
144 }
145
147}
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx 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:832
#define ACPI_NUM_PREDEFINED_REGIONS
Definition: actypes.h:874
#define ACPI_ADR_SPACE_FIXED_HARDWARE
Definition: actypes.h:885
#define ACPI_ADR_SPACE_DATA_TABLE
Definition: actypes.h:884
#define ACPI_USER_REGION_BEGIN
Definition: acconfig.h:197
const char * AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS]
Definition: utdecode.c:107

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

◆ AcpiUtGetTypeName()

◆ AcpiUtValidObjectType()

BOOLEAN AcpiUtValidObjectType ( ACPI_OBJECT_TYPE  Type)

Definition at line 681 of file utdecode.c.

683{
684
686 {
687 /* Note: Assumes all TYPEs are contiguous (external/local) */
688
689 return (FALSE);
690 }
691
692 return (TRUE);
693}
#define ACPI_TYPE_LOCAL_MAX
Definition: actypes.h:738
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117

Referenced by AcpiDsScopeStackPush(), AcpiExResolveOperands(), and AcpiNsLocal().

Variable Documentation

◆ AcpiGbl_BadType

const char AcpiGbl_BadType[] = "UNDEFINED"
static

Definition at line 209 of file utdecode.c.

Referenced by AcpiUtGetTypeName().

◆ AcpiGbl_DescTypeNames

const char* AcpiGbl_DescTypeNames[]
static
Initial value:
=
{
"Not a Descriptor",
"Cached Object",
"State-Generic",
"State-Update",
"State-Package",
"State-Control",
"State-RootParseScope",
"State-ParseScope",
"State-WalkScope",
"State-Result",
"State-Notify",
"State-Thread",
"Tree Walk State",
"Parse Tree Op",
"Operand Object",
"Namespace Node"
}

Definition at line 360 of file utdecode.c.

Referenced by AcpiUtGetDescriptorName().

◆ AcpiGbl_EventTypes

const char* AcpiGbl_EventTypes[ACPI_NUM_FIXED_EVENTS]
static
Initial value:
=
{
"PM_Timer",
"GlobalLock",
"PowerButton",
"SleepButton",
"RealTimeClock",
}

Definition at line 164 of file utdecode.c.

Referenced by AcpiUtGetEventName().

◆ AcpiGbl_MutexNames

const char* AcpiGbl_MutexNames[ACPI_NUM_MUTEX]
static
Initial value:
=
{
"ACPI_MTX_Interpreter",
"ACPI_MTX_Namespace",
"ACPI_MTX_Tables",
"ACPI_MTX_Events",
"ACPI_MTX_Caches",
"ACPI_MTX_Memory",
}

Definition at line 468 of file utdecode.c.

Referenced by AcpiUtGetMutexName().

◆ AcpiGbl_NsProperties

const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES]

Definition at line 57 of file utdecode.c.

Referenced by AcpiNsLocal(), and AcpiNsOpensScope().

◆ AcpiGbl_NsTypeNames

const char* AcpiGbl_NsTypeNames[]
static

Definition at line 213 of file utdecode.c.

Referenced by AcpiUtGetTypeName().

◆ AcpiGbl_RefClassNames

const char* AcpiGbl_RefClassNames[]
static
Initial value:
=
{
"Local",
"Argument",
"RefOf",
"Index",
"DdbHandle",
"Named Object",
"Debug"
}

Definition at line 414 of file utdecode.c.

Referenced by AcpiUtGetReferenceName().

◆ AcpiGbl_RegionTypes

const char* AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS]
Initial value:
=
{
"SystemMemory",
"SystemIO",
"PCI_Config",
"EmbeddedControl",
"SMBus",
"SystemCMOS",
"PCIBARTarget",
"IPMI",
"GeneralPurposeIo",
"GenericSerialBus",
"PCC",
"PlatformRtMechanism"
}

Definition at line 107 of file utdecode.c.

Referenced by AcpiUtGetRegionName().