summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/exresolv.c
diff options
context:
space:
mode:
authormarks <marks@FreeBSD.org>2004-12-01 23:14:10 +0000
committermarks <marks@FreeBSD.org>2004-12-01 23:14:10 +0000
commit93c2522130390c12e9ae98f3278c17f381a0db90 (patch)
tree4910f03edb15ce309eeb1b58facc922df30dd767 /sys/contrib/dev/acpica/exresolv.c
parentf84f460530aa9bde251160a8ebad4c1048e94251 (diff)
downloadFreeBSD-src-93c2522130390c12e9ae98f3278c17f381a0db90.zip
FreeBSD-src-93c2522130390c12e9ae98f3278c17f381a0db90.tar.gz
Vendor import of Intel ACPI-CA 20041119
Diffstat (limited to 'sys/contrib/dev/acpica/exresolv.c')
-rw-r--r--sys/contrib/dev/acpica/exresolv.c71
1 files changed, 70 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/exresolv.c b/sys/contrib/dev/acpica/exresolv.c
index bc6860e..94d6630 100644
--- a/sys/contrib/dev/acpica/exresolv.c
+++ b/sys/contrib/dev/acpica/exresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresolv - AML Interpreter object resolution
- * $Revision: 124 $
+ * $Revision: 125 $
*
*****************************************************************************/
@@ -412,11 +412,48 @@ AcpiExResolveMultiple (
ACPI_OPERAND_OBJECT *ObjDesc = (void *) Operand;
ACPI_NAMESPACE_NODE *Node;
ACPI_OBJECT_TYPE Type;
+ ACPI_STATUS Status;
ACPI_FUNCTION_TRACE ("AcpiExResolveMultiple");
+
+ /*
+ * Operand can be either a namespace node or an operand descriptor
+ */
+ switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc))
+ {
+ case ACPI_DESC_TYPE_OPERAND:
+ Type = ObjDesc->Common.Type;
+ break;
+
+ case ACPI_DESC_TYPE_NAMED:
+ Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
+ ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
+
+ /* If we had an Alias node, use the attached object for type info */
+
+ if (Type == ACPI_TYPE_LOCAL_ALIAS)
+ {
+ Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
+ ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
+ }
+ break;
+
+ default:
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+
+ /*
+ * If type is anything other than a reference, we are done
+ */
+ if (Type != ACPI_TYPE_LOCAL_REFERENCE)
+ {
+ goto Exit;
+ }
+
/*
* For reference objects created via the RefOf or Index operators,
* we need to get to the base object (as per the ACPI specification
@@ -518,6 +555,38 @@ AcpiExResolveMultiple (
break;
+ case AML_LOCAL_OP:
+ case AML_ARG_OP:
+
+ if (ReturnDesc)
+ {
+ Status = AcpiDsMethodDataGetValue (ObjDesc->Reference.Opcode,
+ ObjDesc->Reference.Offset, WalkState, &ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ AcpiUtRemoveReference (ObjDesc);
+ }
+ else
+ {
+ Status = AcpiDsMethodDataGetNode (ObjDesc->Reference.Opcode,
+ ObjDesc->Reference.Offset, WalkState, &Node);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ Type = ACPI_TYPE_ANY;
+ goto Exit;
+ }
+ }
+ break;
+
+
case AML_DEBUG_OP:
/* The Debug Object is of type "DebugObject" */
OpenPOWER on IntegriCloud