#include "mi.h"
Go to the source code of this file.
Defines | |
#define | COPY_STACK_SIZE 256 |
#define | BITS_IN_ULONG ((sizeof (ULONG)) * 8) |
#define | LOWEST_USABLE_PHYSICAL_ADDRESS (16 * 1024 * 1024) |
#define | LOWEST_USABLE_PHYSICAL_PAGE (LOWEST_USABLE_PHYSICAL_ADDRESS >> PAGE_SHIFT) |
#define | LOWEST_BITMAP_PHYSICAL_PAGE 0 |
#define | MI_FRAME_TO_BITMAP_INDEX(x) ((ULONG)(x)) |
#define | MI_BITMAP_INDEX_TO_FRAME(x) ((ULONG)(x)) |
Functions | |
VOID | MiFlushUserPhysicalPteList (IN PMMPTE_FLUSH_LIST PteFlushList) |
NTSTATUS | NtMapUserPhysicalPages (IN PVOID VirtualAddress, IN ULONG_PTR NumberOfPages, IN PULONG_PTR UserPfnArray OPTIONAL) |
NTSTATUS | NtMapUserPhysicalPagesScatter (IN PVOID *VirtualAddresses, IN ULONG_PTR NumberOfPages, IN PULONG_PTR UserPfnArray OPTIONAL) |
NTSTATUS | NtAllocateUserPhysicalPages (IN HANDLE ProcessHandle, IN OUT PULONG_PTR NumberOfPages, OUT PULONG_PTR UserPfnArray) |
NTSTATUS | NtFreeUserPhysicalPages (IN HANDLE ProcessHandle, IN OUT PULONG_PTR NumberOfPages, IN PULONG_PTR UserPfnArray) |
VOID | MiRemoveUserPhysicalPagesVad (IN PMMVAD_SHORT Vad) |
VOID | MiUpdateVadPhysicalPages (IN ULONG_PTR TotalFreedPages) |
VOID | MiCleanPhysicalProcessPages (IN PEPROCESS Process) |
Variables | |
ULONG_PTR | MmVadPhysicalPages |
|
Definition at line 67 of file physical.c. |
|
Definition at line 65 of file physical.c. Referenced by MiCleanPhysicalProcessPages(), MiDoPoolCopy(), NtFreeUserPhysicalPages(), NtMapUserPhysicalPages(), and NtMapUserPhysicalPagesScatter(). |
|
Definition at line 72 of file physical.c. |
|
Definition at line 69 of file physical.c. Referenced by NtAllocateUserPhysicalPages(). |
|
Definition at line 70 of file physical.c. Referenced by MiCleanPhysicalProcessPages(), MiRemoveUserPhysicalPagesVad(), NtAllocateUserPhysicalPages(), NtFreeUserPhysicalPages(), NtMapUserPhysicalPages(), and NtMapUserPhysicalPagesScatter(). |
|
Definition at line 74 of file physical.c. Referenced by MiCleanPhysicalProcessPages(). |
|
Definition at line 73 of file physical.c. Referenced by NtAllocateUserPhysicalPages(), NtFreeUserPhysicalPages(), NtMapUserPhysicalPages(), and NtMapUserPhysicalPagesScatter(). |
|
Definition at line 2313 of file physical.c. References APC_LEVEL, ASSERT, BitMap, COPY_STACK_SIZE, ExFreePool(), LOWEST_USABLE_PHYSICAL_PAGE, MI_BITMAP_INDEX_TO_FRAME, MI_PFN_ELEMENT, MI_PFN_IS_AWE, MI_SET_PFN_DELETED, MiUpdateVadPhysicalPages(), MmFreePagesFromMdl(), MmHighestPossiblePhysicalPage, MmInitializeMdl, NonPagedPool, NULL, PAGE_SHIFT, PsReturnPoolQuota(), _MMPFN::PteAddress, RtlFindSetBits(), TRUE, and _MMPFN::u2. Referenced by MmCleanProcessAddressSpace().
|
|
Definition at line 2488 of file physical.c. References FALSE, KeFlushEntireTb(), KeFlushMultipleTb(), KeFlushSingleTb(), MM_MAXIMUM_FLUSH_COUNT, NULL, TRUE, _MMPTE::u, and ZeroPte. Referenced by MiRemoveUserPhysicalPagesVad(), NtAllocateUserPhysicalPages(), NtFreeUserPhysicalPages(), NtMapUserPhysicalPages(), and NtMapUserPhysicalPagesScatter().
|
|
Definition at line 2110 of file physical.c. References APC_LEVEL, ASSERT, _MMPTE_FLUSH_LIST::Count, DbgPrint, _MMPTE_FLUSH_LIST::FlushPte, _MMPTE_FLUSH_LIST::FlushVa, LOCK_AWE, LOCK_PFN2, LOWEST_USABLE_PHYSICAL_PAGE, MI_GET_PAGE_FRAME_FROM_PTE, MI_PFN_ELEMENT, MI_PFN_IS_AWE, MI_VPN_TO_VA, MI_VPN_TO_VA_ENDING, MI_WRITE_INVALID_PTE, MiFlushUserPhysicalPteList(), MiGetPteAddress, MiGetVirtualAddressMappedByPte, MM_MAXIMUM_FLUSH_COUNT, NULL, _EPROCESS::PhysicalVadList, PsGetCurrentProcess, _MMPTE::u, UNLOCK_AWE, UNLOCK_PFN2, _MI_PHYSICAL_VIEW::Vad, _EPROCESS::VadPhysicalPages, _EPROCESS::VadPhysicalPagesBitMap, and ZeroPte. Referenced by MmCleanProcessAddressSpace(), and NtFreeVirtualMemory().
|
|
Definition at line 2278 of file physical.c. References LOCK_PFN, MmVadPhysicalPages, and UNLOCK_PFN. Referenced by MiCleanPhysicalProcessPages().
|
|
Definition at line 970 of file physical.c. References _EPROCESS::AddressSpaceDeleted, ASSERT, BitMap, _MDL::ByteCount, _MMPTE_FLUSH_LIST::Count, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), ExSystemExceptionFilter(), FALSE, _MMPTE_FLUSH_LIST::FlushPte, _MMPTE_FLUSH_LIST::FlushVa, KeAttachProcess(), KeDetachProcess(), KernelMode, KPROCESSOR_MODE, L, LOCK_AWE, LOCK_PFN, LOCK_WS, LOWEST_USABLE_PHYSICAL_ADDRESS, LOWEST_USABLE_PHYSICAL_PAGE, MI_FRAME_TO_BITMAP_INDEX, MI_PFN_ELEMENT, MI_PFN_IS_AWE, MI_SET_PFN_DELETED, MI_WRITE_INVALID_PTE, MiFlushUserPhysicalPteList(), MiGetVirtualAddressMappedByPte, MM_MAXIMUM_FLUSH_COUNT, MmAllocatePagesForMdl(), MmFreePagesFromMdl(), MmHighestPossiblePhysicalPage, MmVadPhysicalPages, _MDL::Next, NonPagedPool, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObjectByHandle(), PAGE_SHIFT, PAGE_SIZE, PASSIVE_LEVEL, _EPROCESS::Pcb, ProbeForWrite(), ProbeForWritePointer, PsChargePoolQuota(), PsGetCurrentProcess, PsProcessType, PsReturnPoolQuota(), RtlClearAllBits(), RtlClearBits(), RtlFindSetBits(), RtlInitializeBitMap(), RtlSetBits(), SeLockMemoryPrivilege, SeSinglePrivilegeCheck(), Status, TRUE, _MMPTE::u, UNLOCK_AWE, UNLOCK_PFN, UNLOCK_WS, _EPROCESS::VadPhysicalPages, _EPROCESS::VadPhysicalPagesBitMap, and ZeroPte.
|
|
Definition at line 1624 of file physical.c. References _EPROCESS::AddressSpaceDeleted, ASSERT, BitMap, _MDL::ByteCount, COPY_STACK_SIZE, _MMPTE_FLUSH_LIST::Count, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), ExSystemExceptionFilter(), FALSE, _MMPTE_FLUSH_LIST::FlushPte, _MMPTE_FLUSH_LIST::FlushVa, KeAttachProcess(), KeDetachProcess(), KernelMode, KPROCESSOR_MODE, L, LOCK_AWE, LOCK_PFN2, LOCK_WS, LOWEST_USABLE_PHYSICAL_PAGE, MI_FRAME_TO_BITMAP_INDEX, MI_PFN_ELEMENT, MI_PFN_IS_AWE, MI_SET_PFN_DELETED, MI_WRITE_INVALID_PTE, MiFlushUserPhysicalPteList(), MiGetVirtualAddressMappedByPte, MM_MAXIMUM_FLUSH_COUNT, MmCreateMdl(), MmFreePagesFromMdl(), MmInitializeMdl, MmVadPhysicalPages, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObjectByHandle(), PAGE_SHIFT, PASSIVE_LEVEL, _EPROCESS::Pcb, ProbeForRead, ProbeForWritePointer, PsGetCurrentProcess, PsProcessType, RtlClearBits(), Status, TRUE, _MMPTE::u, UNLOCK_AWE, UNLOCK_PFN2, UNLOCK_WS, _EPROCESS::VadPhysicalPages, _EPROCESS::VadPhysicalPagesBitMap, and ZeroPte.
|
|
Definition at line 85 of file physical.c. References ASSERT, BitMap, COPY_STACK_SIZE, _MMPTE_FLUSH_LIST::Count, _MI_PHYSICAL_VIEW::EndVa, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), _MMPTE_FLUSH_LIST::FlushPte, _MMPTE_FLUSH_LIST::FlushVa, LOCK_AWE, LOWEST_USABLE_PHYSICAL_PAGE, MI_FRAME_TO_BITMAP_INDEX, MI_MAKE_VALID_PTE, MI_PFN_ELEMENT, MI_PFN_IS_AWE, MI_SET_PTE_DIRTY, MI_WRITE_INVALID_PTE, MI_WRITE_VALID_PTE, MiFlushUserPhysicalPteList(), MiGetPteAddress, MM_MAXIMUM_FLUSH_COUNT, MM_READWRITE, NonPagedPool, NTSTATUS(), NULL, PAGE_ALIGN, PAGE_SHIFT, PAGE_SIZE, PASSIVE_LEVEL, _EPROCESS::PhysicalVadList, ProbeForRead, PsGetCurrentProcess, _MMPFN::PteAddress, _MI_PHYSICAL_VIEW::StartVa, Status, _MMPTE::u, _MMVAD::u, _MMPFN::u2, UNLOCK_AWE, _MI_PHYSICAL_VIEW::Vad, _EPROCESS::VadPhysicalPagesBitMap, VOID(), and ZeroPte.
|
|
Definition at line 498 of file physical.c. References ASSERT, BitMap, COPY_STACK_SIZE, _MMPTE_FLUSH_LIST::Count, _MI_PHYSICAL_VIEW::EndVa, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), _MMPTE_FLUSH_LIST::FlushPte, _MMPTE_FLUSH_LIST::FlushVa, LOCK_AWE, LOWEST_USABLE_PHYSICAL_PAGE, MI_FRAME_TO_BITMAP_INDEX, MI_MAKE_VALID_PTE, MI_PFN_ELEMENT, MI_PFN_IS_AWE, MI_SET_PTE_DIRTY, MI_WRITE_INVALID_PTE, MI_WRITE_VALID_PTE, MiFlushUserPhysicalPteList(), MiGetPteAddress, MM_MAXIMUM_FLUSH_COUNT, MM_READWRITE, NonPagedPool, NTSTATUS(), NULL, PAGE_SIZE, PASSIVE_LEVEL, _EPROCESS::PhysicalVadList, ProbeForRead, PsGetCurrentProcess, _MMPFN::PteAddress, _MI_PHYSICAL_VIEW::StartVa, Status, _MMPTE::u, _MMVAD::u, _MMPFN::u2, UNLOCK_AWE, _MI_PHYSICAL_VIEW::Vad, _EPROCESS::VadPhysicalPagesBitMap, VOID(), and ZeroPte.
|
|
Definition at line 76 of file physical.c. Referenced by MiUpdateVadPhysicalPages(), NtAllocateUserPhysicalPages(), and NtFreeUserPhysicalPages(). |