RegisterOpRegionHandler function

The RegisterOpRegionHandler routine registers an operation region handler with the ACPI driver.

Syntax

NTSTATUS RegisterOpRegionHandler(
  PDEVICE_OBJECT          DeviceObject,
  ULONG                   AccessType,
  ULONG                   RegionSpace,
  PACPI_OP_REGION_HANDLER Handler,
  PVOID                   Context,
  ULONG                   Flags,
  PVOID                   *OperationRegionObject
);

Parameters

DeviceObject

Pointer to the physical device object (PDO) that represents the ACPI device that defines the operation region.

AccessType

Specifies ACPI_OPREGION_ACCESS_AS_COOKED.

RegionSpace

Specifies one of the following types of region space.

Region Space Identifier Description
ACPI_OPREGION_REGION_SPACE_MEMORY System memory
ACPI_OPREGION_REGION_SPACE_IO I/O space
ACPI_OPREGION_REGION_SPACE_PCI_CONFIG PCI configuration
ACPI_OPREGION_REGION_SPACE_EC Embedded controller
ACPI_OPREGION_REGION_SPACE_SMB System Management Bus
ACPI_OPREGION_REGION_SPACE_CMOS_CONFIG CMOS configuration
ACPI_OPREGION_REGION_SPACE_PCIBARTARGET PCI Base Address Register
Vendor-defined value from 0x80 to 0xFF Vendor-defined

Handler

Pointer to the ACPI_OP_REGION_HANDLER-typed operation region handler (supplied by an ACPI device function driver).

Context

Pointer to a device-specific operation region context (supplied by an ACPI device function driver).

Flags

Reserved for internal use.

OperationRegionObject

Pointer to caller-allocated buffer that, on output, contains a pointer to the operation region object that the ACPI driver creates for the operation region.

Return Value

Returns one of the following status values:

Return code Description
STATUS_SUCCESS
The operating region handler was successfully registered.
STATUS_ACPI_INVALID_DATA
The specified information is not valid.
STATUS_INSUFFICIENT_RESOURCES
The routine could not allocate the necessary system resources.
STATUS_Xxx
An internal error occurred.

Remarks

The operation region context specified by Context is device-specific and is only used by the function driver. Typically, the context is the device extension for the functional device object (FDO). The ACPI driver passes this context back to the function driver when it calls the operation region handler. The operation region object is only used by a function driver to uniquely identify the operation region when it deregisters the operation region handler.

For more information about operation regions, see Supporting an Operation Region.

Requirements

   
Target Platform Universal
Header oprghdlr.h (include Oprghdlr.h)
Library Oprghdlr.lib
IRQL PASSIVE_LEVEL

See Also

ACPI_OP_REGION_HANDLER

DeRegisterOpRegionHandler