mirror of
https://github.com/acpica/acpica/
synced 2025-02-23 17:04:21 +03:00
Initial support for DataTable Regions
date 2001.12.04.18.00.00; author rmoore1; state Exp;
This commit is contained in:
parent
dc3e4828d6
commit
99856e5ace
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exregion - ACPI default OpRegion (address space) handlers
|
||||
* $Revision: 1.64 $
|
||||
* $Revision: 1.65 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -513,3 +513,65 @@ AcpiExPciBarSpaceHandler (
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiExDataTableSpaceHandler
|
||||
*
|
||||
* PARAMETERS: Function - Read or Write operation
|
||||
* Address - Where in the space to read or write
|
||||
* BitWidth - Field width in bits (8, 16, or 32)
|
||||
* Value - Pointer to in or out value
|
||||
* HandlerContext - Pointer to Handler's context
|
||||
* RegionContext - Pointer to context specific to the
|
||||
* accessed region
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Handler for the Data Table address space (Op Region)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExDataTableSpaceHandler (
|
||||
UINT32 Function,
|
||||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
UINT32 BitWidth,
|
||||
ACPI_INTEGER *Value,
|
||||
void *HandlerContext,
|
||||
void *RegionContext)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
UINT32 ByteWidth = DIV_8 (BitWidth);
|
||||
UINT32 i;
|
||||
char *LogicalAddrPtr;
|
||||
|
||||
|
||||
FUNCTION_TRACE ("ExDataTableSpaceHandler");
|
||||
|
||||
|
||||
LogicalAddrPtr = (char *) (NATIVE_UINT) Address;
|
||||
|
||||
|
||||
/* Perform the memory read or write */
|
||||
|
||||
switch (Function)
|
||||
{
|
||||
case ACPI_READ:
|
||||
|
||||
for (i = 0; i < ByteWidth; i++)
|
||||
{
|
||||
((char *) Value) [i] = LogicalAddrPtr[i];
|
||||
}
|
||||
break;
|
||||
|
||||
case ACPI_WRITE:
|
||||
|
||||
return_ACPI_STATUS (AE_SUPPORT);
|
||||
break;
|
||||
}
|
||||
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user