DeRefOf operator: Update to fully resolve FieldUnit and BufferField refs.

Previously, references to these objects were resolved only to the actual
FieldUnit or BufferField object. The correct behavior is to resolve these
references to an actual value.

NOTE: It appears that this issues is present in Windows7 but not
Windows8.
This commit is contained in:
Robert Moore 2013-07-17 13:06:12 -07:00
parent 2d680bf6e4
commit 87c98c18d6

View File

@ -1102,15 +1102,44 @@ AcpiExOpcode_1A_0T_1R (
ReturnDesc = Operand[0]->Reference.Object;
if (ACPI_GET_DESCRIPTOR_TYPE (ReturnDesc) ==
ACPI_DESC_TYPE_NAMED)
ACPI_DESC_TYPE_NAMED)
{
ReturnDesc = AcpiNsGetAttachedObject (
(ACPI_NAMESPACE_NODE *) ReturnDesc);
(ACPI_NAMESPACE_NODE *) ReturnDesc);
if (!ReturnDesc)
{
break;
}
/*
* June 2013:
* BufferFields/FieldUnits require additional resolution
*/
switch (ReturnDesc->Common.Type)
{
case ACPI_TYPE_BUFFER_FIELD:
case ACPI_TYPE_LOCAL_REGION_FIELD:
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
Status = AcpiExReadDataFromField (WalkState,
ReturnDesc, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
ReturnDesc = TempDesc;
break;
default:
/* Add another reference to the object */
AcpiUtAddReference (ReturnDesc);
break;
}
}
/* Add another reference to the object! */
AcpiUtAddReference (ReturnDesc);
break;
default: