mirror of
https://github.com/acpica/acpica/
synced 2025-01-16 06:19:19 +03:00
Initial support for DataTable Regions
date 2001.12.04.18.00.00; author rmoore1; state Exp;
This commit is contained in:
parent
98139bf05b
commit
7f8df9094f
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: excreate - Named object creation
|
||||
* $Revision: 1.79 $
|
||||
* $Revision: 1.80 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -322,7 +322,7 @@ AcpiExCreateRegion (
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_OPERAND_OBJECT *RegionObj2 = NULL;
|
||||
ACPI_OPERAND_OBJECT *RegionObj2;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("ExCreateRegion");
|
||||
@ -410,13 +410,47 @@ ACPI_STATUS
|
||||
AcpiExCreateTableRegion (
|
||||
ACPI_WALK_STATE *WalkState)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_NAMESPACE_NODE *Node;
|
||||
ACPI_TABLE_HEADER *Table;
|
||||
ACPI_OPERAND_OBJECT *RegionObj2;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("ExCreateTableRegion");
|
||||
|
||||
/*
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
/* Get the Node from the object stack */
|
||||
|
||||
Node = WalkState->Op->Node;
|
||||
|
||||
/*
|
||||
* If the region object is already attached to this node,
|
||||
* just return
|
||||
*/
|
||||
if (AcpiNsGetAttachedObject (Node))
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/* Find the table */
|
||||
|
||||
if (!STRCMP (Operand[1]->String.Pointer, DSDT_SIG))
|
||||
{
|
||||
Table = (ACPI_TABLE_HEADER *) AcpiGbl_DSDT;
|
||||
}
|
||||
else
|
||||
{
|
||||
return_ACPI_STATUS (AE_SUPPORT);
|
||||
}
|
||||
|
||||
/* Check OemId and TableId
|
||||
|
||||
|
||||
|
||||
/* Create the region descriptor */
|
||||
|
||||
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
|
||||
if (!ObjDesc)
|
||||
{
|
||||
@ -425,9 +459,31 @@ AcpiExCreateTableRegion (
|
||||
}
|
||||
|
||||
|
||||
Cleanup:
|
||||
*/
|
||||
RegionObj2 = ObjDesc->Common.NextObject;
|
||||
RegionObj2->Extra.RegionContext = Table;
|
||||
|
||||
|
||||
|
||||
/* Init the region from the operands */
|
||||
|
||||
ObjDesc->Region.SpaceId = REGION_DATA_TABLE;
|
||||
ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) Table;
|
||||
ObjDesc->Region.Length = Table->Length;
|
||||
ObjDesc->Region.Node = Node;
|
||||
|
||||
|
||||
ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID | AOPOBJ_SETUP_COMPLETE;
|
||||
|
||||
/* Install the new region object in the parent Node */
|
||||
|
||||
Status = AcpiNsAttachObject (Node, ObjDesc, (UINT8) ACPI_TYPE_REGION);
|
||||
|
||||
|
||||
Cleanup:
|
||||
|
||||
/* Remove local reference to the object */
|
||||
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user