DXGKCB_ALLOCATECONTIGUOUSMEMORY - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// 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 reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-d3dkmddi-dxgkcb_allocatecontiguousmemory)

DXGKCB_ALLOCATECONTIGUOUSMEMORY callback function

Description

DXGKCB_ALLOCATECONTIGUOUSMEMORY allocates contiguous memory regions in the IOMMU's logical address space.

Parameters

hAdapter [in]

Handle to a display adapter.

pAllocateContiguousMemory [in/out]

Pointer to a DXGKARGCB_ALLOCATECONTIGUOUSMEMORY structure that contains arguments to allocate contiguous memory.

Return value

Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.

Remarks

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.

See also

DXGKARGCB_ALLOCATECONTIGUOUSMEMORY

DXGKCB_FREECONTIGUOUSMEMORY

DXGKRNL_INTERFACE