RegisterOpRegionHandler function (oprghdlr.h)

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

Syntax

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

Parameters

[in] DeviceObject

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

[in] AccessType

Specifies ACPI_OPREGION_ACCESS_AS_COOKED.

[in] 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

[in] Handler

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

[in] Context

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

[in] Flags

Reserved for internal use.

[out] 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

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

See also

ACPI_OP_REGION_HANDLER

DeRegisterOpRegionHandler