Enable Scope change to root during module-level code execution.

Allows constructs like this:
If (XXXX)
    Scope (\)
    ...
This commit is contained in:
Robert Moore 2012-07-12 13:58:26 -07:00
parent e4e99ffc4c
commit 2ce2407975
2 changed files with 28 additions and 0 deletions

View File

@ -313,6 +313,20 @@ AcpiDsLoad1BeginOp (
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 */

View File

@ -315,6 +315,20 @@ AcpiDsLoad2BeginOp (
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 */