// d3dkmddi.h
DXGKCB_ALLOCATECONTIGUOUSMEMORY DxgkcbAllocatecontiguousmemory;
NTSTATUS DxgkcbAllocatecontiguousmemory(
[in] IN_CONST_HANDLE hAdapter,
[in/out] INOUT_PDXGKARGCB_ALLOCATECONTIGUOUSMEMORY pAllocateContiguousMemory
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
DXGKCB_ALLOCATECONTIGUOUSMEMORY allocates contiguous memory regions in the IOMMU's logical address space.
hAdapter [in]Handle to a display adapter.
pAllocateContiguousMemory [in/out]Pointer to a DXGKARGCB_ALLOCATECONTIGUOUSMEMORY structure that contains arguments to allocate contiguous memory.
Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.
This callback function is Dxgkrnl's equivalent to the MmAllocateContiguousMemory function.
DXGKCB_XXX functions are implemented by Dxgkrnl. To use this callback function, set the appropriate members of DXGKARGCB_ALLOCATECONTIGUOUSMEMORY and then call DxgkCbAllocateContiguousMemory via the DXGKRNL_INTERFACE.
All memory accessed by the GPU during paging operations, or mapped via the GpuMmu must be mapped to the IOMMU. The Dxgkrnl provides callbacks to the KMD to allow the allocation and remapping in one step.
[!NOTE] The driver should not lock any memory. Dxgkrnl will manage locked pages for the driver, and once the memory is remapped, the logical address of the pages provided to the driver may no longer match the physical addresses.
See IOMMU-based GPU isolation for more information.
DXGKARGCB_ALLOCATECONTIGUOUSMEMORY