aboutsummaryrefslogtreecommitdiffstats
path: root/source/common
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2012-05-19 05:44:32 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2012-05-19 05:44:32 +0000
commitfa948a817cf9dae39dc632f9bf48a8af37244a0e (patch)
tree83fbd480537714dcce335edc4aed3216f4e57816 /source/common
parentb43c4dd5abdb09fe2e7f73f186586b962c9dc9f5 (diff)
downloadsrc-vendor/acpica/20120518.tar.gz
src-vendor/acpica/20120518.zip
Import ACPICA 20120518.vendor/acpica/20120518
Diffstat (limited to 'source/common')
-rw-r--r--source/common/adfile.c19
-rw-r--r--source/common/adwalk.c30
-rw-r--r--source/common/dmextern.c30
3 files changed, 58 insertions, 21 deletions
diff --git a/source/common/adfile.c b/source/common/adfile.c
index d971e6895bfd..2caf59954a54 100644
--- a/source/common/adfile.c
+++ b/source/common/adfile.c
@@ -298,20 +298,24 @@ FlSplitInputPathname (
return (AE_NO_MEMORY);
}
- Substring = strrchr (DirectoryPath, '\\');
+ /* Convert backslashes to slashes in the entire path */
+
+ UtConvertBackslashes (DirectoryPath);
+
+ /* Backup to last slash or colon */
+
+ Substring = strrchr (DirectoryPath, '/');
if (!Substring)
{
- Substring = strrchr (DirectoryPath, '/');
- if (!Substring)
- {
- Substring = strrchr (DirectoryPath, ':');
- }
+ Substring = strrchr (DirectoryPath, ':');
}
+ /* Extract the simple filename */
+
if (!Substring)
{
+ Filename = FlStrdup (DirectoryPath);
DirectoryPath[0] = 0;
- Filename = FlStrdup (InputPath);
}
else
{
@@ -326,7 +330,6 @@ FlSplitInputPathname (
*OutDirectoryPath = DirectoryPath;
*OutFilename = Filename;
-
return (AE_OK);
}
diff --git a/source/common/adwalk.c b/source/common/adwalk.c
index efda35a8be23..5336b61ef979 100644
--- a/source/common/adwalk.c
+++ b/source/common/adwalk.c
@@ -521,6 +521,7 @@ AcpiDmFindOrphanDescending (
if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
(OpInfo->Class != AML_CLASS_CREATE) &&
+ (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) &&
(ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
!Op->Common.Node)
{
@@ -743,13 +744,23 @@ AcpiDmXrefDescendingOp (
if (OpInfo->Flags & AML_NAMED)
{
- if ((Op->Common.AmlOpcode == AML_ALIAS_OP) ||
- (Op->Common.AmlOpcode == AML_SCOPE_OP))
+ /*
+ * Only these two operators (Alias, Scope) refer to an existing
+ * name, it is the first argument
+ */
+ if (Op->Common.AmlOpcode == AML_ALIAS_OP)
+ {
+ ObjectType = ACPI_TYPE_ANY;
+
+ NextOp = Op->Common.Value.Arg;
+ NextOp = NextOp->Common.Value.Arg;
+ if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
+ {
+ Path = NextOp->Common.Value.String;
+ }
+ }
+ else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
{
- /*
- * Only these two operators refer to an existing name,
- * first argument
- */
Path = (char *) Op->Named.Path;
}
}
@@ -757,6 +768,8 @@ AcpiDmXrefDescendingOp (
{
/* Referenced Buffer Name is the first child */
+ ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */
+
NextOp = Op->Common.Value.Arg;
if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
{
@@ -783,6 +796,11 @@ AcpiDmXrefDescendingOp (
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Node);
+ if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
+ {
+ Status = AE_NOT_FOUND;
+ }
+
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
diff --git a/source/common/dmextern.c b/source/common/dmextern.c
index 37c34fc5dab1..d509c8ae9256 100644
--- a/source/common/dmextern.c
+++ b/source/common/dmextern.c
@@ -454,12 +454,12 @@ AcpiDmAddToExternalList (
NewExternal->InternalPath = Path;
- /* Link the new descriptor into the global list, ordered by string length */
+ /* Link the new descriptor into the global list, alphabetically ordered */
NextExternal = AcpiGbl_ExternalList;
while (NextExternal)
{
- if (NewExternal->Length <= NextExternal->Length)
+ if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0)
{
if (PrevExternal)
{
@@ -508,7 +508,7 @@ AcpiDmAddExternalsToNamespace (
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node;
- ACPI_OPERAND_OBJECT *MethodDesc;
+ ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList;
@@ -527,13 +527,29 @@ AcpiDmAddExternalsToNamespace (
"while adding external to namespace [%s]",
External->Path));
}
- else if (External->Type == ACPI_TYPE_METHOD)
+
+ else switch (External->Type)
{
+ case ACPI_TYPE_METHOD:
+
/* For methods, we need to save the argument count */
- MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
- MethodDesc->Method.ParamCount = (UINT8) External->Value;
- Node->Object = MethodDesc;
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
+ ObjDesc->Method.ParamCount = (UINT8) External->Value;
+ Node->Object = ObjDesc;
+ break;
+
+ case ACPI_TYPE_REGION:
+
+ /* Regions require a region sub-object */
+
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
+ ObjDesc->Region.Node = Node;
+ Node->Object = ObjDesc;
+ break;
+
+ default:
+ break;
}
External = External->Next;