34 ok(
Mdl !=
NULL,
"MmAllocatePagesForMdl failed\n");
42 ok(MdlPageCount == 2 * 1024 * 1024 /
PAGE_SIZE,
"MdlPageCount = %lu\n", MdlPageCount);
43 for (
i = 0;
i < MdlPageCount;
i++)
46 "MdlPages[%lu] = 0x%I64x\n",
i, (
ULONGLONG)MdlPages[
i]);
56 ok(
Mdl !=
NULL,
"MmAllocatePagesForMdl failed\n");
68 ok(SystemVa !=
NULL,
"MmMapLockedPagesSpecifyCache failed\n");
69 if (!
skip(SystemVa !=
NULL,
"No system VA\n"))
73 ok(
Mdl->MappedSystemVa == SystemVa,
"MappedSystemVa: %p, System VA: %p\n",
Mdl->MappedSystemVa, SystemVa);
88 ok(
Mdl !=
NULL,
"MmAllocatePagesForMdl failed\n");
100 ok(SystemVa !=
NULL,
"MmMapLockedPagesSpecifyCache failed\n");
103 ok(
Mdl->MappedSystemVa == SystemVa,
"MappedSystemVa: %p, System VA: %p\n",
Mdl->MappedSystemVa, SystemVa);
112 2UL * 1024 * 1024 * 1024);
113 ok(
Mdl !=
NULL,
"MmAllocatePagesForMdl failed for 2 GB\n");
121 ok(MdlPageCount <= 2UL * 1024 * 1024 * 1024 /
PAGE_SIZE,
"MdlPageCount = %lu\n", MdlPageCount);
122 for (
i = 0;
i < MdlPageCount;
i++)
124 if (MdlPages[
i] == 0 ||
127 ok(0,
"MdlPages[%lu] = 0x%I64x\n",
i, (
ULONGLONG)MdlPages[
i]);
136 ok(SystemVa ==
NULL,
"MmMapLockedPagesSpecifyCache succeeded for 2 GB\n");
137 if (SystemVa !=
NULL)
147 for (
i = 0;
i <
sizeof(Mdls) /
sizeof(Mdls[0]);
i++)
155 trace(
"MmAllocatePagesForMdl failed with i = %lu\n",
i);
166 if (SystemVas[
i] ==
NULL)
171 trace(
"MmMapLockedPagesSpecifyCache failed with i = %lu\n",
i);
176 ok(Mdls[
i]->MappedSystemVa == SystemVas[
i],
"MappedSystemVa: %p\n", Mdls[
i]->MappedSystemVa, SystemVas[
i]);
179 for (
i = 0;
i <
sizeof(Mdls) /
sizeof(Mdls[0]);
i++)
183 if (SystemVas[
i] !=
NULL)
187 if (SystemVas[
i] ==
NULL)
200 ok(
Page !=
NULL,
"ExAllocatePoolWithTag failed\n");
205 ok(
Mdl !=
NULL,
"IoAllocateMdl failed\n");
220 ok(
Page !=
NULL,
"ExAllocatePoolWithTag failed\n");
225 ok(
Mdl !=
NULL,
"IoAllocateMdl failed\n");
static VOID TestMmAllocatePagesForMdl(VOID)
static VOID TestMmBuildMdlForNonPagedPool(VOID)
#define ExAllocatePoolWithTag(hernya, size, tag)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID NTAPI MmFreePagesFromMdl(IN PMDL Mdl)
PMDL NTAPI MmAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress, IN PHYSICAL_ADDRESS HighAddress, IN PHYSICAL_ADDRESS SkipBytes, IN SIZE_T TotalBytes)
VOID NTAPI MmBuildMdlForNonPagedPool(IN PMDL Mdl)
PVOID NTAPI MmMapLockedPagesSpecifyCache(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN MEMORY_CACHING_TYPE CacheType, IN PVOID BaseAddress, IN ULONG BugCheckOnFailure, IN ULONG Priority)
VOID NTAPI MmUnmapLockedPages(IN PVOID BaseAddress, IN PMDL Mdl)
#define ExFreePoolWithTag(_P, _T)
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
#define MmGetMdlByteCount(_Mdl)
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS HighAddress
#define MmGetMdlVirtualAddress(_Mdl)
#define MmGetMdlPfnArray(_Mdl)
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size)
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS _In_ PHYSICAL_ADDRESS SkipBytes
#define MDL_SOURCE_IS_NONPAGED_POOL
#define MDL_MAPPED_TO_SYSTEM_VA