summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
diff options
context:
space:
mode:
authorDana Myers <Dana.Myers@Sun.COM>2009-06-26 17:26:34 -0700
committerDana Myers <Dana.Myers@Sun.COM>2009-06-26 17:26:34 -0700
commitaa2aa9a662539940ddbc8610da5a3a874ebd7503 (patch)
treed2dd92b7b5a29e1dda236a25c20d249a78c49d7c /usr/src/uts/intel/io/acpica/namespace/nsaccess.c
parent4cc341244283c4f742842066f99a49422ca19bbd (diff)
downloadillumos-joyent-aa2aa9a662539940ddbc8610da5a3a874ebd7503.tar.gz
6836969 acpica: update to Intel ACPI CA 20090521
6387741 process_master_file() causes kmem panics given a bogus master file 6837274 acpica: acpi_enum.c creates non-IEEE-1275 'compatible' properties
Diffstat (limited to 'usr/src/uts/intel/io/acpica/namespace/nsaccess.c')
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsaccess.c67
1 files changed, 33 insertions, 34 deletions
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsaccess.c b/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
index 810819d145..172b26d3ab 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
@@ -1,7 +1,6 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 1.209 $
*
******************************************************************************/
@@ -9,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,6 +116,7 @@
#define __NSACCESS_C__
#include "acpi.h"
+#include "accommon.h"
#include "amlcode.h"
#include "acnamesp.h"
#include "acdispat.h"
@@ -202,9 +202,8 @@ AcpiNsRootInitialize (
}
/*
- * Name entered successfully.
- * If entry in PreDefinedNames[] specifies an
- * initial value, create the initial value.
+ * Name entered successfully. If entry in PreDefinedNames[] specifies
+ * an initial value, create the initial value.
*/
if (InitVal->Val)
{
@@ -252,11 +251,8 @@ AcpiNsRootInitialize (
/* Mark this as a very SPECIAL method */
ObjDesc->Method.MethodFlags = AML_METHOD_INTERNAL_ONLY;
-
-#ifndef ACPI_DUMP_APP
ObjDesc->Method.Implementation = AcpiUtOsiImplementation;
#endif
-#endif
break;
case ACPI_TYPE_INTEGER:
@@ -267,9 +263,8 @@ AcpiNsRootInitialize (
case ACPI_TYPE_STRING:
- /*
- * Build an object around the static string
- */
+ /* Build an object around the static string */
+
ObjDesc->String.Length = (UINT32) ACPI_STRLEN (Val);
ObjDesc->String.Pointer = Val;
ObjDesc->Common.Flags |= AOPOBJ_STATIC_POINTER;
@@ -321,7 +316,7 @@ AcpiNsRootInitialize (
/* Store pointer to value descriptor in the Node */
Status = AcpiNsAttachObject (NewNode, ObjDesc,
- ACPI_GET_OBJECT_TYPE (ObjDesc));
+ ObjDesc->Common.Type);
/* Remove local reference to the object */
@@ -409,10 +404,8 @@ AcpiNsLookup (
return_ACPI_STATUS (AE_NO_NAMESPACE);
}
- /*
- * Get the prefix scope.
- * A null scope means use the root scope
- */
+ /* Get the prefix scope. A null scope means use the root scope */
+
if ((!ScopeInfo) ||
(!ScopeInfo->Scope.Node))
{
@@ -436,8 +429,8 @@ AcpiNsLookup (
{
/*
* 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.
+ * 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)
@@ -447,7 +440,7 @@ AcpiNsLookup (
}
}
- /* Save type TBD: may be no longer necessary */
+ /* Save type. TBD: may be no longer necessary */
TypeToCheckFor = Type;
@@ -513,6 +506,7 @@ AcpiNsLookup (
/* Name is fully qualified, no search rules apply */
SearchParentFlag = ACPI_NS_NO_UPSEARCH;
+
/*
* Point past this prefix to the name segment
* part or the next Parent Prefix
@@ -528,7 +522,8 @@ AcpiNsLookup (
/* Current scope has no parent scope */
ACPI_ERROR ((AE_INFO,
- "ACPI path has too many parent prefixes (^) - reached beyond root node"));
+ "ACPI path has too many parent prefixes (^) "
+ "- reached beyond root node"));
return_ACPI_STATUS (AE_NOT_FOUND);
}
}
@@ -618,11 +613,11 @@ AcpiNsLookup (
/*
- * Search namespace for each segment of the name. Loop through and
+ * Search namespace for each segment of the name. Loop through and
* verify (or add to the namespace) each name segment.
*
* The object type is significant only at the last name
- * segment. (We don't care about the types along the path, only
+ * segment. (We don't care about the types along the path, only
* the type of the final target object.)
*/
ThisSearchType = ACPI_TYPE_ANY;
@@ -632,9 +627,8 @@ AcpiNsLookup (
NumSegments--;
if (!NumSegments)
{
- /*
- * This is the last segment, enable typechecking
- */
+ /* This is the last segment, enable typechecking */
+
ThisSearchType = Type;
/*
@@ -685,13 +679,19 @@ AcpiNsLookup (
{
/*
* If we have an alias to an object that opens a scope (such as a
- * device or processor), we need to dereference the alias here so that
- * we can access any children of the original node (via the remaining
- * segments).
+ * device or processor), we need to dereference the alias here so
+ * that we can access any children of the original node (via the
+ * remaining segments).
*/
if (ThisNode->Type == ACPI_TYPE_LOCAL_ALIAS)
{
- if (AcpiNsOpensScope (((ACPI_NAMESPACE_NODE *) ThisNode->Object)->Type))
+ if (!ThisNode->Object)
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ if (AcpiNsOpensScope (((ACPI_NAMESPACE_NODE *)
+ ThisNode->Object)->Type))
{
ThisNode = (ACPI_NAMESPACE_NODE *) ThisNode->Object;
}
@@ -733,8 +733,8 @@ AcpiNsLookup (
/*
* If this is the last name segment and we are not looking for a
- * specific type, but the type of found object is known, use that type
- * to (later) see if it opens a scope.
+ * specific type, but the type of found object is known, use that
+ * type to (later) see if it opens a scope.
*/
if (Type == ACPI_TYPE_ANY)
{
@@ -748,9 +748,8 @@ AcpiNsLookup (
CurrentNode = ThisNode;
}
- /*
- * Always check if we need to open a new scope
- */
+ /* Always check if we need to open a new scope */
+
if (!(Flags & ACPI_NS_DONT_OPEN_SCOPE) && (WalkState))
{
/*