diff options
Diffstat (limited to 'source/components/executer')
| -rw-r--r-- | source/components/executer/excreate.c | 55 | ||||
| -rw-r--r-- | source/components/executer/exdump.c | 41 | ||||
| -rw-r--r-- | source/components/executer/exmisc.c | 9 | ||||
| -rw-r--r-- | source/components/executer/exoparg2.c | 2 |
4 files changed, 56 insertions, 51 deletions
diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c index 15b38574a1daf..a2cce00ac8f46 100644 --- a/source/components/executer/excreate.c +++ b/source/components/executer/excreate.c @@ -204,70 +204,39 @@ AcpiExCreateAlias ( } /* Ensure that the target node is valid */ + if (!TargetNode) { return_ACPI_STATUS (AE_NULL_OBJECT); } - /* - * For objects that can never change (i.e., the NS node will - * permanently point to the same object), we can simply attach - * the object to the new NS node. For other objects (such as - * Integers, buffers, etc.), we have to point the Alias node - * to the original Node. - */ + /* Construct the alias object (a namespace node) */ + switch (TargetNode->Type) { - - /* For these types, the sub-object can change dynamically via a Store */ - - case ACPI_TYPE_INTEGER: - case ACPI_TYPE_STRING: - case ACPI_TYPE_BUFFER: - case ACPI_TYPE_PACKAGE: - case ACPI_TYPE_BUFFER_FIELD: - /* - * These types open a new scope, so we need the NS node in order to access - * any children. - */ - case ACPI_TYPE_DEVICE: - case ACPI_TYPE_POWER: - case ACPI_TYPE_PROCESSOR: - case ACPI_TYPE_THERMAL: - case ACPI_TYPE_LOCAL_SCOPE: - /* - * The new alias has the type ALIAS and points to the original - * NS node, not the object itself. - */ - AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS; - AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); - break; - case ACPI_TYPE_METHOD: /* - * Control method aliases need to be differentiated + * Control method aliases need to be differentiated with + * a special type */ AliasNode->Type = ACPI_TYPE_LOCAL_METHOD_ALIAS; - AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); break; default: - - /* Attach the original source object to the new Alias Node */ - /* - * The new alias assumes the type of the target, and it points - * to the same object. The reference count of the object has an - * additional reference to prevent deletion out from under either the - * target node or the alias Node + * All other object types. + * + * The new alias has the type ALIAS and points to the original + * NS node, not the object itself. */ - Status = AcpiNsAttachObject (AliasNode, - AcpiNsGetAttachedObject (TargetNode), TargetNode->Type); + AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS; + AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); break; } /* Since both operands are Nodes, we don't need to delete them */ + AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode); return_ACPI_STATUS (Status); } diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c index 2b23881f16cd6..c1069b2c9f5dc 100644 --- a/source/components/executer/exdump.c +++ b/source/components/executer/exdump.c @@ -229,7 +229,7 @@ static ACPI_EXDUMP_INFO AcpiExDumpPackage[6] = {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPackage), NULL}, {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Package.Node), "Parent Node"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Package.Flags), "Flags"}, - {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Package.Count), "Elements"}, + {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Package.Count), "Element Count"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Package.Elements), "Element List"}, {ACPI_EXD_PACKAGE, 0, NULL} }; @@ -510,6 +510,11 @@ AcpiExDumpObject ( while (Count) { + if (!ObjDesc) + { + return; + } + Target = ACPI_ADD_PTR (UINT8, ObjDesc, Info->Offset); Name = Info->Name; @@ -522,7 +527,8 @@ AcpiExDumpObject ( case ACPI_EXD_TYPE: AcpiOsPrintf ("%20s : %2.2X [%s]\n", "Type", - ObjDesc->Common.Type, AcpiUtGetObjectTypeName (ObjDesc)); + ObjDesc->Common.Type, + AcpiUtGetObjectTypeName (ObjDesc)); break; case ACPI_EXD_UINT8: @@ -588,10 +594,10 @@ AcpiExDumpObject ( Start = *ACPI_CAST_PTR (void *, Target); Next = Start; - AcpiOsPrintf ("%20s : %p", Name, Next); + AcpiOsPrintf ("%20s : %p ", Name, Next); if (Next) { - AcpiOsPrintf ("(%s %2.2X)", + AcpiOsPrintf ("%s (Type %2.2X)", AcpiUtGetObjectTypeName (Next), Next->Common.Type); while (Next->Common.NextObject) @@ -614,6 +620,10 @@ AcpiExDumpObject ( } } } + else + { + AcpiOsPrintf ("- No attached objects"); + } AcpiOsPrintf ("\n"); break; @@ -1294,7 +1304,8 @@ AcpiExDumpPackageObj ( default: - AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type); + AcpiOsPrintf ("[%s] Type: %2.2X\n", + AcpiUtGetTypeName (ObjDesc->Common.Type), ObjDesc->Common.Type); break; } } @@ -1338,10 +1349,19 @@ AcpiExDumpObjectDescriptor ( { AcpiExDumpNamespaceNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags); - AcpiOsPrintf ("\nAttached Object (%p):\n", - ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object); - ObjDesc = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object; + if (!ObjDesc) + { + return_VOID; + } + + AcpiOsPrintf ("\nAttached Object %p", ObjDesc); + if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED) + { + AcpiOsPrintf (" - Namespace Node"); + } + + AcpiOsPrintf (":\n"); goto DumpObject; } @@ -1365,6 +1385,11 @@ AcpiExDumpObjectDescriptor ( DumpObject: + if (!ObjDesc) + { + return_VOID; + } + /* Common Fields */ AcpiExDumpObject (ObjDesc, AcpiExDumpCommon); diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c index b1fc02d2ab795..dfa4421ac773f 100644 --- a/source/components/executer/exmisc.c +++ b/source/components/executer/exmisc.c @@ -401,6 +401,8 @@ AcpiExDoLogicalNumericOp ( default: + ACPI_ERROR ((AE_INFO, + "Invalid numeric logical opcode: %X", Opcode)); Status = AE_AML_INTERNAL; break; } @@ -486,6 +488,9 @@ AcpiExDoLogicalOp ( default: + ACPI_ERROR ((AE_INFO, + "Invalid object type for logical operator: %X", + Operand0->Common.Type)); Status = AE_AML_INTERNAL; break; } @@ -535,6 +540,8 @@ AcpiExDoLogicalOp ( default: + ACPI_ERROR ((AE_INFO, + "Invalid comparison opcode: %X", Opcode)); Status = AE_AML_INTERNAL; break; } @@ -613,6 +620,8 @@ AcpiExDoLogicalOp ( default: + ACPI_ERROR ((AE_INFO, + "Invalid comparison opcode: %X", Opcode)); Status = AE_AML_INTERNAL; break; } diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c index 3ce965a6db4f1..f4bf9c17d70d5 100644 --- a/source/components/executer/exoparg2.c +++ b/source/components/executer/exoparg2.c @@ -556,6 +556,8 @@ AcpiExOpcode_2A_1T_1R ( default: + ACPI_ERROR ((AE_INFO, + "Invalid object type: %X", (Operand[0])->Common.Type)); Status = AE_AML_INTERNAL; goto Cleanup; } |
