IOMMU_DOMAIN_ATTACH_DEVICE callback function (wdm.h)

Attaches a device to an existing domain.

Syntax

IOMMU_DOMAIN_ATTACH_DEVICE IommuDomainAttachDevice;

NTSTATUS IommuDomainAttachDevice(
  [_In_] PIOMMU_DMA_DOMAIN Domain,
  [_In_] PDEVICE_OBJECT PhysicalDeviceObject,
  [_In_] ULONG InputMappingIdBase,
  [_In_] ULONG MappingCount
)
{...}

Parameters

[_In_] Domain

A pointer to the handle to the domain.

[_In_] PhysicalDeviceObject

A pointer the physical device object (PDO) in the device stack of the device.

[_In_] InputMappingIdBase

The input mapping base for the device's desired stream.

[_In_] MappingCount

The count of mappings beginning at the base.

Return value

Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS values error code. For more information, see NTSTATUS Values.

Remarks

It is driver's responsibility to ensure that this function is not called concurrently with IOMMU_DOMAIN_DETACH_DEVICE or IOMMU_SET_DEVICE_FAULT_REPORTING calls on the same device.

InputMappingIdBase and MappingCount are intended only to accommodate ACPI-enumerated devices that support multiple stream IDs on ARM64. For any other device or architecture, these values must be:

  • InputMappingIdBase = 0

  • MappingCount = 1

This is deprecated. Consider using IOMMU_DOMAIN_ATTACH_DEVICE_EX and DMA_IOMMU_INTERFACE_EX.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1803
Header wdm.h (include Wdm.h)