2010-03-13 00:34:48 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* Memory manager Functions *
|
|
|
|
******************************************************************************/
|
2010-03-23 00:27:32 +00:00
|
|
|
$if (_WDMDDK_)
|
2010-03-18 22:45:30 +00:00
|
|
|
/* Alignment Macros */
|
2010-03-13 00:34:48 +00:00
|
|
|
#define ALIGN_DOWN_BY(size, align) \
|
|
|
|
((ULONG_PTR)(size) & ~((ULONG_PTR)(align) - 1))
|
|
|
|
|
|
|
|
#define ALIGN_UP_BY(size, align) \
|
|
|
|
(ALIGN_DOWN_BY(((ULONG_PTR)(size) + align - 1), align))
|
|
|
|
|
|
|
|
#define ALIGN_DOWN_POINTER_BY(ptr, align) \
|
|
|
|
((PVOID)ALIGN_DOWN_BY(ptr, align))
|
|
|
|
|
|
|
|
#define ALIGN_UP_POINTER_BY(ptr, align) \
|
|
|
|
((PVOID)ALIGN_UP_BY(ptr, align))
|
|
|
|
|
|
|
|
#define ALIGN_DOWN(size, type) \
|
|
|
|
ALIGN_DOWN_BY(size, sizeof(type))
|
|
|
|
|
|
|
|
#define ALIGN_UP(size, type) \
|
|
|
|
ALIGN_UP_BY(size, sizeof(type))
|
|
|
|
|
|
|
|
#define ALIGN_DOWN_POINTER(ptr, type) \
|
|
|
|
ALIGN_DOWN_POINTER_BY(ptr, sizeof(type))
|
|
|
|
|
|
|
|
#define ALIGN_UP_POINTER(ptr, type) \
|
|
|
|
ALIGN_UP_POINTER_BY(ptr, sizeof(type))
|
|
|
|
|
[XDK]
- Move several definitions to their appropriate places.
- Add FIELD_OFFSET, FIELD_SIZE, POOL_TAGGING, IF_DEBUG, IF_NTOS_DEBUG, LOOKASIDE_CHECK, KIPI_COUNTS, KTIMER_ACTUAL_LENGTH, LOGICAL_PROCESSOR_RELATIONSHIP, LTP_PC_SMT, SYSTEM_LOGICAL_PROCESSOR_INFORMATION, NUMA_NODE_RELATIONSHIP, GROUP_RELATIONSHIP, SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, SINGLE_GROUP_LEGACY_API, KMESSAGE_SERVICE_ROUTINE, KSEMAPHORE_ACTUAL_LENGTH and several missing CACHE_*, PROCESSOR_* and KAPC_* definitions.
- Group some related definitions.
- Base several ASSERT_* macros on NT_ASSERT instead of ASSERT.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46284
2010-03-20 11:47:30 +00:00
|
|
|
#ifndef FIELD_OFFSET
|
|
|
|
#define FIELD_OFFSET(type, field) ((ULONG)&(((type *)0)->field))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FIELD_SIZE
|
|
|
|
#define FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define POOL_TAGGING 1
|
|
|
|
|
|
|
|
#if DBG
|
|
|
|
#define IF_DEBUG if (TRUE)
|
|
|
|
#else
|
|
|
|
#define IF_DEBUG if (FALSE)
|
|
|
|
#endif /* DBG */
|
|
|
|
|
2010-03-13 00:34:48 +00:00
|
|
|
/* ULONG
|
|
|
|
* BYTE_OFFSET(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PVOID Va)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define BYTE_OFFSET(Va) \
|
|
|
|
((ULONG) ((ULONG_PTR) (Va) & (PAGE_SIZE - 1)))
|
|
|
|
|
|
|
|
/* ULONG
|
|
|
|
* BYTES_TO_PAGES(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ ULONG Size)
|
|
|
|
*
|
|
|
|
* Note: This needs to be like this to avoid overflows!
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define BYTES_TO_PAGES(Size) \
|
2013-04-13 16:10:09 +00:00
|
|
|
(((Size) >> PAGE_SHIFT) + (((Size) & (PAGE_SIZE - 1)) != 0))
|
2010-03-13 00:34:48 +00:00
|
|
|
|
|
|
|
/* PVOID
|
|
|
|
* PAGE_ALIGN(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PVOID Va)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define PAGE_ALIGN(Va) \
|
|
|
|
((PVOID) ((ULONG_PTR)(Va) & ~(PAGE_SIZE - 1)))
|
|
|
|
|
|
|
|
/* ULONG_PTR
|
|
|
|
* ROUND_TO_PAGES(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ ULONG_PTR Size)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define ROUND_TO_PAGES(Size) \
|
|
|
|
(((ULONG_PTR) (Size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
|
|
|
|
|
|
|
|
/* ULONG
|
|
|
|
* ADDRESS_AND_SIZE_TO_SPAN_PAGES(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PVOID Va,
|
|
|
|
* _In_ ULONG Size)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size) \
|
|
|
|
((ULONG) ((((ULONG_PTR) (_Va) & (PAGE_SIZE - 1)) \
|
|
|
|
+ (_Size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT))
|
|
|
|
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
#define COMPUTE_PAGES_SPANNED(Va, Size) \
|
|
|
|
ADDRESS_AND_SIZE_TO_SPAN_PAGES(Va,Size)
|
|
|
|
|
2010-03-13 00:34:48 +00:00
|
|
|
/*
|
|
|
|
* ULONG
|
|
|
|
* MmGetMdlByteCount(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL Mdl)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmGetMdlByteCount(_Mdl) \
|
|
|
|
((_Mdl)->ByteCount)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ULONG
|
|
|
|
* MmGetMdlByteOffset(
|
|
|
|
* IN PMDL Mdl)
|
|
|
|
*/
|
|
|
|
#define MmGetMdlByteOffset(_Mdl) \
|
|
|
|
((_Mdl)->ByteOffset)
|
|
|
|
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
#define MmGetMdlBaseVa(Mdl) ((Mdl)->StartVa)
|
|
|
|
|
2010-03-13 00:34:48 +00:00
|
|
|
/*
|
|
|
|
* PPFN_NUMBER
|
|
|
|
* MmGetMdlPfnArray(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL Mdl)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmGetMdlPfnArray(_Mdl) \
|
|
|
|
((PPFN_NUMBER) ((_Mdl) + 1))
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PVOID
|
|
|
|
* MmGetMdlVirtualAddress(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL Mdl)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmGetMdlVirtualAddress(_Mdl) \
|
|
|
|
((PVOID) ((PCHAR) ((_Mdl)->StartVa) + (_Mdl)->ByteOffset))
|
|
|
|
|
|
|
|
#define MmGetProcedureAddress(Address) (Address)
|
2011-06-04 16:59:09 +00:00
|
|
|
#define MmLockPagableCodeSection(Address) MmLockPagableDataSection(Address)
|
2010-03-13 00:34:48 +00:00
|
|
|
|
|
|
|
/* PVOID MmGetSystemAddressForMdl(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL Mdl);
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmGetSystemAddressForMdl(Mdl) \
|
|
|
|
(((Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
|
|
|
|
MDL_SOURCE_IS_NONPAGED_POOL)) ? \
|
|
|
|
((Mdl)->MappedSystemVa) : \
|
|
|
|
(MmMapLockedPages((Mdl), KernelMode)))
|
|
|
|
|
|
|
|
/* PVOID
|
|
|
|
* MmGetSystemAddressForMdlSafe(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL Mdl,
|
|
|
|
* _In_ MM_PAGE_PRIORITY Priority)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority) \
|
|
|
|
(((_Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA \
|
|
|
|
| MDL_SOURCE_IS_NONPAGED_POOL)) ? \
|
|
|
|
(_Mdl)->MappedSystemVa : \
|
|
|
|
(PVOID) MmMapLockedPagesSpecifyCache((_Mdl), \
|
|
|
|
KernelMode, MmCached, NULL, FALSE, (_Priority)))
|
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* MmInitializeMdl(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL MemoryDescriptorList,
|
|
|
|
* _In_ PVOID BaseVa,
|
|
|
|
* _In_ SIZE_T Length)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmInitializeMdl(_MemoryDescriptorList, \
|
|
|
|
_BaseVa, \
|
|
|
|
_Length) \
|
|
|
|
{ \
|
|
|
|
(_MemoryDescriptorList)->Next = (PMDL) NULL; \
|
|
|
|
(_MemoryDescriptorList)->Size = (CSHORT) (sizeof(MDL) + \
|
|
|
|
(sizeof(PFN_NUMBER) * ADDRESS_AND_SIZE_TO_SPAN_PAGES(_BaseVa, _Length))); \
|
|
|
|
(_MemoryDescriptorList)->MdlFlags = 0; \
|
|
|
|
(_MemoryDescriptorList)->StartVa = (PVOID) PAGE_ALIGN(_BaseVa); \
|
|
|
|
(_MemoryDescriptorList)->ByteOffset = BYTE_OFFSET(_BaseVa); \
|
|
|
|
(_MemoryDescriptorList)->ByteCount = (ULONG) _Length; \
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* VOID
|
|
|
|
* MmPrepareMdlForReuse(
|
2013-04-13 16:10:09 +00:00
|
|
|
* _In_ PMDL Mdl)
|
2010-03-13 00:34:48 +00:00
|
|
|
*/
|
|
|
|
#define MmPrepareMdlForReuse(_Mdl) \
|
|
|
|
{ \
|
|
|
|
if (((_Mdl)->MdlFlags & MDL_PARTIAL_HAS_BEEN_MAPPED) != 0) { \
|
|
|
|
ASSERT(((_Mdl)->MdlFlags & MDL_PARTIAL) != 0); \
|
|
|
|
MmUnmapLockedPages((_Mdl)->MappedSystemVa, (_Mdl)); \
|
|
|
|
} else if (((_Mdl)->MdlFlags & MDL_PARTIAL) == 0) { \
|
|
|
|
ASSERT(((_Mdl)->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) == 0); \
|
|
|
|
} \
|
|
|
|
}
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_WDMDDK_)
|
|
|
|
$if (_NTIFS_)
|
|
|
|
|
|
|
|
FORCEINLINE
|
|
|
|
ULONG
|
|
|
|
HEAP_MAKE_TAG_FLAGS(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG TagBase,
|
|
|
|
_In_ ULONG Tag)
|
2010-03-27 15:31:25 +00:00
|
|
|
{
|
|
|
|
//__assume_bound(TagBase); // FIXME
|
|
|
|
return ((ULONG)((TagBase) + ((Tag) << HEAP_TAG_SHIFT)));
|
|
|
|
}
|
|
|
|
$endif (_NTIFS_)
|
2010-03-13 00:34:48 +00:00
|
|
|
|
|
|
|
#if (NTDDI_VERSION >= NTDDI_WIN2K)
|
2010-03-27 15:31:25 +00:00
|
|
|
$if (_WDMDDK_)
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
_When_ (return != NULL, _Post_writable_byte_size_ (NumberOfBytes))
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmAllocateContiguousMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ PHYSICAL_ADDRESS HighestAcceptableAddress);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
_When_ (return != NULL, _Post_writable_byte_size_ (NumberOfBytes))
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmAllocateContiguousMemorySpecifyCache(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ PHYSICAL_ADDRESS LowestAcceptableAddress,
|
|
|
|
_In_ PHYSICAL_ADDRESS HighestAcceptableAddress,
|
|
|
|
_In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
|
|
|
|
_In_ MEMORY_CACHING_TYPE CacheType);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PMDL
|
|
|
|
NTAPI
|
|
|
|
MmAllocatePagesForMdl(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS LowAddress,
|
|
|
|
_In_ PHYSICAL_ADDRESS HighAddress,
|
|
|
|
_In_ PHYSICAL_ADDRESS SkipBytes,
|
|
|
|
_In_ SIZE_T TotalBytes);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmBuildMdlForNonPagedPool(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDLX MemoryDescriptorList);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
|
|
|
//DECLSPEC_DEPRECATED_DDK
|
|
|
|
NTKERNELAPI
|
|
|
|
PMDL
|
|
|
|
NTAPI
|
|
|
|
MmCreateMdl(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Out_writes_bytes_opt_ (sizeof (MDL) + (sizeof (PFN_NUMBER) * ADDRESS_AND_SIZE_TO_SPAN_PAGES (Base, Length)))
|
|
|
|
PMDL MemoryDescriptorList,
|
|
|
|
_In_reads_bytes_opt_ (Length) PVOID Base,
|
|
|
|
_In_ SIZE_T Length);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmFreeContiguousMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID BaseAddress);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmFreeContiguousMemorySpecifyCache(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_ (NumberOfBytes) PVOID BaseAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ MEMORY_CACHING_TYPE CacheType);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmFreePagesFromMdl(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDLX MemoryDescriptorList);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmGetSystemRoutineAddress(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PUNICODE_STRING SystemRoutineName);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
LOGICAL
|
|
|
|
NTAPI
|
|
|
|
MmIsDriverVerifying(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ struct _DRIVER_OBJECT *DriverObject);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmLockPagableDataSection(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID AddressWithinSection);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
_Out_writes_bytes_opt_ (NumberOfBytes)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmMapIoSpace(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS PhysicalAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ MEMORY_CACHING_TYPE CacheType);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
2012-09-26 09:40:44 +00:00
|
|
|
_When_(AccessMode==KernelMode, _IRQL_requires_max_(DISPATCH_LEVEL))
|
|
|
|
_When_(AccessMode==UserMode, _Maybe_raises_SEH_exception_ _IRQL_requires_max_(APC_LEVEL))
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmMapLockedPages(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDL MemoryDescriptorList,
|
|
|
|
_In_ __drv_strictType(KPROCESSOR_MODE/enum _MODE,__drv_typeConst)
|
|
|
|
KPROCESSOR_MODE AccessMode);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Post_writable_byte_size_(MemoryDescriptorList->ByteCount)
|
|
|
|
_When_(AccessMode==KernelMode, _IRQL_requires_max_(DISPATCH_LEVEL))
|
|
|
|
_When_(AccessMode==UserMode, _Maybe_raises_SEH_exception_ _IRQL_requires_max_(APC_LEVEL) _Post_notnull_)
|
|
|
|
_At_(MemoryDescriptorList->MappedSystemVa, _Post_writable_byte_size_(MemoryDescriptorList->ByteCount))
|
|
|
|
_Must_inspect_result_
|
|
|
|
_Success_(return != NULL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmMapLockedPagesSpecifyCache(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDLX MemoryDescriptorList,
|
|
|
|
_In_ __drv_strictType(KPROCESSOR_MODE/enum _MODE,__drv_typeConst)
|
|
|
|
KPROCESSOR_MODE AccessMode,
|
|
|
|
_In_ __drv_strictTypeMatch(__drv_typeCond) MEMORY_CACHING_TYPE CacheType,
|
|
|
|
_In_opt_ PVOID BaseAddress,
|
|
|
|
_In_ ULONG BugCheckOnFailure,
|
|
|
|
_In_ MM_PAGE_PRIORITY Priority);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmPageEntireDriver(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID AddressWithinSection);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
_At_(MemoryDescriptorList->StartVa + MemoryDescriptorList->ByteOffset,
|
|
|
|
_Field_size_bytes_opt_(MemoryDescriptorList->ByteCount))
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmProbeAndLockPages(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDLX MemoryDescriptorList,
|
|
|
|
_In_ KPROCESSOR_MODE AccessMode,
|
|
|
|
_In_ LOCK_OPERATION Operation);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
MM_SYSTEMSIZE
|
|
|
|
NTAPI
|
|
|
|
MmQuerySystemSize(VOID);
|
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmResetDriverPaging(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID AddressWithinSection);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
SIZE_T
|
|
|
|
NTAPI
|
|
|
|
MmSizeOfMdl(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_opt_ (Length) PVOID Base,
|
|
|
|
_In_ SIZE_T Length);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnlockPagableImageSection(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID ImageSectionHandle);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnlockPages(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDLX MemoryDescriptorList);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnmapIoSpace(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_ (NumberOfBytes) PVOID BaseAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmProbeAndLockProcessPages(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDL MemoryDescriptorList,
|
|
|
|
_In_ PEPROCESS Process,
|
|
|
|
_In_ KPROCESSOR_MODE AccessMode,
|
|
|
|
_In_ LOCK_OPERATION Operation);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnmapLockedPages(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID BaseAddress,
|
|
|
|
_Inout_ PMDL MemoryDescriptorList);
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
_When_ (return != NULL, _Post_writable_byte_size_ (NumberOfBytes))
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmAllocateContiguousMemorySpecifyCacheNode(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ PHYSICAL_ADDRESS LowestAcceptableAddress,
|
|
|
|
_In_ PHYSICAL_ADDRESS HighestAcceptableAddress,
|
|
|
|
_In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
|
|
|
|
_In_ MEMORY_CACHING_TYPE CacheType,
|
|
|
|
_In_ NODE_REQUIREMENT PreferredNode);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_WDMDDK_)
|
2010-03-23 00:27:32 +00:00
|
|
|
$if (_NTDDK_)
|
2010-03-27 15:31:25 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (PASSIVE_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PPHYSICAL_MEMORY_RANGE
|
|
|
|
NTAPI
|
|
|
|
MmGetPhysicalMemoryRanges(VOID);
|
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
PHYSICAL_ADDRESS
|
|
|
|
NTAPI
|
|
|
|
MmGetPhysicalAddress(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID BaseAddress);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
MmIsNonPagedSystemAddressValid(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID VirtualAddress);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
_Out_writes_bytes_opt_(NumberOfBytes)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmAllocateNonCachedMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ SIZE_T NumberOfBytes);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmFreeNonCachedMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_(NumberOfBytes) PVOID BaseAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmGetVirtualForPhysical(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS PhysicalAddress);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmMapUserAddressesToPage(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_(NumberOfBytes) PVOID BaseAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ PVOID PageAddress);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
_Out_writes_bytes_opt_(NumberOfBytes)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmMapVideoDisplay(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS PhysicalAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ MEMORY_CACHING_TYPE CacheType);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmMapViewInSessionSpace(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Section,
|
|
|
|
_Outptr_result_bytebuffer_(*ViewSize) PVOID *MappedBase,
|
|
|
|
_Inout_ PSIZE_T ViewSize);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmMapViewInSystemSpace(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID Section,
|
|
|
|
_Outptr_result_bytebuffer_(*ViewSize) PVOID *MappedBase,
|
|
|
|
_Inout_ PSIZE_T ViewSize);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
MmIsAddressValid(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID VirtualAddress);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
MmIsThisAnNtAsSystem(VOID);
|
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmLockPagableSectionByHandle(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID ImageSectionHandle);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmUnmapViewInSessionSpace(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID MappedBase);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmUnmapViewInSystemSpace(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID MappedBase);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnsecureVirtualMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ HANDLE SecureHandle);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (PASSIVE_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmRemovePhysicalMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PPHYSICAL_ADDRESS StartAddress,
|
|
|
|
_Inout_ PLARGE_INTEGER NumberOfBytes);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
HANDLE
|
|
|
|
NTAPI
|
|
|
|
MmSecureVirtualMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
__in_data_source(USER_MODE) _In_reads_bytes_ (Size) PVOID Address,
|
|
|
|
_In_ __in_data_source(USER_MODE) SIZE_T Size,
|
|
|
|
_In_ ULONG ProbeMode);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnmapVideoDisplay(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_(NumberOfBytes) PVOID BaseAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes);
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (PASSIVE_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmAddPhysicalMemory(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PPHYSICAL_ADDRESS StartAddress,
|
|
|
|
_Inout_ PLARGE_INTEGER NumberOfBytes);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_NTDDK_)
|
|
|
|
$if (_NTIFS_)
|
2010-03-13 00:34:48 +00:00
|
|
|
|
|
|
|
NTKERNELAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
BOOLEAN
|
2010-03-13 00:34:48 +00:00
|
|
|
NTAPI
|
2012-01-22 14:43:53 +00:00
|
|
|
MmIsRecursiveIoFault(VOID);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
BOOLEAN
|
2010-03-13 00:34:48 +00:00
|
|
|
NTAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
MmForceSectionClosed(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer,
|
|
|
|
_In_ BOOLEAN DelayClose);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
BOOLEAN
|
2010-03-13 00:34:48 +00:00
|
|
|
NTAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
MmFlushImageSection(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer,
|
|
|
|
_In_ MMFLUSH_TYPE FlushType);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
BOOLEAN
|
2010-03-13 00:34:48 +00:00
|
|
|
NTAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
MmCanFileBeTruncated(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer,
|
|
|
|
_In_opt_ PLARGE_INTEGER NewFileSize);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
BOOLEAN
|
2010-03-13 00:34:48 +00:00
|
|
|
NTAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
MmSetAddressRangeModified(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_ (Length) PVOID Address,
|
|
|
|
_In_ SIZE_T Length);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_NTIFS_)
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
|
2010-03-18 22:45:30 +00:00
|
|
|
#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2010-03-27 15:31:25 +00:00
|
|
|
$if (_WDMDDK_ || _NTIFS_)
|
2010-03-13 00:34:48 +00:00
|
|
|
#if (NTDDI_VERSION >= NTDDI_WINXP)
|
2012-01-13 17:45:26 +00:00
|
|
|
$endif (_WDMDDK_ || _NTIFS_)
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2010-03-27 15:31:25 +00:00
|
|
|
$if (_WDMDDK_)
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmAdvanceMdl(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Inout_ PMDLX Mdl,
|
|
|
|
_In_ ULONG NumberOfBytes);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
|
|
|
_When_ (return != NULL, _Out_writes_bytes_opt_ (NumberOfBytes))
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmAllocateMappingAddress(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ SIZE_T NumberOfBytes,
|
|
|
|
_In_ ULONG PoolTag);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmFreeMappingAddress(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID BaseAddress,
|
|
|
|
_In_ ULONG PoolTag);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmIsVerifierEnabled(
|
2012-01-22 14:43:53 +00:00
|
|
|
_Out_ PULONG VerifierFlags);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Post_writable_byte_size_(MemoryDescriptorList->ByteCount)
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
|
|
|
_At_(MemoryDescriptorList->MappedSystemVa + MemoryDescriptorList->ByteOffset,
|
|
|
|
_Post_writable_byte_size_(MemoryDescriptorList->ByteCount))
|
|
|
|
_Must_inspect_result_
|
|
|
|
_Success_(return != NULL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PVOID
|
|
|
|
NTAPI
|
|
|
|
MmMapLockedPagesWithReservedMapping(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID MappingAddress,
|
|
|
|
_In_ ULONG PoolTag,
|
|
|
|
_Inout_ PMDLX MemoryDescriptorList,
|
|
|
|
_In_ __drv_strictTypeMatch(__drv_typeCond)
|
|
|
|
MEMORY_CACHING_TYPE CacheType);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmProtectMdlSystemAddress(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PMDLX MemoryDescriptorList,
|
|
|
|
_In_ ULONG NewProtect);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_(DISPATCH_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
MmUnmapReservedMapping(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID BaseAddress,
|
|
|
|
_In_ ULONG PoolTag,
|
|
|
|
_Inout_ PMDLX MemoryDescriptorList);
|
2010-03-13 00:34:48 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmAddVerifierThunks(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_reads_bytes_ (ThunkBufferSize) PVOID ThunkBuffer,
|
|
|
|
_In_ ULONG ThunkBufferSize);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_WDMDDK_)
|
|
|
|
$if (_NTIFS_)
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (PASSIVE_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
MmPrefetchPages(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ ULONG NumberOfLists,
|
|
|
|
_In_reads_ (NumberOfLists) PREAD_LIST *ReadLists);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_NTIFS_)
|
|
|
|
|
|
|
|
$if (_WDMDDK_ || _NTIFS_)
|
|
|
|
#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
|
2012-01-13 17:45:26 +00:00
|
|
|
$endif (_WDMDDK_ || _NTIFS_)
|
2010-03-27 15:31:25 +00:00
|
|
|
$if (_WDMDDK_ || _NTDDK_)
|
|
|
|
#if (NTDDI_VERSION >= NTDDI_WS03)
|
2012-01-13 17:45:26 +00:00
|
|
|
$endif (_WDMDDK_ || _NTDDK_)
|
2010-03-23 00:27:32 +00:00
|
|
|
$if (_WDMDDK_)
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (DISPATCH_LEVEL)
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
LOGICAL
|
|
|
|
NTAPI
|
|
|
|
MmIsIoSpaceActive(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS StartAddress,
|
|
|
|
_In_ SIZE_T NumberOfBytes);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_WDMDDK_)
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
|
2010-03-27 15:31:25 +00:00
|
|
|
$if (_NTDDK_)
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmCreateMirror(VOID);
|
|
|
|
$endif (_NTDDK_)
|
|
|
|
$if (_WDMDDK_ || _NTDDK_)
|
|
|
|
#endif /* (NTDDI_VERSION >= NTDDI_WS03) */
|
2012-01-13 17:45:26 +00:00
|
|
|
$endif (_WDMDDK_ || _NTDDK_)
|
2010-03-23 00:27:32 +00:00
|
|
|
$if (_WDMDDK_)
|
2010-03-13 00:34:48 +00:00
|
|
|
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_ (DISPATCH_LEVEL)
|
2010-03-13 00:34:48 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
PMDL
|
|
|
|
NTAPI
|
|
|
|
MmAllocatePagesForMdlEx(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PHYSICAL_ADDRESS LowAddress,
|
|
|
|
_In_ PHYSICAL_ADDRESS HighAddress,
|
|
|
|
_In_ PHYSICAL_ADDRESS SkipBytes,
|
|
|
|
_In_ SIZE_T TotalBytes,
|
|
|
|
_In_ MEMORY_CACHING_TYPE CacheType,
|
|
|
|
_In_ ULONG Flags);
|
2010-03-13 00:34:48 +00:00
|
|
|
#endif
|
2012-01-13 17:45:26 +00:00
|
|
|
$endif (_WDMDDK_)
|
2010-03-13 00:34:48 +00:00
|
|
|
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
2010-03-27 15:31:25 +00:00
|
|
|
$if (_WDMDDK_)
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
2010-03-27 15:31:25 +00:00
|
|
|
NTKERNELAPI
|
|
|
|
LOGICAL
|
|
|
|
NTAPI
|
|
|
|
MmIsDriverVerifyingByAddress(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID AddressWithinSection);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_WDMDDK_)
|
2010-03-23 00:27:32 +00:00
|
|
|
$if (_NTDDK_)
|
2012-01-22 14:43:53 +00:00
|
|
|
_Must_inspect_result_
|
|
|
|
_IRQL_requires_max_(APC_LEVEL)
|
2010-03-23 00:27:32 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
MmRotatePhysicalView(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PVOID VirtualAddress,
|
|
|
|
_Inout_ PSIZE_T NumberOfBytes,
|
|
|
|
_In_opt_ PMDLX NewMdl,
|
|
|
|
_In_ MM_ROTATE_DIRECTION Direction,
|
|
|
|
_In_ PMM_ROTATE_COPY_CALLBACK_FUNCTION CopyFunction,
|
|
|
|
_In_opt_ PVOID Context);
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_NTDDK_)
|
|
|
|
$if (_NTIFS_)
|
2010-03-23 00:27:32 +00:00
|
|
|
|
2012-01-22 14:43:53 +00:00
|
|
|
_IRQL_requires_max_ (APC_LEVEL)
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
NTKERNELAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
ULONG
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
NTAPI
|
2010-03-27 15:31:25 +00:00
|
|
|
MmDoesFileHaveUserWritableReferences(
|
2012-01-22 14:43:53 +00:00
|
|
|
_In_ PSECTION_OBJECT_POINTERS SectionPointer);
|
2013-01-19 21:49:12 +00:00
|
|
|
|
|
|
|
_Must_inspect_result_
|
|
|
|
_At_(*BaseAddress, __drv_allocatesMem(Mem))
|
|
|
|
__kernel_entry
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtAllocateVirtualMemory(
|
|
|
|
_In_ HANDLE ProcessHandle,
|
|
|
|
_Inout_ _Outptr_result_buffer_(*RegionSize) PVOID *BaseAddress,
|
|
|
|
_In_ ULONG_PTR ZeroBits,
|
|
|
|
_Inout_ PSIZE_T RegionSize,
|
|
|
|
_In_ ULONG AllocationType,
|
|
|
|
_In_ ULONG Protect);
|
|
|
|
|
|
|
|
__kernel_entry
|
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtFreeVirtualMemory(
|
|
|
|
_In_ HANDLE ProcessHandle,
|
|
|
|
_Inout_ __drv_freesMem(Mem) PVOID *BaseAddress,
|
|
|
|
_Inout_ PSIZE_T RegionSize,
|
|
|
|
_In_ ULONG FreeType);
|
|
|
|
|
2010-03-27 15:31:25 +00:00
|
|
|
$endif (_NTIFS_)
|
|
|
|
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
|
[DDK]
- Fix PIO_CSQ_INSERT_IRP_EX redefinition.
[NTDDK]
- Remove a couple of duplicate definitions.
[XDK]
- Move several definitions to their appropriate places.
- Add COMPUTE_PAGES_SPANNED, NODE_REQUIREMENT, MM_ANY_NODE_OK, PNTFS_DEREF_EXPORTED_SECURITY_DESCRIPTOR, PsWrapApcWow64Thread, IRP_MN_DEVICE_ENUMERATED, USE_DMA_MACROS, NO_LEGACY_DRIVERS, FO_FLAGS_VALID_ONLY_DURING_CREATE, LOADER_PARTITION_INFORMATION_EX, BOOTDISK_INFORMATION_LITE, IO_CSQ_INSERT_IRP_EX, STATUS_CONTINUE_COMPLETION and several missing Ex*, REG_*, Cm*, Mm*, SL_*, Io*, IO_*, CONNECT_*, WDM_* and WMI* definitions.
- Update ExGetCurrentResourceThread and PADAPTER_OBJECT.
- Group some related definitions.
[WDM]
- Update wdm.h to reflect XDK changes.
svn path=/branches/header-work/; revision=46290
2010-03-20 23:01:57 +00:00
|
|
|
|