本文整理汇总了C++中AcpiUtGetDescriptorName函数的典型用法代码示例。如果您正苦于以下问题:C++ AcpiUtGetDescriptorName函数的具体用法?C++ AcpiUtGetDescriptorName怎么用?C++ AcpiUtGetDescriptorName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AcpiUtGetDescriptorName函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AcpiUtGetObjectTypeName
const char *
AcpiUtGetObjectTypeName (
ACPI_OPERAND_OBJECT *ObjDesc)
{
ACPI_FUNCTION_TRACE (UtGetObjectTypeName);
if (!ObjDesc)
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
return_STR ("[NULL Object Descriptor]");
}
/* These descriptor types share a common area */
if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) &&
(ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_NAMED))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Invalid object descriptor type: 0x%2.2X [%s] (%p)\n",
ACPI_GET_DESCRIPTOR_TYPE (ObjDesc),
AcpiUtGetDescriptorName (ObjDesc), ObjDesc));
return_STR ("Invalid object");
}
return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type));
}
示例2: AcpiDbDecodeInternalObject
void
AcpiDbDecodeInternalObject (
ACPI_OPERAND_OBJECT *ObjDesc)
{
UINT32 i;
if (!ObjDesc)
{
AcpiOsPrintf (" Uninitialized");
return;
}
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
{
AcpiOsPrintf (" %p [%s]", ObjDesc,
AcpiUtGetDescriptorName (ObjDesc));
return;
}
AcpiOsPrintf (" %s", AcpiUtGetObjectTypeName (ObjDesc));
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_INTEGER:
AcpiOsPrintf (" %8.8X%8.8X",
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
AcpiOsPrintf ("(%u) \"%.24s",
ObjDesc->String.Length, ObjDesc->String.Pointer);
if (ObjDesc->String.Length > 24)
{
AcpiOsPrintf ("...");
}
else
{
AcpiOsPrintf ("\"");
}
break;
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("(%u)", ObjDesc->Buffer.Length);
for (i = 0; (i < 8) && (i < ObjDesc->Buffer.Length); i++)
{
AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
}
break;
default:
AcpiOsPrintf (" %p", ObjDesc);
break;
}
}
示例3: AcpiDbConvertToNode
ACPI_NAMESPACE_NODE *
AcpiDbConvertToNode (
char *InString)
{
ACPI_NAMESPACE_NODE *Node;
ACPI_SIZE Address;
if ((*InString >= 0x30) && (*InString <= 0x39))
{
/* Numeric argument, convert */
Address = strtoul (InString, NULL, 16);
Node = ACPI_TO_POINTER (Address);
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
{
AcpiOsPrintf ("Address %p is invalid",
Node);
return (NULL);
}
/* Make sure pointer is valid NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
AcpiOsPrintf ("Address %p is not a valid namespace node [%s]\n",
Node, AcpiUtGetDescriptorName (Node));
return (NULL);
}
}
else
{
/*
* Alpha argument: The parameter is a name string that must be
* resolved to a Namespace object.
*/
Node = AcpiDbLocalNsLookup (InString);
if (!Node)
{
AcpiOsPrintf (
"Could not find [%s] in namespace, defaulting to root node\n",
InString);
Node = AcpiGbl_RootNode;
}
}
return (Node);
}
示例4: AcpiDbConvertToNode
ACPI_NAMESPACE_NODE *
AcpiDbConvertToNode (
char *InString)
{
ACPI_NAMESPACE_NODE *Node;
if ((*InString >= 0x30) && (*InString <= 0x39))
{
/* Numeric argument, convert */
Node = ACPI_TO_POINTER (ACPI_STRTOUL (InString, NULL, 16));
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
{
AcpiOsPrintf ("Address %p is invalid in this address space\n",
Node);
return (NULL);
}
/* Make sure pointer is valid NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
AcpiOsPrintf ("Address %p is not a valid NS node [%s]\n",
Node, AcpiUtGetDescriptorName (Node));
return (NULL);
}
}
else
{
/* Alpha argument */
/* The parameter is a name string that must be resolved to a
* Named obj
*/
Node = AcpiDbLocalNsLookup (InString);
if (!Node)
{
Node = AcpiGbl_RootNode;
}
}
return (Node);
}
示例5: AcpiUtDeleteObjectDesc
void
AcpiUtDeleteObjectDesc (
ACPI_OPERAND_OBJECT *Object)
{
ACPI_FUNCTION_TRACE_PTR (UtDeleteObjectDesc, Object);
/* Object must be of type ACPI_OPERAND_OBJECT */
if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
{
ACPI_ERROR ((AE_INFO,
"%p is not an ACPI Operand object [%s]", Object,
AcpiUtGetDescriptorName (Object)));
return_VOID;
}
(void) AcpiOsReleaseObject (AcpiGbl_OperandCache, Object);
return_VOID;
}
示例6: AcpiDsInitBufferField
static ACPI_STATUS
AcpiDsInitBufferField (
UINT16 AmlOpcode,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT *BufferDesc,
ACPI_OPERAND_OBJECT *OffsetDesc,
ACPI_OPERAND_OBJECT *LengthDesc,
ACPI_OPERAND_OBJECT *ResultDesc)
{
UINT32 Offset;
UINT32 BitOffset;
UINT32 BitCount;
UINT8 FieldFlags;
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE_PTR (DsInitBufferField, ObjDesc);
/* Host object must be a Buffer */
if (BufferDesc->Common.Type != ACPI_TYPE_BUFFER)
{
ACPI_ERROR ((AE_INFO,
"Target of Create Field is not a Buffer object - %s",
AcpiUtGetObjectTypeName (BufferDesc)));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
/*
* The last parameter to all of these opcodes (ResultDesc) started
* out as a NameString, and should therefore now be a NS node
* after resolution in AcpiExResolveOperands().
*/
if (ACPI_GET_DESCRIPTOR_TYPE (ResultDesc) != ACPI_DESC_TYPE_NAMED)
{
ACPI_ERROR ((AE_INFO,
"(%s) destination not a NS Node [%s]",
AcpiPsGetOpcodeName (AmlOpcode),
AcpiUtGetDescriptorName (ResultDesc)));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
Offset = (UINT32) OffsetDesc->Integer.Value;
/*
* Setup the Bit offsets and counts, according to the opcode
*/
switch (AmlOpcode)
{
case AML_CREATE_FIELD_OP:
/* Offset is in bits, count is in bits */
FieldFlags = AML_FIELD_ACCESS_BYTE;
BitOffset = Offset;
BitCount = (UINT32) LengthDesc->Integer.Value;
/* Must have a valid (>0) bit count */
if (BitCount == 0)
{
ACPI_ERROR ((AE_INFO,
"Attempt to CreateField of length zero"));
Status = AE_AML_OPERAND_VALUE;
goto Cleanup;
}
break;
case AML_CREATE_BIT_FIELD_OP:
/* Offset is in bits, Field is one bit */
BitOffset = Offset;
BitCount = 1;
FieldFlags = AML_FIELD_ACCESS_BYTE;
break;
case AML_CREATE_BYTE_FIELD_OP:
/* Offset is in bytes, field is one byte */
BitOffset = 8 * Offset;
BitCount = 8;
FieldFlags = AML_FIELD_ACCESS_BYTE;
break;
case AML_CREATE_WORD_FIELD_OP:
/* Offset is in bytes, field is one word */
BitOffset = 8 * Offset;
BitCount = 16;
FieldFlags = AML_FIELD_ACCESS_WORD;
break;
//.........这里部分代码省略.........
示例7: AcpiDbIntegrityWalk
static ACPI_STATUS
AcpiDbIntegrityWalk (
ACPI_HANDLE ObjHandle,
UINT32 NestingLevel,
void *Context,
void **ReturnValue)
{
ACPI_INTEGRITY_INFO *Info = (ACPI_INTEGRITY_INFO *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
ACPI_OPERAND_OBJECT *Object;
BOOLEAN Alias = TRUE;
Info->Nodes++;
/* Verify the NS node, and dereference aliases */
while (Alias)
{
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s] - is %2.2X should be %2.2X\n",
Node, AcpiUtGetDescriptorName (Node), ACPI_GET_DESCRIPTOR_TYPE (Node),
ACPI_DESC_TYPE_NAMED);
return (AE_OK);
}
if ((Node->Type == ACPI_TYPE_LOCAL_ALIAS) ||
(Node->Type == ACPI_TYPE_LOCAL_METHOD_ALIAS))
{
Node = (ACPI_NAMESPACE_NODE *) Node->Object;
}
else
{
Alias = FALSE;
}
}
if (Node->Type > ACPI_TYPE_LOCAL_MAX)
{
AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n",
Node, Node->Type);
return (AE_OK);
}
if (!AcpiUtValidAcpiName (Node->Name.Ascii))
{
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
return (AE_OK);
}
Object = AcpiNsGetAttachedObject (Node);
if (Object)
{
Info->Objects++;
if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
{
AcpiOsPrintf ("Invalid Descriptor Type for Object %p [%s]\n",
Object, AcpiUtGetDescriptorName (Object));
}
}
return (AE_OK);
}
示例8: AcpiUtDumpAllocations
void
AcpiUtDumpAllocations (
UINT32 Component,
const char *Module)
{
ACPI_DEBUG_MEM_BLOCK *Element;
ACPI_DESCRIPTOR *Descriptor;
UINT32 NumOutstanding = 0;
UINT8 DescriptorType;
ACPI_FUNCTION_TRACE (UtDumpAllocations);
/*
* Walk the allocation list.
*/
if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_MEMORY)))
{
return;
}
Element = AcpiGbl_GlobalList->ListHead;
while (Element)
{
if ((Element->Component & Component) &&
((Module == NULL) || (0 == ACPI_STRCMP (Module, Element->Module))))
{
Descriptor = ACPI_CAST_PTR (ACPI_DESCRIPTOR, &Element->UserSpace);
if (Element->Size < sizeof (ACPI_COMMON_DESCRIPTOR))
{
AcpiOsPrintf ("%p Length 0x%04X %9.9s-%d "
"[Not a Descriptor - too small]\n",
Descriptor, Element->Size, Element->Module,
Element->Line);
}
else
{
/* Ignore allocated objects that are in a cache */
if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) != ACPI_DESC_TYPE_CACHED)
{
AcpiOsPrintf ("%p Length 0x%04X %9.9s-%d [%s] ",
Descriptor, Element->Size, Element->Module,
Element->Line, AcpiUtGetDescriptorName (Descriptor));
/* Validate the descriptor type using Type field and length */
DescriptorType = 0; /* Not a valid descriptor type */
switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
{
case ACPI_DESC_TYPE_OPERAND:
if (Element->Size == sizeof (ACPI_DESC_TYPE_OPERAND))
{
DescriptorType = ACPI_DESC_TYPE_OPERAND;
}
break;
case ACPI_DESC_TYPE_PARSER:
if (Element->Size == sizeof (ACPI_DESC_TYPE_PARSER))
{
DescriptorType = ACPI_DESC_TYPE_PARSER;
}
break;
case ACPI_DESC_TYPE_NAMED:
if (Element->Size == sizeof (ACPI_DESC_TYPE_NAMED))
{
DescriptorType = ACPI_DESC_TYPE_NAMED;
}
break;
default:
break;
}
/* Display additional info for the major descriptor types */
switch (DescriptorType)
{
case ACPI_DESC_TYPE_OPERAND:
AcpiOsPrintf ("%12.12s RefCount 0x%04X\n",
AcpiUtGetTypeName (Descriptor->Object.Common.Type),
Descriptor->Object.Common.ReferenceCount);
break;
case ACPI_DESC_TYPE_PARSER:
AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
Descriptor->Op.Asl.AmlOpcode);
break;
case ACPI_DESC_TYPE_NAMED:
AcpiOsPrintf ("%4.4s\n",
AcpiUtGetNodeName (&Descriptor->Node));
break;
default:
AcpiOsPrintf ( "\n");
//.........这里部分代码省略.........
示例9: AcpiNsLookup
ACPI_STATUS
AcpiNsLookup (
ACPI_GENERIC_STATE *ScopeInfo,
char *Pathname,
ACPI_OBJECT_TYPE Type,
ACPI_INTERPRETER_MODE InterpreterMode,
UINT32 Flags,
ACPI_WALK_STATE *WalkState,
ACPI_NAMESPACE_NODE **ReturnNode)
{
ACPI_STATUS Status;
char *Path = Pathname;
ACPI_NAMESPACE_NODE *PrefixNode;
ACPI_NAMESPACE_NODE *CurrentNode = NULL;
ACPI_NAMESPACE_NODE *ThisNode = NULL;
UINT32 NumSegments;
UINT32 NumCarats;
ACPI_NAME SimpleName;
ACPI_OBJECT_TYPE TypeToCheckFor;
ACPI_OBJECT_TYPE ThisSearchType;
UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT;
UINT32 LocalFlags;
ACPI_FUNCTION_TRACE (NsLookup);
if (!ReturnNode)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
LocalFlags = Flags &
~(ACPI_NS_ERROR_IF_FOUND | ACPI_NS_OVERRIDE_IF_FOUND |
ACPI_NS_SEARCH_PARENT);
*ReturnNode = ACPI_ENTRY_NOT_FOUND;
AcpiGbl_NsLookupCount++;
if (!AcpiGbl_RootNode)
{
return_ACPI_STATUS (AE_NO_NAMESPACE);
}
/* Get the prefix scope. A null scope means use the root scope */
if ((!ScopeInfo) ||
(!ScopeInfo->Scope.Node))
{
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Null scope prefix, using root node (%p)\n",
AcpiGbl_RootNode));
PrefixNode = AcpiGbl_RootNode;
}
else
{
PrefixNode = ScopeInfo->Scope.Node;
if (ACPI_GET_DESCRIPTOR_TYPE (PrefixNode) != ACPI_DESC_TYPE_NAMED)
{
ACPI_ERROR ((AE_INFO, "%p is not a namespace node [%s]",
PrefixNode, AcpiUtGetDescriptorName (PrefixNode)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
if (!(Flags & ACPI_NS_PREFIX_IS_SCOPE))
{
/*
* This node might not be a actual "scope" node (such as a
* Device/Method, etc.) It could be a Package or other object
* node. Backup up the tree to find the containing scope node.
*/
while (!AcpiNsOpensScope (PrefixNode->Type) &&
PrefixNode->Type != ACPI_TYPE_ANY)
{
PrefixNode = PrefixNode->Parent;
}
}
}
/* Save type. TBD: may be no longer necessary */
TypeToCheckFor = Type;
/*
* Begin examination of the actual pathname
*/
if (!Pathname)
{
/* A Null NamePath is allowed and refers to the root */
NumSegments = 0;
ThisNode = AcpiGbl_RootNode;
Path = "";
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Null Pathname (Zero segments), Flags=%X\n", Flags));
}
else
{
/*
//.........这里部分代码省略.........
示例10: AcpiDbDisplayInternalObject
//.........这里部分代码省略.........
[ObjDesc->Reference.Value].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDbDecodeInternalObject (ObjDesc);
}
break;
case ACPI_REFCLASS_INDEX:
switch (ObjDesc->Reference.TargetType)
{
case ACPI_TYPE_BUFFER_FIELD:
AcpiOsPrintf ("%p", ObjDesc->Reference.Object);
AcpiDbDecodeInternalObject (ObjDesc->Reference.Object);
break;
case ACPI_TYPE_PACKAGE:
AcpiOsPrintf ("%p", ObjDesc->Reference.Where);
if (!ObjDesc->Reference.Where)
{
AcpiOsPrintf (" Uninitialized WHERE pointer");
}
else
{
AcpiDbDecodeInternalObject (
*(ObjDesc->Reference.Where));
}
break;
default:
AcpiOsPrintf ("Unknown index target type");
break;
}
break;
case ACPI_REFCLASS_REFOF:
if (!ObjDesc->Reference.Object)
{
AcpiOsPrintf (
"Uninitialized reference subobject pointer");
break;
}
/* Reference can be to a Node or an Operand object */
switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc->Reference.Object))
{
case ACPI_DESC_TYPE_NAMED:
AcpiDbDecodeNode (ObjDesc->Reference.Object);
break;
case ACPI_DESC_TYPE_OPERAND:
AcpiDbDecodeInternalObject (ObjDesc->Reference.Object);
break;
default:
break;
}
break;
case ACPI_REFCLASS_NAME:
AcpiDbDecodeNode (ObjDesc->Reference.Node);
break;
case ACPI_REFCLASS_DEBUG:
case ACPI_REFCLASS_TABLE:
AcpiOsPrintf ("\n");
break;
default: /* Unknown reference class */
AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
break;
}
break;
default:
AcpiOsPrintf ("<Obj> ");
AcpiDbDecodeInternalObject (ObjDesc);
break;
}
break;
default:
AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> [%s]",
AcpiUtGetDescriptorName (ObjDesc));
break;
}
AcpiOsPrintf ("\n");
}
示例11: AcpiNsAttachObject
ACPI_STATUS
AcpiNsAttachObject (
ACPI_NAMESPACE_NODE *Node,
ACPI_OPERAND_OBJECT *Object,
ACPI_OBJECT_TYPE Type)
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_OPERAND_OBJECT *LastObjDesc;
ACPI_OBJECT_TYPE ObjectType = ACPI_TYPE_ANY;
ACPI_FUNCTION_TRACE (NsAttachObject);
/*
* Parameter validation
*/
if (!Node)
{
/* Invalid handle */
ACPI_ERROR ((AE_INFO, "Null NamedObj handle"));
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
if (!Object && (ACPI_TYPE_ANY != Type))
{
/* Null object */
ACPI_ERROR ((AE_INFO,
"Null object, but type not ACPI_TYPE_ANY"));
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
/* Not a name handle */
ACPI_ERROR ((AE_INFO, "Invalid handle %p [%s]",
Node, AcpiUtGetDescriptorName (Node)));
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Check if this object is already attached */
if (Node->Object == Object)
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Obj %p already installed in NameObj %p\n",
Object, Node));
return_ACPI_STATUS (AE_OK);
}
/* If null object, we will just install it */
if (!Object)
{
ObjDesc = NULL;
ObjectType = ACPI_TYPE_ANY;
}
/*
* If the source object is a namespace Node with an attached object,
* we will use that (attached) object
*/
else if ((ACPI_GET_DESCRIPTOR_TYPE (Object) == ACPI_DESC_TYPE_NAMED) &&
((ACPI_NAMESPACE_NODE *) Object)->Object)
{
/*
* Value passed is a name handle and that name has a
* non-null value. Use that name's value and type.
*/
ObjDesc = ((ACPI_NAMESPACE_NODE *) Object)->Object;
ObjectType = ((ACPI_NAMESPACE_NODE *) Object)->Type;
}
/*
* Otherwise, we will use the parameter object, but we must type
* it first
*/
else
{
ObjDesc = (ACPI_OPERAND_OBJECT *) Object;
/* Use the given type */
ObjectType = Type;
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Installing %p into Node %p [%4.4s]\n",
ObjDesc, Node, AcpiUtGetNodeName (Node)));
/* Detach an existing attached object if present */
if (Node->Object)
{
AcpiNsDetachObject (Node);
}
//.........这里部分代码省略.........
示例12: AcpiExResolveOperands
//.........这里部分代码省略.........
/*lint -fallthrough */
case ACPI_REFCLASS_ARG:
case ACPI_REFCLASS_LOCAL:
case ACPI_REFCLASS_INDEX:
case ACPI_REFCLASS_REFOF:
case ACPI_REFCLASS_TABLE: /* DdbHandle from LOAD_OP or LOAD_TABLE_OP */
case ACPI_REFCLASS_NAME: /* Reference to a named object */
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Operand is a Reference, Class [%s] %2.2X\n",
AcpiUtGetReferenceName (ObjDesc),
ObjDesc->Reference.Class));
break;
default:
ACPI_ERROR ((AE_INFO,
"Unknown Reference Class 0x%2.2X in %p",
ObjDesc->Reference.Class, ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
}
break;
default:
/* Invalid descriptor */
ACPI_ERROR ((AE_INFO, "Invalid descriptor %p [%s]",
ObjDesc, AcpiUtGetDescriptorName (ObjDesc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/* Get one argument type, point to the next */
ThisArgType = GET_CURRENT_ARG_TYPE (ArgTypes);
INCREMENT_ARG_LIST (ArgTypes);
/*
* Handle cases where the object does not need to be
* resolved to a value
*/
switch (ThisArgType)
{
case ARGI_REF_OR_STRING: /* Can be a String or Reference */
if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND) &&
(ObjDesc->Common.Type == ACPI_TYPE_STRING))
{
/*
* String found - the string references a named object and
* must be resolved to a node
*/
goto NextOperand;
}
/*
* Else not a string - fall through to the normal Reference
* case below
*/
/*lint -fallthrough */
示例13: AcpiUtDumpAllocations
void
AcpiUtDumpAllocations (
UINT32 Component,
const char *Module)
{
ACPI_DEBUG_MEM_BLOCK *Element;
ACPI_DESCRIPTOR *Descriptor;
UINT32 NumOutstanding = 0;
ACPI_FUNCTION_TRACE (UtDumpAllocations);
/*
* Walk the allocation list.
*/
if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_MEMORY)))
{
return;
}
Element = AcpiGbl_GlobalList->ListHead;
while (Element)
{
if ((Element->Component & Component) &&
((Module == NULL) || (0 == ACPI_STRCMP (Module, Element->Module))))
{
/* Ignore allocated objects that are in a cache */
Descriptor = ACPI_CAST_PTR (ACPI_DESCRIPTOR, &Element->UserSpace);
if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) != ACPI_DESC_TYPE_CACHED)
{
AcpiOsPrintf ("%p Len %04X %9.9s-%d [%s] ",
Descriptor, Element->Size, Element->Module,
Element->Line, AcpiUtGetDescriptorName (Descriptor));
/* Most of the elements will be Operand objects. */
switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
{
case ACPI_DESC_TYPE_OPERAND:
AcpiOsPrintf ("%12.12s R%hd",
AcpiUtGetTypeName (Descriptor->Object.Common.Type),
Descriptor->Object.Common.ReferenceCount);
break;
case ACPI_DESC_TYPE_PARSER:
AcpiOsPrintf ("AmlOpcode %04hX",
Descriptor->Op.Asl.AmlOpcode);
break;
case ACPI_DESC_TYPE_NAMED:
AcpiOsPrintf ("%4.4s",
AcpiUtGetNodeName (&Descriptor->Node));
break;
default:
break;
}
AcpiOsPrintf ( "\n");
NumOutstanding++;
}
}
Element = Element->Next;
}
(void) AcpiUtReleaseMutex (ACPI_MTX_MEMORY);
/* Print summary */
if (!NumOutstanding)
{
ACPI_INFO ((AE_INFO,
"No outstanding allocations"));
}
else
{
ACPI_ERROR ((AE_INFO,
"%d(%X) Outstanding allocations",
NumOutstanding, NumOutstanding));
}
return_VOID;
}
示例14: AcpiDmDisplayInternalObject
//.........这里部分代码省略.........
break;
case AML_DEBUG_OP:
AcpiOsPrintf ("[Debug] ");
break;
case AML_INDEX_OP:
AcpiOsPrintf ("[Index] ");
switch (ObjDesc->Reference.TargetType)
{
case ACPI_TYPE_BUFFER_FIELD:
AcpiOsPrintf ("%p", ObjDesc->Reference.Object);
AcpiDmDecodeInternalObject (ObjDesc->Reference.Object);
break;
case ACPI_TYPE_PACKAGE:
AcpiOsPrintf ("%p", ObjDesc->Reference.Where);
if (!ObjDesc->Reference.Where)
{
AcpiOsPrintf (" Uninitialized WHERE ptr");
}
else
{
AcpiDmDecodeInternalObject (*(ObjDesc->Reference.Where));
}
break;
default:
AcpiOsPrintf ("Unknown index target type");
break;
}
break;
case AML_LOAD_OP:
AcpiOsPrintf ("[DdbHandle] ");
break;
case AML_REF_OF_OP:
AcpiOsPrintf ("[RefOf] ");
if (!ObjDesc->Reference.Object)
{
AcpiOsPrintf ("Uninitialized reference subobject ptr");
break;
}
/* Reference can be to a Node or an Operand object */
switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc->Reference.Object))
{
case ACPI_DESC_TYPE_NAMED:
AcpiDmDecodeNode (ObjDesc->Reference.Object);
break;
case ACPI_DESC_TYPE_OPERAND:
AcpiDmDecodeInternalObject (ObjDesc->Reference.Object);
break;
default:
break;
}
break;
default:
AcpiOsPrintf ("Unknown Reference opcode %X (%s)\n",
ObjDesc->Reference.Opcode,
AcpiPsGetOpcodeName (ObjDesc->Reference.Opcode));
break;
}
break;
default:
AcpiOsPrintf ("<Obj> ");
AcpiDmDecodeInternalObject (ObjDesc);
break;
}
break;
default:
AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> [%s]",
AcpiUtGetDescriptorName (ObjDesc));
break;
}
AcpiOsPrintf ("\n");
}