Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20131218
acpica-unix2-20130823
PANKOVs restructure

@@ -3,11 +3,11 @@
  * Module Name: dswload - Dispatcher first pass namespace load callbacks
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

@@ -79,33 +79,37 @@
 {
 
     switch (PassNumber)
     {
     case 1:
+
         WalkState->ParseFlags         = ACPI_PARSE_LOAD_PASS1 |
                                         ACPI_PARSE_DELETE_TREE;
         WalkState->DescendingCallback = AcpiDsLoad1BeginOp;
         WalkState->AscendingCallback  = AcpiDsLoad1EndOp;
         break;
 
     case 2:
+
         WalkState->ParseFlags         = ACPI_PARSE_LOAD_PASS1 |
                                         ACPI_PARSE_DELETE_TREE;
         WalkState->DescendingCallback = AcpiDsLoad2BeginOp;
         WalkState->AscendingCallback  = AcpiDsLoad2EndOp;
         break;
 
     case 3:
+
 #ifndef ACPI_NO_METHOD_EXECUTION
         WalkState->ParseFlags        |= ACPI_PARSE_EXECUTE  |
                                         ACPI_PARSE_DELETE_TREE;
         WalkState->DescendingCallback = AcpiDsExecBeginOp;
         WalkState->AscendingCallback  = AcpiDsExecEndOp;
 #endif
         break;
 
     default:
+
         return (AE_BAD_PARAMETER);
     }
 
     return (AE_OK);
 }

@@ -172,11 +176,10 @@
         "State=%p Op=%p [%s]\n", WalkState, Op, AcpiUtGetTypeName (ObjectType)));
 
     switch (WalkState->Opcode)
     {
     case AML_SCOPE_OP:
-
         /*
          * The target name of the Scope() operator must exist at this point so
          * that we can actually open the scope to enter new names underneath it.
          * Allow search-to-root for single namesegs.
          */

@@ -188,11 +191,11 @@
             /*
              * Table disassembly:
              * Target of Scope() not found. Generate an External for it, and
              * insert the name into the namespace.
              */
-            AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_DEVICE, 0);
+            AcpiDmAddOpToExternalList (Op, Path, ACPI_TYPE_DEVICE, 0, 0);
             Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
                        ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
                        WalkState, &Node);
         }
 #endif

@@ -219,11 +222,10 @@
             break;
 
         case ACPI_TYPE_INTEGER:
         case ACPI_TYPE_STRING:
         case ACPI_TYPE_BUFFER:
-
             /*
              * These types we will allow, but we will change the type.
              * This enables some existing code of the form:
              *
              *  Name (DEB, 0)

@@ -239,10 +241,23 @@
 
             Node->Type = ACPI_TYPE_ANY;
             WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
             break;
 
+        case ACPI_TYPE_METHOD:
+            /*
+             * Allow scope change to root during execution of module-level
+             * code. Root is typed METHOD during this time.
+             */
+            if ((Node == AcpiGbl_RootNode) &&
+                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
+            {
+                break;
+            }
+
+            /*lint -fallthrough */
+
         default:
 
             /* All other types are an error */
 
             ACPI_ERROR ((AE_INFO,

@@ -252,11 +267,10 @@
 
             return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
         }
         break;
 
-
     default:
         /*
          * For all other named opcodes, we will enter the name into
          * the namespace.
          *