Print this page
update to acpica-unix2-20131218
acpica-unix2-20130823
PANKOVs restructure
*** 3,13 ****
* Module Name: dswload - Dispatcher first pass namespace load callbacks
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2011, 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:
--- 3,13 ----
* Module Name: dswload - Dispatcher first pass namespace load callbacks
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2013, 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,111 ****
--- 79,115 ----
{
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,182 ****
"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.
*/
--- 176,185 ----
*** 188,198 ****
/*
* 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);
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
WalkState, &Node);
}
#endif
--- 191,201 ----
/*
* Table disassembly:
* Target of Scope() not found. Generate an External for it, and
* insert the name into the namespace.
*/
! 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,229 ****
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)
--- 222,231 ----
*** 239,248 ****
--- 241,263 ----
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,262 ****
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
break;
-
default:
/*
* For all other named opcodes, we will enter the name into
* the namespace.
*
--- 267,276 ----