// oprghdlr.h
ACPI_OP_REGION_HANDLER AcpiOpRegionHandler;
NTSTATUS AcpiOpRegionHandler(
ULONG AccessType,
PVOID OperationRegionObject,
ULONG Address,
ULONG Size,
PULONG Data,
ULONG_PTR Context,
PACPI_OP_REGION_CALLBACK CompletionHandler,
PVOID CompletionContext
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
An ACPI_OP_REGION_HANDLER-typed routine is supplied by an ACPI device function driver to provide access by the ACPI driver to the device's operation region.
AccessTypeSpecifies one of the following access types:
| Access type | Description |
|---|---|
| ACPI_OPREGION_WRITE | Write to the operation region memory buffer. |
| ACPI_OPREGION_READ | Read from the operation region memory buffer. |
OperationRegionObjectSpecifies the operation region object returned by RegisterOpRegionHandler for the operation region handler.
AddressSpecifies a byte offset in the operation region memory buffer. Depending on the access type, data is transferred to or from this memory location.
SizeSpecifies the number of bytes to access.
DataPointer to the data buffer supplied by the ACPI driver that is associated with the access. For a read access, bytes are transferred from the operation region memory buffer to the data buffer. For a write access, bytes are transferred from the data buffer to the operation region memory buffer.
ContextPointer to the same operation region context that the function driver specified when it registered the operation region handler.
CompletionHandlerReserved for internal use.
CompletionContextReserved for internal use.
Returns one of the following status values:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The access was successful. |
| STATUS_INVALID_DEVICE_REQUEST | The access type is invalid. |
| STATUS_Xxx | An internal error occurred. |
When the ACPI driver calls an operation region handler, it specifies values for Address and Size that ensure that the access is within the operation region that is defined in the ACPI BIOS for the ACPI device. The ACPI device function driver must ensure that the operation region memory buffer it allocates is at least as large, in bytes, as the operation region defined for the ACPI device.
For more information about operation region handlers, see Supporting an Operation Region.
An ACPI_OP_REGION_HANDLER-typed routine runs at the caller's IRQL.
For detailed information about constraints on operation regions, see the Advanced Configuration and Power Interface (ACPI) Specification.