IOMMU_MAP_RESERVED_LOGICAL_RANGE callback function (wdm.h)

Maps a reserved logical range.

Unlike IOMMU_MAP_LOGICAL_RANGE_EX, this is guaranteed not to perform any memory allocations as they are assumed to have already been performed earlier with IOMMU_RESERVE_LOGICAL_ADDRESS_RANGE.

Syntax

IOMMU_MAP_RESERVED_LOGICAL_RANGE IommuMapReservedLogicalRange;

NTSTATUS IommuMapReservedLogicalRange(
  [in, out] PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN LogicalAddressToken,
  [in]      SIZE_T Offset,
  [in]      ULONG Permissions,
  [in]      PIOMMU_MAP_PHYSICAL_ADDRESS PhysicalAddressToMap,
  [out]     PIOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT MappedSegment
)
{...}

Parameters

[in, out] LogicalAddressToken

The IOMMU_DMA_LOGICAL_ADDRESS_TOKEN to be mapped to.

[in] Offset

The offset, in bytes, into the logical address token, representing the base logical address to be mapped.

[in] Permissions

A bit-field representing the permissions to be set for the range being mapped. See Remarks for the available permission bits.

[in] PhysicalAddressToMap

The IOMMU_MAP_PHYSICAL_ADDRESS that will be mapped to the domain.

[out] MappedSegment

Returns the IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT representing a segment of the logical address token that is now mapped.

Return value

STATUS_SUCCESS if the operation is successful. Possible error return values include the following status codes.

Return code Description
STATUS_INVALID_PARAMETER_2 The offset provided is not page aligned.
STATUS_INVALID_PARAMETER_4 The physical address provided is not page aligned and/or is not a whole number of pages in size.
STATUS_RESOURCE_IN_USE The logical address range represented in the logical address token is already completely or partially mapped.
STATUS_UNSUCCESSFUL The logical address token is currently being deleted.

For more information, see NTSTATUS Values.

Remarks

A logical address token mapped segment can be unmapped via IOMMU_UNMAP_RESERVED_LOGICAL_RANGE.

The permissions field is a bitfield that describes the access permissions for the pages to be mapped.

The bits are defined as follows:

Bit 0 = Read Access

Bit 1 = Write Access

Bits 31-2 = Reserved (0)

Requirements

Requirement Value
Minimum supported server Windows Server 2022
Header wdm.h (include Wdm.h)

See also

IOMMU_UNMAP_RESERVED_LOGICAL_RANGE

IOMMU_MAP_PHYSICAL_ADDRESS

IOMMU_DMA_LOGICAL_ADDRESS_TOKEN

IOMMU_DMA_LOGICAL_ADDRESS_TOKEN_MAPPED_SEGMENT