1998-09-05 17:34:23 +00:00
|
|
|
#ifndef __INCLUDE_INTERNAL_MM_H
|
|
|
|
#define __INCLUDE_INTERNAL_MM_H
|
1998-08-25 04:27:41 +00:00
|
|
|
|
2001-03-16 18:11:24 +00:00
|
|
|
#include <internal/arch/mm.h>
|
1998-08-25 04:27:41 +00:00
|
|
|
|
1998-09-05 17:34:23 +00:00
|
|
|
/* TYPES *********************************************************************/
|
|
|
|
|
2004-04-22 01:57:49 +00:00
|
|
|
extern ULONG MiFreeSwapPages;
|
|
|
|
extern ULONG MiUsedSwapPages;
|
|
|
|
extern ULONG MmPagedPoolSize;
|
2004-08-08 20:33:17 +00:00
|
|
|
extern ULONG MmTotalPagedPoolQuota;
|
|
|
|
extern ULONG MmTotalNonPagedPoolQuota;
|
2004-04-14 07:11:20 +00:00
|
|
|
|
2000-07-04 08:52:47 +00:00
|
|
|
struct _EPROCESS;
|
2001-12-31 01:53:46 +00:00
|
|
|
struct _MM_RMAP_ENTRY;
|
2005-06-25 17:01:17 +00:00
|
|
|
struct _MM_PAGEOP
|
|
|
|
;
|
2002-05-14 21:19:21 +00:00
|
|
|
typedef ULONG SWAPENTRY;
|
2004-08-01 07:24:59 +00:00
|
|
|
typedef ULONG PFN_TYPE, *PPFN_TYPE;
|
|
|
|
|
2001-01-08 02:14:06 +00:00
|
|
|
#define MEMORY_AREA_INVALID (0)
|
2002-08-10 16:41:20 +00:00
|
|
|
#define MEMORY_AREA_SECTION_VIEW (1)
|
2001-01-08 02:14:06 +00:00
|
|
|
#define MEMORY_AREA_CONTINUOUS_MEMORY (2)
|
|
|
|
#define MEMORY_AREA_NO_CACHE (3)
|
|
|
|
#define MEMORY_AREA_IO_MAPPING (4)
|
|
|
|
#define MEMORY_AREA_SYSTEM (5)
|
|
|
|
#define MEMORY_AREA_MDL_MAPPING (7)
|
|
|
|
#define MEMORY_AREA_VIRTUAL_MEMORY (8)
|
2002-08-10 16:41:20 +00:00
|
|
|
#define MEMORY_AREA_CACHE_SEGMENT (9)
|
|
|
|
#define MEMORY_AREA_SHARED_DATA (10)
|
|
|
|
#define MEMORY_AREA_KERNEL_STACK (11)
|
|
|
|
#define MEMORY_AREA_PAGED_POOL (12)
|
2003-05-17 19:16:39 +00:00
|
|
|
#define MEMORY_AREA_NO_ACCESS (13)
|
2005-04-18 00:42:31 +00:00
|
|
|
#define MEMORY_AREA_PEB_OR_TEB (14)
|
1998-09-05 17:34:23 +00:00
|
|
|
|
2000-05-24 22:29:38 +00:00
|
|
|
#define PAGE_TO_SECTION_PAGE_DIRECTORY_OFFSET(x) \
|
|
|
|
((x) / (4*1024*1024))
|
|
|
|
#define PAGE_TO_SECTION_PAGE_TABLE_OFFSET(x) \
|
|
|
|
((((x)) % (4*1024*1024)) / (4*1024))
|
2000-04-03 21:54:42 +00:00
|
|
|
|
|
|
|
#define NR_SECTION_PAGE_TABLES (1024)
|
|
|
|
#define NR_SECTION_PAGE_ENTRIES (1024)
|
|
|
|
|
2005-06-25 14:04:56 +00:00
|
|
|
#define TEB_BASE (0x7FFDE000)
|
2005-06-25 17:01:17 +00:00
|
|
|
#define KPCR_BASE 0xFF000000
|
2005-06-25 14:04:56 +00:00
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
/* Although Microsoft says this isn't hardcoded anymore,
|
|
|
|
they won't be able to change it. Stuff depends on it */
|
|
|
|
#define MM_VIRTMEM_GRANULARITY (64 * 1024)
|
2004-09-28 19:49:21 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
#define STATUS_MM_RESTART_OPERATION ((NTSTATUS)0xD0000001)
|
2000-12-28 03:38:08 +00:00
|
|
|
|
2001-01-08 02:14:06 +00:00
|
|
|
/*
|
|
|
|
* Additional flags for protection attributes
|
|
|
|
*/
|
|
|
|
#define PAGE_WRITETHROUGH (1024)
|
|
|
|
#define PAGE_SYSTEM (2048)
|
|
|
|
#define PAGE_FLAGS_VALID_FROM_USER_MODE (PAGE_READONLY | \
|
|
|
|
PAGE_READWRITE | \
|
|
|
|
PAGE_WRITECOPY | \
|
|
|
|
PAGE_EXECUTE | \
|
|
|
|
PAGE_EXECUTE_READ | \
|
|
|
|
PAGE_EXECUTE_READWRITE | \
|
|
|
|
PAGE_EXECUTE_WRITECOPY | \
|
|
|
|
PAGE_GUARD | \
|
|
|
|
PAGE_NOACCESS | \
|
|
|
|
PAGE_NOCACHE)
|
|
|
|
|
2004-12-30 08:05:12 +00:00
|
|
|
#define PAGE_IS_READABLE (PAGE_READONLY | \
|
|
|
|
PAGE_READWRITE | \
|
|
|
|
PAGE_WRITECOPY | \
|
|
|
|
PAGE_EXECUTE_READ | \
|
|
|
|
PAGE_EXECUTE_READWRITE | \
|
|
|
|
PAGE_EXECUTE_WRITECOPY)
|
|
|
|
|
|
|
|
#define PAGE_IS_WRITABLE (PAGE_READWRITE | \
|
|
|
|
PAGE_WRITECOPY | \
|
|
|
|
PAGE_EXECUTE_READWRITE | \
|
|
|
|
PAGE_EXECUTE_WRITECOPY)
|
|
|
|
|
|
|
|
#define PAGE_IS_EXECUTABLE (PAGE_EXECUTE | \
|
|
|
|
PAGE_EXECUTE_READ | \
|
|
|
|
PAGE_EXECUTE_READWRITE | \
|
|
|
|
PAGE_EXECUTE_WRITECOPY)
|
|
|
|
|
|
|
|
#define PAGE_IS_WRITECOPY (PAGE_WRITECOPY | \
|
|
|
|
PAGE_EXECUTE_WRITECOPY)
|
|
|
|
|
2000-04-03 21:54:42 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2002-05-14 21:19:21 +00:00
|
|
|
ULONG Entry[NR_SECTION_PAGE_ENTRIES];
|
2000-04-03 21:54:42 +00:00
|
|
|
} SECTION_PAGE_TABLE, *PSECTION_PAGE_TABLE;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
PSECTION_PAGE_TABLE PageTables[NR_SECTION_PAGE_TABLES];
|
|
|
|
} SECTION_PAGE_DIRECTORY, *PSECTION_PAGE_DIRECTORY;
|
|
|
|
|
2002-08-14 20:58:39 +00:00
|
|
|
#define SEC_PHYSICALMEMORY (0x80000000)
|
|
|
|
|
|
|
|
#define MM_PAGEFILE_SEGMENT (0x1)
|
|
|
|
#define MM_DATAFILE_SEGMENT (0x2)
|
2001-02-10 22:51:11 +00:00
|
|
|
|
|
|
|
typedef struct _MM_SECTION_SEGMENT
|
2001-01-12 21:00:08 +00:00
|
|
|
{
|
2004-12-30 08:05:12 +00:00
|
|
|
LONGLONG FileOffset;
|
|
|
|
ULONG_PTR VirtualAddress;
|
2001-02-10 22:51:11 +00:00
|
|
|
ULONG RawLength;
|
2004-12-30 08:05:12 +00:00
|
|
|
ULONG Length;
|
|
|
|
ULONG Protection;
|
2003-06-27 21:28:30 +00:00
|
|
|
FAST_MUTEX Lock;
|
2001-02-10 22:51:11 +00:00
|
|
|
ULONG ReferenceCount;
|
|
|
|
SECTION_PAGE_DIRECTORY PageDirectory;
|
|
|
|
ULONG Flags;
|
|
|
|
ULONG Characteristics;
|
2002-01-01 03:29:16 +00:00
|
|
|
BOOLEAN WriteCopy;
|
2001-02-10 22:51:11 +00:00
|
|
|
} MM_SECTION_SEGMENT, *PMM_SECTION_SEGMENT;
|
2001-01-12 21:00:08 +00:00
|
|
|
|
2003-06-27 21:28:30 +00:00
|
|
|
typedef struct _MM_IMAGE_SECTION_OBJECT
|
1998-08-25 04:27:41 +00:00
|
|
|
{
|
2004-12-30 08:05:12 +00:00
|
|
|
ULONG_PTR ImageBase;
|
|
|
|
ULONG_PTR StackReserve;
|
|
|
|
ULONG_PTR StackCommit;
|
2005-01-02 07:04:56 +00:00
|
|
|
ULONG_PTR EntryPoint;
|
2001-02-10 22:51:11 +00:00
|
|
|
ULONG Subsystem;
|
|
|
|
ULONG ImageCharacteristics;
|
2004-12-30 08:05:12 +00:00
|
|
|
USHORT MinorSubsystemVersion;
|
|
|
|
USHORT MajorSubsystemVersion;
|
2001-02-10 22:51:11 +00:00
|
|
|
USHORT Machine;
|
|
|
|
BOOLEAN Executable;
|
2003-06-27 21:28:30 +00:00
|
|
|
ULONG NrSegments;
|
2004-12-30 08:05:12 +00:00
|
|
|
PMM_SECTION_SEGMENT Segments;
|
2003-06-27 21:28:30 +00:00
|
|
|
} MM_IMAGE_SECTION_OBJECT, *PMM_IMAGE_SECTION_OBJECT;
|
|
|
|
|
|
|
|
typedef struct _SECTION_OBJECT
|
|
|
|
{
|
|
|
|
CSHORT Type;
|
|
|
|
CSHORT Size;
|
|
|
|
LARGE_INTEGER MaximumSize;
|
|
|
|
ULONG SectionPageProtection;
|
|
|
|
ULONG AllocationAttributes;
|
|
|
|
PFILE_OBJECT FileObject;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
PMM_IMAGE_SECTION_OBJECT ImageSection;
|
|
|
|
PMM_SECTION_SEGMENT Segment;
|
|
|
|
};
|
2003-06-01 14:59:02 +00:00
|
|
|
} SECTION_OBJECT;
|
|
|
|
|
2005-01-02 17:55:06 +00:00
|
|
|
typedef struct _MEMORY_AREA
|
1998-09-05 17:34:23 +00:00
|
|
|
{
|
2005-01-02 17:55:06 +00:00
|
|
|
PVOID StartingAddress;
|
|
|
|
PVOID EndingAddress;
|
|
|
|
struct _MEMORY_AREA *Parent;
|
|
|
|
struct _MEMORY_AREA *LeftChild;
|
|
|
|
struct _MEMORY_AREA *RightChild;
|
2002-06-11 22:09:03 +00:00
|
|
|
ULONG Type;
|
|
|
|
ULONG Attributes;
|
|
|
|
ULONG LockCount;
|
|
|
|
BOOLEAN DeleteInProgress;
|
|
|
|
ULONG PageOpCount;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
2003-05-17 15:29:50 +00:00
|
|
|
{
|
2002-06-11 22:09:03 +00:00
|
|
|
SECTION_OBJECT* Section;
|
|
|
|
ULONG ViewOffset;
|
|
|
|
PMM_SECTION_SEGMENT Segment;
|
|
|
|
BOOLEAN WriteCopyView;
|
2002-08-10 16:41:20 +00:00
|
|
|
LIST_ENTRY RegionListHead;
|
2002-06-11 22:09:03 +00:00
|
|
|
} SectionData;
|
|
|
|
struct
|
|
|
|
{
|
2002-08-10 16:41:20 +00:00
|
|
|
LIST_ENTRY RegionListHead;
|
2002-06-11 22:09:03 +00:00
|
|
|
} VirtualMemoryData;
|
|
|
|
} Data;
|
1998-10-05 04:01:30 +00:00
|
|
|
} MEMORY_AREA, *PMEMORY_AREA;
|
1998-09-05 17:34:23 +00:00
|
|
|
|
2005-07-26 14:00:45 +00:00
|
|
|
#ifndef _MMTYPES_H
|
2002-09-08 10:23:54 +00:00
|
|
|
typedef struct _MADDRESS_SPACE
|
|
|
|
{
|
2005-01-02 17:55:06 +00:00
|
|
|
PMEMORY_AREA MemoryAreaRoot;
|
2002-09-08 10:23:54 +00:00
|
|
|
FAST_MUTEX Lock;
|
2005-01-02 01:06:17 +00:00
|
|
|
PVOID LowestAddress;
|
2002-09-08 10:23:54 +00:00
|
|
|
struct _EPROCESS* Process;
|
|
|
|
PUSHORT PageTableRefCountTable;
|
|
|
|
ULONG PageTableRefCountTableSize;
|
|
|
|
} MADDRESS_SPACE, *PMADDRESS_SPACE;
|
2005-07-26 14:00:45 +00:00
|
|
|
#endif
|
2002-09-08 10:23:54 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
ULONG NrTotalPages;
|
|
|
|
ULONG NrSystemPages;
|
|
|
|
ULONG NrReservedPages;
|
|
|
|
ULONG NrUserPages;
|
|
|
|
ULONG NrFreePages;
|
|
|
|
ULONG NrDirtyPages;
|
|
|
|
ULONG NrLockedPages;
|
|
|
|
ULONG PagingRequestsInLastMinute;
|
|
|
|
ULONG PagingRequestsInLastFiveMinutes;
|
|
|
|
ULONG PagingRequestsInLastFifteenMinutes;
|
|
|
|
} MM_STATS;
|
|
|
|
|
|
|
|
extern MM_STATS MmStats;
|
|
|
|
|
|
|
|
#define MM_PHYSICAL_PAGE_MPW_PENDING (0x8)
|
|
|
|
|
2005-06-19 07:41:35 +00:00
|
|
|
#define MM_CORE_DUMP_TYPE_NONE (0x0)
|
|
|
|
#define MM_CORE_DUMP_TYPE_MINIMAL (0x1)
|
|
|
|
#define MM_CORE_DUMP_TYPE_FULL (0x2)
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
#define MM_PAGEOP_PAGEIN (1)
|
|
|
|
#define MM_PAGEOP_PAGEOUT (2)
|
|
|
|
#define MM_PAGEOP_PAGESYNCH (3)
|
|
|
|
#define MM_PAGEOP_ACCESSFAULT (4)
|
|
|
|
|
|
|
|
typedef struct _MM_PAGEOP
|
|
|
|
{
|
|
|
|
/* Type of operation. */
|
2005-05-09 01:38:29 +00:00
|
|
|
ULONG OpType;
|
2004-08-01 07:24:59 +00:00
|
|
|
/* Number of threads interested in this operation. */
|
|
|
|
ULONG ReferenceCount;
|
|
|
|
/* Event that will be set when the operation is completed. */
|
|
|
|
KEVENT CompletionEvent;
|
|
|
|
/* Status of the operation once it is completed. */
|
|
|
|
NTSTATUS Status;
|
|
|
|
/* TRUE if the operation was abandoned. */
|
|
|
|
BOOLEAN Abandoned;
|
|
|
|
/* The memory area to be affected by the operation. */
|
|
|
|
PMEMORY_AREA MArea;
|
|
|
|
ULONG Hash;
|
|
|
|
struct _MM_PAGEOP* Next;
|
|
|
|
struct _ETHREAD* Thread;
|
2005-05-09 01:38:29 +00:00
|
|
|
/*
|
2004-08-01 07:24:59 +00:00
|
|
|
* These fields are used to identify the operation if it is against a
|
|
|
|
* virtual memory area.
|
|
|
|
*/
|
2005-01-26 00:03:05 +00:00
|
|
|
HANDLE Pid;
|
2004-08-01 07:24:59 +00:00
|
|
|
PVOID Address;
|
|
|
|
/*
|
|
|
|
* These fields are used to identify the operation if it is against a
|
|
|
|
* section mapping.
|
|
|
|
*/
|
|
|
|
PMM_SECTION_SEGMENT Segment;
|
|
|
|
ULONG Offset;
|
|
|
|
} MM_PAGEOP, *PMM_PAGEOP;
|
|
|
|
|
|
|
|
#define MC_CACHE (0)
|
|
|
|
#define MC_USER (1)
|
|
|
|
#define MC_PPOOL (2)
|
|
|
|
#define MC_NPPOOL (3)
|
|
|
|
#define MC_MAXIMUM (4)
|
|
|
|
|
|
|
|
typedef struct _MM_MEMORY_CONSUMER
|
|
|
|
{
|
|
|
|
ULONG PagesUsed;
|
|
|
|
ULONG PagesTarget;
|
|
|
|
NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed);
|
|
|
|
}
|
|
|
|
MM_MEMORY_CONSUMER, *PMM_MEMORY_CONSUMER;
|
|
|
|
|
|
|
|
extern MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM];
|
|
|
|
|
|
|
|
extern PHYSICAL_ADDRESS MmSharedDataPagePhysicalAddress;
|
|
|
|
struct _KTRAP_FRAME;
|
|
|
|
|
|
|
|
typedef VOID (*PMM_ALTER_REGION_FUNC)(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PVOID BaseAddress, ULONG Length,
|
|
|
|
ULONG OldType, ULONG OldProtect,
|
|
|
|
ULONG NewType, ULONG NewProtect);
|
|
|
|
|
|
|
|
typedef struct _MM_REGION
|
|
|
|
{
|
|
|
|
ULONG Type;
|
|
|
|
ULONG Protect;
|
|
|
|
ULONG Length;
|
|
|
|
LIST_ENTRY RegionListEntry;
|
|
|
|
} MM_REGION, *PMM_REGION;
|
2003-05-17 19:16:39 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
typedef VOID (*PMM_FREE_PAGE_FUNC)(PVOID Context, PMEMORY_AREA MemoryArea,
|
2005-01-02 17:55:06 +00:00
|
|
|
PVOID Address, PFN_TYPE Page,
|
|
|
|
SWAPENTRY SwapEntry, BOOLEAN Dirty);
|
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
PVOID STDCALL ExAllocateNonPagedPoolWithTag (POOL_TYPE type,
|
|
|
|
ULONG size,
|
|
|
|
ULONG Tag,
|
|
|
|
PVOID Caller);
|
|
|
|
|
|
|
|
PVOID STDCALL ExAllocatePagedPoolWithTag (POOL_TYPE Type,
|
|
|
|
ULONG size,
|
|
|
|
ULONG Tag);
|
|
|
|
VOID STDCALL ExFreeNonPagedPool (PVOID block);
|
|
|
|
|
|
|
|
VOID STDCALL
|
|
|
|
ExFreePagedPool(IN PVOID Block);
|
|
|
|
VOID MmInitializePagedPool(VOID);
|
|
|
|
|
|
|
|
PVOID
|
|
|
|
STDCALL
|
|
|
|
MiAllocateSpecialPool (IN POOL_TYPE PoolType,
|
|
|
|
IN SIZE_T NumberOfBytes,
|
|
|
|
IN ULONG Tag,
|
|
|
|
IN ULONG Underrun
|
|
|
|
);
|
|
|
|
|
|
|
|
extern PVOID MmPagedPoolBase;
|
|
|
|
extern ULONG MmPagedPoolSize;
|
|
|
|
|
2005-08-01 11:33:15 +00:00
|
|
|
#define PAGED_POOL_MASK 1
|
2005-08-01 11:46:30 +00:00
|
|
|
#define MUST_SUCCEED_POOL_MASK 2
|
2005-08-01 11:33:15 +00:00
|
|
|
#define CACHE_ALIGNED_POOL_MASK 4
|
|
|
|
#define QUOTA_POOL_MASK 8
|
|
|
|
#define SESSION_POOL_MASK 32
|
|
|
|
#define VERIFIER_POOL_MASK 64
|
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
#define MM_PAGED_POOL_SIZE (100*1024*1024)
|
|
|
|
#define MM_NONPAGED_POOL_SIZE (100*1024*1024)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Paged and non-paged pools are 8-byte aligned
|
|
|
|
*/
|
|
|
|
#define MM_POOL_ALIGNMENT 8
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Maximum size of the kmalloc area (this is totally arbitary)
|
|
|
|
*/
|
|
|
|
#define MM_KERNEL_MAP_SIZE (16*1024*1024)
|
|
|
|
#define MM_KERNEL_MAP_BASE (0xf0c00000)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FIXME - different architectures have different cache line sizes...
|
|
|
|
*/
|
|
|
|
#define MM_CACHE_LINE_SIZE 32
|
|
|
|
|
|
|
|
#define MM_ROUND_UP(x,s) ((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1)))
|
|
|
|
#define MM_ROUND_DOWN(x,s) ((PVOID)(((ULONG_PTR)(x)) & ~((ULONG_PTR)(s)-1)))
|
|
|
|
|
2000-03-19 09:14:52 +00:00
|
|
|
/* FUNCTIONS */
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* aspace.c ******************************************************************/
|
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
VOID MmLockAddressSpace(PMADDRESS_SPACE AddressSpace);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
VOID MmUnlockAddressSpace(PMADDRESS_SPACE AddressSpace);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
VOID MmInitializeKernelAddressSpace(VOID);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
PMADDRESS_SPACE MmGetCurrentAddressSpace(VOID);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
PMADDRESS_SPACE MmGetKernelAddressSpace(VOID);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
NTSTATUS MmInitializeAddressSpace(struct _EPROCESS* Process,
|
|
|
|
PMADDRESS_SPACE AddressSpace);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
NTSTATUS MmDestroyAddressSpace(PMADDRESS_SPACE AddressSpace);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
/* marea.c *******************************************************************/
|
|
|
|
|
2005-06-25 17:01:17 +00:00
|
|
|
NTSTATUS
|
2005-01-02 17:55:06 +00:00
|
|
|
MmInitMemoryAreas(VOID);
|
|
|
|
|
|
|
|
NTSTATUS STDCALL
|
|
|
|
MmCreateMemoryArea(
|
|
|
|
struct _EPROCESS* Process,
|
|
|
|
PMADDRESS_SPACE AddressSpace,
|
|
|
|
ULONG Type,
|
|
|
|
PVOID *BaseAddress,
|
|
|
|
ULONG_PTR Length,
|
|
|
|
ULONG Attributes,
|
|
|
|
PMEMORY_AREA *Result,
|
|
|
|
BOOLEAN FixedAddress,
|
|
|
|
BOOLEAN TopDown,
|
|
|
|
PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL);
|
|
|
|
|
|
|
|
PMEMORY_AREA STDCALL
|
2005-01-02 19:14:52 +00:00
|
|
|
MmLocateMemoryAreaByAddress(
|
2005-05-09 01:38:29 +00:00
|
|
|
PMADDRESS_SPACE AddressSpace,
|
2005-01-02 17:55:06 +00:00
|
|
|
PVOID Address);
|
|
|
|
|
2005-01-02 19:14:52 +00:00
|
|
|
ULONG_PTR STDCALL
|
2005-01-02 17:55:06 +00:00
|
|
|
MmFindGapAtAddress(
|
2005-05-09 01:38:29 +00:00
|
|
|
PMADDRESS_SPACE AddressSpace,
|
2005-01-02 17:55:06 +00:00
|
|
|
PVOID Address);
|
|
|
|
|
|
|
|
NTSTATUS STDCALL
|
|
|
|
MmFreeMemoryArea(
|
|
|
|
PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MemoryArea,
|
|
|
|
PMM_FREE_PAGE_FUNC FreePage,
|
|
|
|
PVOID FreePageContext);
|
|
|
|
|
|
|
|
NTSTATUS STDCALL
|
|
|
|
MmFreeMemoryAreaByPtr(
|
|
|
|
PMADDRESS_SPACE AddressSpace,
|
|
|
|
PVOID BaseAddress,
|
|
|
|
PMM_FREE_PAGE_FUNC FreePage,
|
|
|
|
PVOID FreePageContext);
|
|
|
|
|
|
|
|
VOID STDCALL
|
|
|
|
MmDumpMemoryAreas(PMADDRESS_SPACE AddressSpace);
|
|
|
|
|
|
|
|
PMEMORY_AREA STDCALL
|
2005-01-02 19:14:52 +00:00
|
|
|
MmLocateMemoryAreaByRegion(
|
2005-05-09 01:38:29 +00:00
|
|
|
PMADDRESS_SPACE AddressSpace,
|
2005-01-02 17:55:06 +00:00
|
|
|
PVOID Address,
|
|
|
|
ULONG_PTR Length);
|
|
|
|
|
|
|
|
PVOID STDCALL
|
|
|
|
MmFindGap(
|
|
|
|
PMADDRESS_SPACE AddressSpace,
|
|
|
|
ULONG_PTR Length,
|
|
|
|
ULONG_PTR Granularity,
|
|
|
|
BOOLEAN TopDown);
|
|
|
|
|
|
|
|
VOID STDCALL
|
|
|
|
MmReleaseMemoryAreaIfDecommitted(
|
|
|
|
PEPROCESS Process,
|
|
|
|
PMADDRESS_SPACE AddressSpace,
|
|
|
|
PVOID BaseAddress);
|
2004-10-01 20:26:05 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* npool.c *******************************************************************/
|
|
|
|
|
|
|
|
VOID MiDebugDumpNonPagedPool(BOOLEAN NewOnly);
|
|
|
|
|
|
|
|
VOID MiDebugDumpNonPagedPoolStats(BOOLEAN NewOnly);
|
|
|
|
|
|
|
|
VOID MiInitializeNonPagedPool(VOID);
|
1999-12-02 20:53:55 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
PVOID MmGetMdlPageAddress(PMDL Mdl, PVOID Offset);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2004-08-08 20:33:17 +00:00
|
|
|
/* pool.c *******************************************************************/
|
|
|
|
|
|
|
|
BOOLEAN
|
|
|
|
STDCALL
|
|
|
|
MiRaisePoolQuota(
|
|
|
|
IN POOL_TYPE PoolType,
|
|
|
|
IN ULONG CurrentMaxQuota,
|
|
|
|
OUT PULONG NewMaxQuota
|
|
|
|
);
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* mdl.c *********************************************************************/
|
|
|
|
|
|
|
|
VOID MmBuildMdlFromPages(PMDL Mdl, PULONG Pages);
|
|
|
|
|
|
|
|
/* mminit.c ******************************************************************/
|
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
VOID MiShutdownMemoryManager(VOID);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
VOID MmInit1(ULONG_PTR FirstKernelPhysAddress,
|
2005-01-12 10:05:31 +00:00
|
|
|
ULONG_PTR LastKernelPhysAddress,
|
|
|
|
ULONG_PTR LastKernelAddress,
|
2004-08-01 07:24:59 +00:00
|
|
|
PADDRESS_RANGE BIOSMemoryMap,
|
|
|
|
ULONG AddressRangeCount,
|
|
|
|
ULONG MaxMemInMeg);
|
|
|
|
|
|
|
|
VOID MmInit2(VOID);
|
|
|
|
|
|
|
|
VOID MmInit3(VOID);
|
|
|
|
|
|
|
|
VOID MiFreeInitMemory(VOID);
|
|
|
|
|
|
|
|
VOID MmInitializeMdlImplementation(VOID);
|
|
|
|
|
|
|
|
/* pagefile.c ****************************************************************/
|
|
|
|
|
|
|
|
SWAPENTRY MmAllocSwapPage(VOID);
|
|
|
|
|
|
|
|
VOID MmDereserveSwapPages(ULONG Nr);
|
|
|
|
|
|
|
|
VOID MmFreeSwapPage(SWAPENTRY Entry);
|
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
VOID MmInitPagingFile(VOID);
|
1999-11-25 10:47:58 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page);
|
|
|
|
|
|
|
|
BOOLEAN MmReserveSwapPages(ULONG Nr);
|
|
|
|
|
|
|
|
NTSTATUS MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS STDCALL
|
2004-08-01 07:24:59 +00:00
|
|
|
MmDumpToPagingFile(ULONG BugCode,
|
|
|
|
ULONG BugCodeParameter1,
|
|
|
|
ULONG BugCodeParameter2,
|
|
|
|
ULONG BugCodeParameter3,
|
|
|
|
ULONG BugCodeParameter4,
|
|
|
|
struct _KTRAP_FRAME* TrapFrame);
|
|
|
|
|
|
|
|
BOOLEAN MmIsAvailableSwapPage(VOID);
|
|
|
|
|
|
|
|
VOID MmShowOutOfSpaceMessagePagingFile(VOID);
|
|
|
|
|
2005-04-18 00:42:31 +00:00
|
|
|
/* process.c ****************************************************************/
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
STDCALL
|
|
|
|
MmCreateProcessAddressSpace(IN struct _EPROCESS* Process,
|
|
|
|
IN PSECTION_OBJECT Section OPTIONAL);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-18 00:42:31 +00:00
|
|
|
NTSTATUS
|
|
|
|
STDCALL
|
|
|
|
MmCreatePeb(PEPROCESS Process);
|
|
|
|
|
2005-04-22 13:17:35 +00:00
|
|
|
struct _TEB*
|
2005-04-22 12:52:25 +00:00
|
|
|
STDCALL
|
|
|
|
MmCreateTeb(PEPROCESS Process,
|
|
|
|
PCLIENT_ID ClientId,
|
|
|
|
PINITIAL_TEB InitialTeb);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2005-04-22 12:52:25 +00:00
|
|
|
VOID
|
|
|
|
STDCALL
|
|
|
|
MmDeleteTeb(PEPROCESS Process,
|
2005-04-22 13:17:35 +00:00
|
|
|
struct _TEB* Teb);
|
2005-04-22 12:52:25 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* i386/pfault.c *************************************************************/
|
2000-04-02 13:32:43 +00:00
|
|
|
|
2000-04-07 02:24:03 +00:00
|
|
|
NTSTATUS MmPageFault(ULONG Cs,
|
|
|
|
PULONG Eip,
|
|
|
|
PULONG Eax,
|
|
|
|
ULONG Cr2,
|
|
|
|
ULONG ErrorCode);
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* mm.c **********************************************************************/
|
2000-04-07 02:24:03 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmAccessFault(KPROCESSOR_MODE Mode,
|
2005-01-12 10:05:31 +00:00
|
|
|
ULONG_PTR Address,
|
2004-08-01 07:24:59 +00:00
|
|
|
BOOLEAN FromMdl);
|
2000-07-04 08:52:47 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmNotPresentFault(KPROCESSOR_MODE Mode,
|
2005-01-12 10:05:31 +00:00
|
|
|
ULONG_PTR Address,
|
2004-08-01 07:24:59 +00:00
|
|
|
BOOLEAN FromMdl);
|
2000-07-04 08:52:47 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* anonmem.c *****************************************************************/
|
2000-07-06 14:34:52 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmNotPresentFaultVirtualMemory(PMADDRESS_SPACE AddressSpace,
|
2005-05-09 01:38:29 +00:00
|
|
|
MEMORY_AREA* MemoryArea,
|
2004-08-01 07:24:59 +00:00
|
|
|
PVOID Address,
|
|
|
|
BOOLEAN Locked);
|
2000-07-07 10:30:57 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MemoryArea,
|
|
|
|
PVOID Address,
|
|
|
|
struct _MM_PAGEOP* PageOp);
|
|
|
|
NTSTATUS STDCALL
|
|
|
|
MmQueryAnonMem(PMEMORY_AREA MemoryArea,
|
|
|
|
PVOID Address,
|
|
|
|
PMEMORY_BASIC_INFORMATION Info,
|
|
|
|
PULONG ResultLength);
|
2000-07-07 10:30:57 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmFreeVirtualMemory(struct _EPROCESS* Process, PMEMORY_AREA MemoryArea);
|
2002-05-14 21:19:21 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmProtectAnonMem(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MemoryArea,
|
|
|
|
PVOID BaseAddress,
|
|
|
|
ULONG Length,
|
|
|
|
ULONG Protect,
|
|
|
|
PULONG OldProtect);
|
2000-07-07 10:30:57 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmWritePageVirtualMemory(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MArea,
|
|
|
|
PVOID Address,
|
|
|
|
PMM_PAGEOP PageOp);
|
2002-05-13 18:10:41 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* kmap.c ********************************************************************/
|
2001-02-16 18:32:20 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
PVOID ExAllocatePage(VOID);
|
2001-03-13 16:25:55 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID ExUnmapPage(PVOID Addr);
|
|
|
|
|
|
|
|
PVOID ExAllocatePageWithPhysPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
NTSTATUS MiCopyFromUserPage(PFN_TYPE Page, PVOID SourceAddress);
|
|
|
|
|
|
|
|
NTSTATUS MiZeroPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
/* memsafe.s *****************************************************************/
|
|
|
|
|
2005-02-22 01:07:41 +00:00
|
|
|
PVOID FASTCALL MmSafeReadPtr(PVOID Source);
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* pageop.c ******************************************************************/
|
2002-05-14 21:19:21 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
MmReleasePageOp(PMM_PAGEOP PageOp);
|
2002-05-13 18:10:41 +00:00
|
|
|
|
|
|
|
PMM_PAGEOP
|
2005-01-26 00:03:05 +00:00
|
|
|
MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address,
|
2004-03-05 11:31:59 +00:00
|
|
|
PMM_SECTION_SEGMENT Segment, ULONG Offset, ULONG OpType, BOOL First);
|
2003-01-11 15:26:59 +00:00
|
|
|
PMM_PAGEOP
|
2005-01-26 00:03:05 +00:00
|
|
|
MmCheckForPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address,
|
2003-01-11 15:26:59 +00:00
|
|
|
PMM_SECTION_SEGMENT Segment, ULONG Offset);
|
|
|
|
VOID
|
|
|
|
MmInitializePageOp(VOID);
|
2001-03-09 14:40:28 +00:00
|
|
|
|
2005-04-18 00:42:31 +00:00
|
|
|
/* process.c *****************************************************************/
|
|
|
|
|
|
|
|
PVOID
|
|
|
|
STDCALL
|
|
|
|
MmCreateKernelStack(BOOLEAN GuiStack);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
STDCALL
|
2005-05-09 01:38:29 +00:00
|
|
|
MmDeleteKernelStack(PVOID Stack,
|
2005-04-18 00:42:31 +00:00
|
|
|
BOOLEAN GuiStack);
|
2005-05-09 01:38:29 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* balace.c ******************************************************************/
|
2003-06-27 21:28:30 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
VOID MmInitializeMemoryConsumer(ULONG Consumer,
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed));
|
2001-03-06 14:41:18 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages);
|
2001-03-13 16:25:55 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmReleasePageMemoryConsumer(ULONG Consumer, PFN_TYPE Page);
|
|
|
|
|
|
|
|
NTSTATUS MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN MyWait, PPFN_TYPE AllocatedPage);
|
|
|
|
|
|
|
|
VOID MiInitBalancerThread(VOID);
|
|
|
|
|
|
|
|
VOID MmRebalanceMemoryConsumers(VOID);
|
|
|
|
|
|
|
|
/* rmap.c **************************************************************/
|
|
|
|
|
|
|
|
VOID MmSetRmapListHeadPage(PFN_TYPE Page, struct _MM_RMAP_ENTRY* ListHead);
|
|
|
|
|
|
|
|
struct _MM_RMAP_ENTRY* MmGetRmapListHeadPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmInsertRmap(PFN_TYPE Page, PEPROCESS Process, PVOID Address);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
VOID MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context,
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID (*DeleteMapping)(PVOID Context, PEPROCESS Process, PVOID Address));
|
|
|
|
|
|
|
|
VOID MmDeleteRmap(PFN_TYPE Page, PEPROCESS Process, PVOID Address);
|
|
|
|
|
|
|
|
VOID MmInitializeRmapList(VOID);
|
|
|
|
|
|
|
|
VOID MmSetCleanAllRmaps(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmSetDirtyAllRmaps(PFN_TYPE Page);
|
|
|
|
|
|
|
|
BOOL MmIsDirtyPageRmap(PFN_TYPE Page);
|
|
|
|
|
|
|
|
NTSTATUS MmWritePagePhysicalAddress(PFN_TYPE Page);
|
|
|
|
|
|
|
|
NTSTATUS MmPageOutPhysicalAddress(PFN_TYPE Page);
|
|
|
|
|
|
|
|
/* freelist.c **********************************************************/
|
|
|
|
|
|
|
|
PFN_TYPE MmGetLRUNextUserPage(PFN_TYPE PreviousPage);
|
|
|
|
|
|
|
|
PFN_TYPE MmGetLRUFirstUserPage(VOID);
|
|
|
|
|
|
|
|
VOID MmSetLRULastPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmLockPage(PFN_TYPE Page);
|
2005-03-15 22:07:05 +00:00
|
|
|
VOID MmLockPageUnsafe(PFN_TYPE Page);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
VOID MmUnlockPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
ULONG MmGetLockCountPage(PFN_TYPE Page);
|
|
|
|
|
2005-01-12 10:05:31 +00:00
|
|
|
PVOID MmInitializePageList(ULONG_PTR FirstPhysKernelAddress,
|
|
|
|
ULONG_PTR LastPhysKernelAddress,
|
2004-08-01 07:24:59 +00:00
|
|
|
ULONG MemorySizeInPages,
|
2005-01-12 10:05:31 +00:00
|
|
|
ULONG_PTR LastKernelBase,
|
2004-08-01 07:24:59 +00:00
|
|
|
PADDRESS_RANGE BIOSMemoryMap,
|
|
|
|
ULONG AddressRangeCount);
|
|
|
|
|
|
|
|
PFN_TYPE MmGetContinuousPages(ULONG NumberOfBytes,
|
|
|
|
PHYSICAL_ADDRESS LowestAcceptableAddress,
|
|
|
|
PHYSICAL_ADDRESS HighestAcceptableAddress,
|
2005-08-07 23:07:17 +00:00
|
|
|
PHYSICAL_ADDRESS BoundaryAddressMultiple);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
NTSTATUS MmInitZeroPageThread(VOID);
|
|
|
|
|
|
|
|
/* i386/page.c *********************************************************/
|
|
|
|
|
2005-01-25 22:50:47 +00:00
|
|
|
PVOID MmCreateHyperspaceMapping(PFN_TYPE Page);
|
|
|
|
|
|
|
|
PFN_TYPE MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE Page);
|
|
|
|
|
|
|
|
PFN_TYPE MmDeleteHyperspaceMapping(PVOID Address);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS MmCreateVirtualMappingForKernel(PVOID Address,
|
2004-08-01 07:24:59 +00:00
|
|
|
ULONG flProtect,
|
|
|
|
PPFN_TYPE Pages,
|
|
|
|
ULONG PageCount);
|
2001-04-04 22:21:32 +00:00
|
|
|
|
2004-02-15 19:03:29 +00:00
|
|
|
NTSTATUS MmCommitPagedPoolAddress(PVOID Address, BOOLEAN Locked);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/ke/i386/exp.c (KiDoubleFaultHandler): Print CR3
correctly.
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/include/internal/ps.h: Added KTHREAD_STACK_LIMIT definition.
* ntoskrnl/ke/i386/tskswitch.S (Ki386ContextSwitch): Force all the
pages of the kernel stack to be accessible from this process.
2002-06-04 David Welch <welch@cwcom.net>
* ntoskrnl/cc/view.c (ReadCacheSegmentChain): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcRosCreateCacheSegment): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcFreeCachePage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/ps.h (KPROCESS): Changed type of
page directory base to PHYSICAL_ADDRESS.
* ntoskrnl/include/internal/i386/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeFreeStackPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeInitializeThread): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/process.c (KeAttachProcess, KeDetachProcess): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kernel.c (PcrPages, KeApplicationProcessorInit): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MM_ALLOCATION_REQUEST): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmReleasePageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmRequestPageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmFreeContinuousPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmAllocateContinuousAlignedMemory): Changes to
use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/freelist.c (MmTransferOwnershipPage,
MmGetLRUFirstUserPage, MmGetLRUNextUserPage, MmGetContinuousPages,
MmInitializePageList, MmSetFlagsPage, MmSetRmapListHeadPage,
MmGetRmapListHeadPage, MmMarkPageMapped, MmMarkPageUnmapped,
MmGetFlagsPage, MmSetSavedSwapEntryPage, MmGetSavedSwapEntryPage,
MmReferencePage, MmGetReferenceCountPage, MmIsUsablePage,
MmDereferencePage, MmGetLockCountPage, MmLockPage, MmUnlockPage,
MmAllocPage): Changes to use PHYSICAL_ADDRESS type for physical
addresses.
* ntoskrnl/mm/iospace.c (MmMapIoSpace): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/kmap.c (ExAllocatePage, MiZeroPage, MiCopyFromUserPage,
ExAllocatePageWithPhysPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/marea.c (MmFreeMemoryArea): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mdl.c (MmUnlockPages, MmMapLockedPages,
MmProbeAndLockPages): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/mm.c (MmSharedDataPagePhysicalAddress,
MmCommitPagedPoolAddress, MmNotPresentFault): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mminit.c (MmInitVirtualMemory): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/ncache.c (MmAllocateNonCachedMemory,
MmFreeNonCachedPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/npool.c (grow_kernel_pool): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/rmap.c (MmPageOutPhysicalAddress, MmInsertRmap,
MmDeleteAllRmaps, MmDeleteRmap): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/section.c (MiReadPage, MmNotPresentFaultSectionView,
MmAccessFaultSectionView, MmPageOutDeleteMapping,
MmPageOutSectionView, MmFreeSectionPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/slab.c (ExGrowSlabCache): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/virtual.c (MmPageOutVirtualMemory,
MmNotPresentFaultVirtualMemory, MmFreeVirtualMemoryPage): Changes to
use PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/wset.c (MmTrimUserMemory): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/page.c (Mmi386ReleaseMmInfo, MmCopyMmInfo,
MmGetPhysicalAddressForProcess, MmCreateVirtualMapping,
MmCreateVirtualMappingUnsafe, MmCreateVirtualMappingForProcess,
MmDeleteVirtualMapping): Changes to use PHYSICAL_ADDRESS type for
physical address.
* ntoskrnl/ps/process (PsInitProcessManagment): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/ps/thread.c (PsAllocateCallbackStack): Changes to use
PHYSICAL_ADDRESS type for physical address.
2002-06-04 David Welch <welch@cwcom.net>
* Lots of change since the ChangeLog was last updated.
svn path=/trunk/; revision=3000
2002-06-04 15:26:58 +00:00
|
|
|
NTSTATUS MmCreateVirtualMapping(struct _EPROCESS* Process,
|
2005-05-09 01:38:29 +00:00
|
|
|
PVOID Address,
|
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/ke/i386/exp.c (KiDoubleFaultHandler): Print CR3
correctly.
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/include/internal/ps.h: Added KTHREAD_STACK_LIMIT definition.
* ntoskrnl/ke/i386/tskswitch.S (Ki386ContextSwitch): Force all the
pages of the kernel stack to be accessible from this process.
2002-06-04 David Welch <welch@cwcom.net>
* ntoskrnl/cc/view.c (ReadCacheSegmentChain): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcRosCreateCacheSegment): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcFreeCachePage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/ps.h (KPROCESS): Changed type of
page directory base to PHYSICAL_ADDRESS.
* ntoskrnl/include/internal/i386/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeFreeStackPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeInitializeThread): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/process.c (KeAttachProcess, KeDetachProcess): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kernel.c (PcrPages, KeApplicationProcessorInit): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MM_ALLOCATION_REQUEST): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmReleasePageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmRequestPageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmFreeContinuousPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmAllocateContinuousAlignedMemory): Changes to
use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/freelist.c (MmTransferOwnershipPage,
MmGetLRUFirstUserPage, MmGetLRUNextUserPage, MmGetContinuousPages,
MmInitializePageList, MmSetFlagsPage, MmSetRmapListHeadPage,
MmGetRmapListHeadPage, MmMarkPageMapped, MmMarkPageUnmapped,
MmGetFlagsPage, MmSetSavedSwapEntryPage, MmGetSavedSwapEntryPage,
MmReferencePage, MmGetReferenceCountPage, MmIsUsablePage,
MmDereferencePage, MmGetLockCountPage, MmLockPage, MmUnlockPage,
MmAllocPage): Changes to use PHYSICAL_ADDRESS type for physical
addresses.
* ntoskrnl/mm/iospace.c (MmMapIoSpace): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/kmap.c (ExAllocatePage, MiZeroPage, MiCopyFromUserPage,
ExAllocatePageWithPhysPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/marea.c (MmFreeMemoryArea): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mdl.c (MmUnlockPages, MmMapLockedPages,
MmProbeAndLockPages): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/mm.c (MmSharedDataPagePhysicalAddress,
MmCommitPagedPoolAddress, MmNotPresentFault): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mminit.c (MmInitVirtualMemory): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/ncache.c (MmAllocateNonCachedMemory,
MmFreeNonCachedPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/npool.c (grow_kernel_pool): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/rmap.c (MmPageOutPhysicalAddress, MmInsertRmap,
MmDeleteAllRmaps, MmDeleteRmap): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/section.c (MiReadPage, MmNotPresentFaultSectionView,
MmAccessFaultSectionView, MmPageOutDeleteMapping,
MmPageOutSectionView, MmFreeSectionPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/slab.c (ExGrowSlabCache): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/virtual.c (MmPageOutVirtualMemory,
MmNotPresentFaultVirtualMemory, MmFreeVirtualMemoryPage): Changes to
use PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/wset.c (MmTrimUserMemory): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/page.c (Mmi386ReleaseMmInfo, MmCopyMmInfo,
MmGetPhysicalAddressForProcess, MmCreateVirtualMapping,
MmCreateVirtualMappingUnsafe, MmCreateVirtualMappingForProcess,
MmDeleteVirtualMapping): Changes to use PHYSICAL_ADDRESS type for
physical address.
* ntoskrnl/ps/process (PsInitProcessManagment): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/ps/thread.c (PsAllocateCallbackStack): Changes to use
PHYSICAL_ADDRESS type for physical address.
2002-06-04 David Welch <welch@cwcom.net>
* Lots of change since the ChangeLog was last updated.
svn path=/trunk/; revision=3000
2002-06-04 15:26:58 +00:00
|
|
|
ULONG flProtect,
|
2004-08-01 07:24:59 +00:00
|
|
|
PPFN_TYPE Pages,
|
|
|
|
ULONG PageCount);
|
|
|
|
|
|
|
|
NTSTATUS MmCreateVirtualMappingUnsafe(struct _EPROCESS* Process,
|
2005-05-09 01:38:29 +00:00
|
|
|
PVOID Address,
|
2004-08-01 07:24:59 +00:00
|
|
|
ULONG flProtect,
|
|
|
|
PPFN_TYPE Pages,
|
|
|
|
ULONG PageCount);
|
|
|
|
|
|
|
|
ULONG MmGetPageProtect(struct _EPROCESS* Process, PVOID Address);
|
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/ke/i386/exp.c (KiDoubleFaultHandler): Print CR3
correctly.
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/include/internal/ps.h: Added KTHREAD_STACK_LIMIT definition.
* ntoskrnl/ke/i386/tskswitch.S (Ki386ContextSwitch): Force all the
pages of the kernel stack to be accessible from this process.
2002-06-04 David Welch <welch@cwcom.net>
* ntoskrnl/cc/view.c (ReadCacheSegmentChain): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcRosCreateCacheSegment): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcFreeCachePage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/ps.h (KPROCESS): Changed type of
page directory base to PHYSICAL_ADDRESS.
* ntoskrnl/include/internal/i386/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeFreeStackPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeInitializeThread): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/process.c (KeAttachProcess, KeDetachProcess): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kernel.c (PcrPages, KeApplicationProcessorInit): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MM_ALLOCATION_REQUEST): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmReleasePageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmRequestPageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmFreeContinuousPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmAllocateContinuousAlignedMemory): Changes to
use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/freelist.c (MmTransferOwnershipPage,
MmGetLRUFirstUserPage, MmGetLRUNextUserPage, MmGetContinuousPages,
MmInitializePageList, MmSetFlagsPage, MmSetRmapListHeadPage,
MmGetRmapListHeadPage, MmMarkPageMapped, MmMarkPageUnmapped,
MmGetFlagsPage, MmSetSavedSwapEntryPage, MmGetSavedSwapEntryPage,
MmReferencePage, MmGetReferenceCountPage, MmIsUsablePage,
MmDereferencePage, MmGetLockCountPage, MmLockPage, MmUnlockPage,
MmAllocPage): Changes to use PHYSICAL_ADDRESS type for physical
addresses.
* ntoskrnl/mm/iospace.c (MmMapIoSpace): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/kmap.c (ExAllocatePage, MiZeroPage, MiCopyFromUserPage,
ExAllocatePageWithPhysPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/marea.c (MmFreeMemoryArea): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mdl.c (MmUnlockPages, MmMapLockedPages,
MmProbeAndLockPages): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/mm.c (MmSharedDataPagePhysicalAddress,
MmCommitPagedPoolAddress, MmNotPresentFault): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mminit.c (MmInitVirtualMemory): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/ncache.c (MmAllocateNonCachedMemory,
MmFreeNonCachedPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/npool.c (grow_kernel_pool): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/rmap.c (MmPageOutPhysicalAddress, MmInsertRmap,
MmDeleteAllRmaps, MmDeleteRmap): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/section.c (MiReadPage, MmNotPresentFaultSectionView,
MmAccessFaultSectionView, MmPageOutDeleteMapping,
MmPageOutSectionView, MmFreeSectionPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/slab.c (ExGrowSlabCache): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/virtual.c (MmPageOutVirtualMemory,
MmNotPresentFaultVirtualMemory, MmFreeVirtualMemoryPage): Changes to
use PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/wset.c (MmTrimUserMemory): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/page.c (Mmi386ReleaseMmInfo, MmCopyMmInfo,
MmGetPhysicalAddressForProcess, MmCreateVirtualMapping,
MmCreateVirtualMappingUnsafe, MmCreateVirtualMappingForProcess,
MmDeleteVirtualMapping): Changes to use PHYSICAL_ADDRESS type for
physical address.
* ntoskrnl/ps/process (PsInitProcessManagment): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/ps/thread.c (PsAllocateCallbackStack): Changes to use
PHYSICAL_ADDRESS type for physical address.
2002-06-04 David Welch <welch@cwcom.net>
* Lots of change since the ChangeLog was last updated.
svn path=/trunk/; revision=3000
2002-06-04 15:26:58 +00:00
|
|
|
|
|
|
|
VOID MmSetPageProtect(struct _EPROCESS* Process,
|
|
|
|
PVOID Address,
|
|
|
|
ULONG flProtect);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
BOOLEAN MmIsPagePresent(struct _EPROCESS* Process,
|
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/ke/i386/exp.c (KiDoubleFaultHandler): Print CR3
correctly.
2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/include/internal/ps.h: Added KTHREAD_STACK_LIMIT definition.
* ntoskrnl/ke/i386/tskswitch.S (Ki386ContextSwitch): Force all the
pages of the kernel stack to be accessible from this process.
2002-06-04 David Welch <welch@cwcom.net>
* ntoskrnl/cc/view.c (ReadCacheSegmentChain): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcRosCreateCacheSegment): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/cc/copy.c (CcFreeCachePage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/include/internal/ps.h (KPROCESS): Changed type of
page directory base to PHYSICAL_ADDRESS.
* ntoskrnl/include/internal/i386/mm.h: Changed prototypes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeFreeStackPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kthread.c (KeInitializeThread): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/process.c (KeAttachProcess, KeDetachProcess): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/ke/kernel.c (PcrPages, KeApplicationProcessorInit): Changes
to use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MM_ALLOCATION_REQUEST): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmReleasePageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/balance.c (MmRequestPageMemoryConsumer): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmFreeContinuousPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/cont.c (MmAllocateContinuousAlignedMemory): Changes to
use PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/freelist.c (MmTransferOwnershipPage,
MmGetLRUFirstUserPage, MmGetLRUNextUserPage, MmGetContinuousPages,
MmInitializePageList, MmSetFlagsPage, MmSetRmapListHeadPage,
MmGetRmapListHeadPage, MmMarkPageMapped, MmMarkPageUnmapped,
MmGetFlagsPage, MmSetSavedSwapEntryPage, MmGetSavedSwapEntryPage,
MmReferencePage, MmGetReferenceCountPage, MmIsUsablePage,
MmDereferencePage, MmGetLockCountPage, MmLockPage, MmUnlockPage,
MmAllocPage): Changes to use PHYSICAL_ADDRESS type for physical
addresses.
* ntoskrnl/mm/iospace.c (MmMapIoSpace): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/kmap.c (ExAllocatePage, MiZeroPage, MiCopyFromUserPage,
ExAllocatePageWithPhysPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/marea.c (MmFreeMemoryArea): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mdl.c (MmUnlockPages, MmMapLockedPages,
MmProbeAndLockPages): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/mm.c (MmSharedDataPagePhysicalAddress,
MmCommitPagedPoolAddress, MmNotPresentFault): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/mminit.c (MmInitVirtualMemory): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/ncache.c (MmAllocateNonCachedMemory,
MmFreeNonCachedPage): Changes to use PHYSICAL_ADDRESS type for
physical addresses.
* ntoskrnl/mm/npool.c (grow_kernel_pool): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/rmap.c (MmPageOutPhysicalAddress, MmInsertRmap,
MmDeleteAllRmaps, MmDeleteRmap): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/section.c (MiReadPage, MmNotPresentFaultSectionView,
MmAccessFaultSectionView, MmPageOutDeleteMapping,
MmPageOutSectionView, MmFreeSectionPage): Changes to use
PHYSICAL_ADDRESS type for physical addresses.
* ntoskrnl/mm/slab.c (ExGrowSlabCache): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/virtual.c (MmPageOutVirtualMemory,
MmNotPresentFaultVirtualMemory, MmFreeVirtualMemoryPage): Changes to
use PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/wset.c (MmTrimUserMemory): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/mm/page.c (Mmi386ReleaseMmInfo, MmCopyMmInfo,
MmGetPhysicalAddressForProcess, MmCreateVirtualMapping,
MmCreateVirtualMappingUnsafe, MmCreateVirtualMappingForProcess,
MmDeleteVirtualMapping): Changes to use PHYSICAL_ADDRESS type for
physical address.
* ntoskrnl/ps/process (PsInitProcessManagment): Changes to use
PHYSICAL_ADDRESS type for physical address.
* ntoskrnl/ps/thread.c (PsAllocateCallbackStack): Changes to use
PHYSICAL_ADDRESS type for physical address.
2002-06-04 David Welch <welch@cwcom.net>
* Lots of change since the ChangeLog was last updated.
svn path=/trunk/; revision=3000
2002-06-04 15:26:58 +00:00
|
|
|
PVOID Address);
|
2001-04-17 04:11:01 +00:00
|
|
|
|
2003-05-17 13:45:04 +00:00
|
|
|
VOID MmInitGlobalKernelPageDirectory(VOID);
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOL* WasDirty, PPFN_TYPE Page);
|
2001-12-29 14:32:22 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmEnableVirtualMapping(PEPROCESS Process, PVOID Address);
|
2004-04-22 01:57:49 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmRawDeleteVirtualMapping(PVOID Address);
|
2004-04-22 01:57:49 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmDeletePageFileMapping(PEPROCESS Process, PVOID Address, SWAPENTRY* SwapEntry);
|
2004-04-22 01:57:49 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
NTSTATUS MmCreatePageFileMapping(PEPROCESS Process, PVOID Address, SWAPENTRY SwapEntry);
|
2001-12-31 01:53:46 +00:00
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
BOOLEAN MmIsPageSwapEntry(PEPROCESS Process, PVOID Address);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
VOID MmTransferOwnershipPage(PFN_TYPE Page, ULONG NewConsumer);
|
|
|
|
|
2002-05-14 21:19:21 +00:00
|
|
|
VOID MmSetDirtyPage(PEPROCESS Process, PVOID Address);
|
2001-12-31 01:53:46 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
PFN_TYPE MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry);
|
2002-08-10 16:41:20 +00:00
|
|
|
|
2005-01-07 16:10:48 +00:00
|
|
|
LONG MmAllocPagesSpecifyRange(ULONG Consumer,
|
|
|
|
PHYSICAL_ADDRESS LowestAddress,
|
|
|
|
PHYSICAL_ADDRESS HighestAddress,
|
|
|
|
ULONG NumberOfPages,
|
|
|
|
PPFN_TYPE Pages);
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
VOID MmDereferencePage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmReferencePage(PFN_TYPE Page);
|
2005-03-15 22:07:05 +00:00
|
|
|
VOID MmReferencePageUnsafe(PFN_TYPE Page);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
BOOLEAN MmIsAccessedAndResetAccessPage(struct _EPROCESS* Process, PVOID Address);
|
|
|
|
|
|
|
|
ULONG MmGetReferenceCountPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
BOOLEAN MmIsUsablePage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmSetFlagsPage(PFN_TYPE Page, ULONG Flags);
|
|
|
|
|
|
|
|
ULONG MmGetFlagsPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmSetSavedSwapEntryPage(PFN_TYPE Page, SWAPENTRY SavedSwapEntry);
|
|
|
|
|
|
|
|
SWAPENTRY MmGetSavedSwapEntryPage(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmSetCleanPage(struct _EPROCESS* Process, PVOID Address);
|
|
|
|
|
|
|
|
NTSTATUS MmCreatePageTable(PVOID PAddress);
|
|
|
|
|
|
|
|
VOID MmDeletePageTable(struct _EPROCESS* Process, PVOID Address);
|
|
|
|
|
|
|
|
PFN_TYPE MmGetPfnForProcess(struct _EPROCESS* Process, PVOID Address);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2005-04-18 00:42:31 +00:00
|
|
|
STDCALL
|
2005-05-09 01:38:29 +00:00
|
|
|
MmCopyMmInfo(struct _EPROCESS* Src,
|
|
|
|
struct _EPROCESS* Dest,
|
2005-04-18 00:42:31 +00:00
|
|
|
PPHYSICAL_ADDRESS DirectoryTableBase);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
NTSTATUS MmReleaseMmInfo(struct _EPROCESS* Process);
|
|
|
|
|
|
|
|
NTSTATUS Mmi386ReleaseMmInfo(struct _EPROCESS* Process);
|
|
|
|
|
|
|
|
VOID MmDeleteVirtualMapping(struct _EPROCESS* Process,
|
2005-05-09 01:38:29 +00:00
|
|
|
PVOID Address,
|
2004-08-01 07:24:59 +00:00
|
|
|
BOOL FreePage,
|
|
|
|
BOOL* WasDirty,
|
|
|
|
PPFN_TYPE Page);
|
|
|
|
|
|
|
|
BOOLEAN MmIsDirtyPage(struct _EPROCESS* Process, PVOID Address);
|
|
|
|
|
|
|
|
VOID MmMarkPageMapped(PFN_TYPE Page);
|
|
|
|
|
|
|
|
VOID MmMarkPageUnmapped(PFN_TYPE Page);
|
|
|
|
|
2004-08-19 21:47:51 +00:00
|
|
|
VOID MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size);
|
|
|
|
|
2004-09-09 20:42:33 +00:00
|
|
|
VOID MiInitPageDirectoryMap(VOID);
|
|
|
|
|
|
|
|
ULONG MiGetUserPageDirectoryCount(VOID);
|
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* wset.c ********************************************************************/
|
|
|
|
|
|
|
|
NTSTATUS MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages);
|
|
|
|
|
2005-06-17 22:05:16 +00:00
|
|
|
/* cont.c ********************************************************************/
|
|
|
|
|
|
|
|
PVOID STDCALL
|
2005-08-07 23:07:17 +00:00
|
|
|
MmAllocateContiguousMemorySpecifyCache(IN SIZE_T NumberOfBytes,
|
|
|
|
IN PHYSICAL_ADDRESS LowestAcceptableAddress,
|
|
|
|
IN PHYSICAL_ADDRESS HighestAcceptableAddress,
|
|
|
|
IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
|
|
|
|
IN MEMORY_CACHING_TYPE CacheType OPTIONAL);
|
2005-06-17 22:05:16 +00:00
|
|
|
|
2004-08-01 07:24:59 +00:00
|
|
|
/* region.c ************************************************************/
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS MmAlterRegion(PMADDRESS_SPACE AddressSpace, PVOID BaseAddress,
|
|
|
|
PLIST_ENTRY RegionListHead, PVOID StartAddress, ULONG Length,
|
|
|
|
ULONG NewType, ULONG NewProtect,
|
2004-08-01 07:24:59 +00:00
|
|
|
PMM_ALTER_REGION_FUNC AlterFunc);
|
|
|
|
|
|
|
|
VOID MmInitialiseRegion(PLIST_ENTRY RegionListHead, ULONG Length, ULONG Type,
|
|
|
|
ULONG Protect);
|
|
|
|
|
|
|
|
PMM_REGION MmFindRegion(PVOID BaseAddress, PLIST_ENTRY RegionListHead, PVOID Address,
|
|
|
|
PVOID* RegionBaseAddress);
|
|
|
|
|
|
|
|
/* section.c *****************************************************************/
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
PVOID STDCALL
|
2004-10-09 12:17:54 +00:00
|
|
|
MmAllocateSection (IN ULONG Length, PVOID BaseAddress);
|
2002-08-10 16:41:20 +00:00
|
|
|
|
|
|
|
NTSTATUS STDCALL
|
|
|
|
MmQuerySectionView(PMEMORY_AREA MemoryArea,
|
|
|
|
PVOID Address,
|
|
|
|
PMEMORY_BASIC_INFORMATION Info,
|
|
|
|
PULONG ResultLength);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2002-08-10 16:41:20 +00:00
|
|
|
MmProtectSectionView(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MemoryArea,
|
|
|
|
PVOID BaseAddress,
|
|
|
|
ULONG Length,
|
|
|
|
ULONG Protect,
|
|
|
|
PULONG OldProtect);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2002-08-14 20:58:39 +00:00
|
|
|
MmWritePageSectionView(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MArea,
|
|
|
|
PVOID Address,
|
|
|
|
PMM_PAGEOP PageOp);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
NTSTATUS MmInitSectionImplementation(VOID);
|
|
|
|
|
2005-06-25 20:05:56 +00:00
|
|
|
NTSTATUS
|
|
|
|
STDCALL
|
2004-08-01 07:24:59 +00:00
|
|
|
MmCreateSection (OUT PSECTION_OBJECT * SectionObject,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
|
|
|
IN PLARGE_INTEGER MaximumSize,
|
|
|
|
IN ULONG SectionPageProtection,
|
|
|
|
IN ULONG AllocationAttributes,
|
|
|
|
IN HANDLE FileHandle OPTIONAL,
|
|
|
|
IN PFILE_OBJECT File OPTIONAL);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2004-08-01 07:24:59 +00:00
|
|
|
MmNotPresentFaultSectionView(PMADDRESS_SPACE AddressSpace,
|
2005-05-09 01:38:29 +00:00
|
|
|
MEMORY_AREA* MemoryArea,
|
2004-08-01 07:24:59 +00:00
|
|
|
PVOID Address,
|
|
|
|
BOOLEAN Locked);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2004-08-01 07:24:59 +00:00
|
|
|
MmPageOutSectionView(PMADDRESS_SPACE AddressSpace,
|
|
|
|
PMEMORY_AREA MemoryArea,
|
|
|
|
PVOID Address,
|
|
|
|
struct _MM_PAGEOP* PageOp);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2004-08-01 07:24:59 +00:00
|
|
|
MmCreatePhysicalMemorySection(VOID);
|
|
|
|
|
2005-05-09 01:38:29 +00:00
|
|
|
NTSTATUS
|
2004-08-01 07:24:59 +00:00
|
|
|
MmAccessFaultSectionView(PMADDRESS_SPACE AddressSpace,
|
2005-05-09 01:38:29 +00:00
|
|
|
MEMORY_AREA* MemoryArea,
|
2002-08-14 20:58:39 +00:00
|
|
|
PVOID Address,
|
2004-08-01 07:24:59 +00:00
|
|
|
BOOLEAN Locked);
|
|
|
|
|
2002-08-14 20:58:39 +00:00
|
|
|
VOID
|
2004-08-01 07:24:59 +00:00
|
|
|
MmFreeSectionSegments(PFILE_OBJECT FileObject);
|
|
|
|
|
|
|
|
/* mpw.c *********************************************************************/
|
|
|
|
|
2002-08-14 20:58:39 +00:00
|
|
|
NTSTATUS MmInitMpwThread(VOID);
|
2004-08-01 07:24:59 +00:00
|
|
|
|
|
|
|
/* pager.c *******************************************************************/
|
|
|
|
|
|
|
|
BOOLEAN MiIsPagerThread(VOID);
|
|
|
|
|
|
|
|
VOID MiStartPagerThread(VOID);
|
|
|
|
|
|
|
|
VOID MiStopPagerThread(VOID);
|
2002-08-14 20:58:39 +00:00
|
|
|
|
2005-09-13 23:28:21 +00:00
|
|
|
|
|
|
|
NTSTATUS FASTCALL
|
|
|
|
MiQueryVirtualMemory (IN HANDLE ProcessHandle,
|
|
|
|
IN PVOID Address,
|
|
|
|
IN CINT VirtualMemoryInformationClass,
|
|
|
|
OUT PVOID VirtualMemoryInformation,
|
|
|
|
IN ULONG Length,
|
|
|
|
OUT PULONG ResultLength);
|
|
|
|
|
1998-08-25 04:27:41 +00:00
|
|
|
#endif
|