Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure
*** 3,13 ****
* Module Name: excreate - Named object creation
*
*****************************************************************************/
/*
! * 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: excreate - Named object creation
*
*****************************************************************************/
/*
! * 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:
*** 111,141 ****
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case ACPI_TYPE_PACKAGE:
case ACPI_TYPE_BUFFER_FIELD:
-
/*
* These types open a new scope, so we need the NS node in order to access
* any children.
*/
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_POWER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_THERMAL:
case ACPI_TYPE_LOCAL_SCOPE:
-
/*
* The new alias has the type ALIAS and points to the original
* NS node, not the object itself.
*/
AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS;
AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
break;
case ACPI_TYPE_METHOD:
-
/*
* Control method aliases need to be differentiated
*/
AliasNode->Type = ACPI_TYPE_LOCAL_METHOD_ALIAS;
AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
--- 111,138 ----
*** 282,292 ****
*
* FUNCTION: AcpiExCreateRegion
*
* PARAMETERS: AmlStart - Pointer to the region declaration AML
* AmlLength - Max length of the declaration AML
! * RegionSpace - SpaceID for the region
* WalkState - Current state
*
* RETURN: Status
*
* DESCRIPTION: Create a new operation region object
--- 279,289 ----
*
* FUNCTION: AcpiExCreateRegion
*
* PARAMETERS: AmlStart - Pointer to the region declaration AML
* AmlLength - Max length of the declaration AML
! * SpaceId - Address space ID for the region
* WalkState - Current state
*
* RETURN: Status
*
* DESCRIPTION: Create a new operation region object
*** 295,305 ****
ACPI_STATUS
AcpiExCreateRegion (
UINT8 *AmlStart,
UINT32 AmlLength,
! UINT8 RegionSpace,
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_NAMESPACE_NODE *Node;
--- 292,302 ----
ACPI_STATUS
AcpiExCreateRegion (
UINT8 *AmlStart,
UINT32 AmlLength,
! UINT8 SpaceId,
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_NAMESPACE_NODE *Node;
*** 324,343 ****
/*
* Space ID must be one of the predefined IDs, or in the user-defined
* range
*/
! if ((RegionSpace >= ACPI_NUM_PREDEFINED_REGIONS) &&
! (RegionSpace < ACPI_USER_REGION_BEGIN) &&
! (RegionSpace != ACPI_ADR_SPACE_DATA_TABLE))
{
! ACPI_ERROR ((AE_INFO, "Invalid AddressSpace type 0x%X", RegionSpace));
! return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
! AcpiUtGetRegionName (RegionSpace), RegionSpace));
/* Create the region descriptor */
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
if (!ObjDesc)
--- 321,342 ----
/*
* Space ID must be one of the predefined IDs, or in the user-defined
* range
*/
! if (!AcpiIsValidSpaceId (SpaceId))
{
! /*
! * Print an error message, but continue. We don't want to abort
! * a table load for this exception. Instead, if the region is
! * actually used at runtime, abort the executing method.
! */
! ACPI_ERROR ((AE_INFO, "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
}
ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
! AcpiUtGetRegionName (SpaceId), SpaceId));
/* Create the region descriptor */
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
if (!ObjDesc)
*** 351,364 ****
* operands since they need to be evaluated at run time.
*/
RegionObj2 = ObjDesc->Common.NextObject;
RegionObj2->Extra.AmlStart = AmlStart;
RegionObj2->Extra.AmlLength = AmlLength;
/* Init the region from the operands */
! ObjDesc->Region.SpaceId = RegionSpace;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
ObjDesc->Region.Node = Node;
/* Install the new region object in the parent Node */
--- 350,371 ----
* operands since they need to be evaluated at run time.
*/
RegionObj2 = ObjDesc->Common.NextObject;
RegionObj2->Extra.AmlStart = AmlStart;
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 */
! ObjDesc->Region.SpaceId = SpaceId;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
ObjDesc->Region.Node = Node;
/* Install the new region object in the parent Node */
*** 558,564 ****
/* Remove a reference to the operand */
AcpiUtRemoveReference (Operand[1]);
return_ACPI_STATUS (Status);
}
-
-
--- 565,569 ----