Fix to allow region arguments to reference other scopes.

Allow referenced objects to be in a different scope.
Lin Ming.
This commit is contained in:
Robert Moore 2011-10-12 13:52:21 -07:00
parent ccdeddbaf0
commit f3863d6e5c
3 changed files with 10 additions and 1 deletions

View File

@ -496,7 +496,7 @@ AcpiDsGetRegionArguments (
/* Execute the argument AML */ /* Execute the argument AML */
Status = AcpiDsExecuteArguments (Node, Node->Parent, Status = AcpiDsExecuteArguments (Node, ExtraDesc->Extra.ScopeNode,
ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart); ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
return_ACPI_STATUS (Status); return_ACPI_STATUS (Status);
} }

View File

@ -426,6 +426,14 @@ AcpiExCreateRegion (
RegionObj2 = ObjDesc->Common.NextObject; RegionObj2 = ObjDesc->Common.NextObject;
RegionObj2->Extra.AmlStart = AmlStart; RegionObj2->Extra.AmlStart = AmlStart;
RegionObj2->Extra.AmlLength = AmlLength; RegionObj2->Extra.AmlLength = AmlLength;
if (WalkState->ScopeInfo)
{
RegionObj2->Extra.ScopeNode = WalkState->ScopeInfo->Scope.Node;
}
else
{
RegionObj2->Extra.ScopeNode = Node;
}
/* Init the region from the operands */ /* Init the region from the operands */

View File

@ -535,6 +535,7 @@ typedef struct acpi_object_extra
{ {
ACPI_OBJECT_COMMON_HEADER ACPI_OBJECT_COMMON_HEADER
ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
ACPI_NAMESPACE_NODE *ScopeNode;
void *RegionContext; /* Region-specific data */ void *RegionContext; /* Region-specific data */
UINT8 *AmlStart; UINT8 *AmlStart;
UINT32 AmlLength; UINT32 AmlLength;