Merge 44257 from amd64 branch:

PFN_TYPE -> PFN_NUMBER

svn path=/trunk/; revision=48070
This commit is contained in:
Timo Kreuzer 2010-07-15 22:50:12 +00:00
parent 70103e0a78
commit 820d3edcb0
18 changed files with 162 additions and 163 deletions

View file

@ -15,7 +15,7 @@
/* GLOBALS *******************************************************************/
static PFN_TYPE CcZeroPage = 0;
static PFN_NUMBER CcZeroPage = 0;
#define MAX_ZERO_LENGTH (256 * 1024)
#define MAX_RW_LENGTH (256 * 1024)
@ -98,7 +98,7 @@ ReadCacheSegmentChain(PBCB Bcb, ULONG ReadOffset, ULONG Length,
PCACHE_SEGMENT current2;
ULONG current_size;
ULONG i;
PPFN_TYPE MdlPages;
PPFN_NUMBER MdlPages;
/*
* Count the maximum number of bytes we could read starting
@ -119,7 +119,7 @@ ReadCacheSegmentChain(PBCB Bcb, ULONG ReadOffset, ULONG Length,
Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ);
current2 = current;
current_size = 0;
MdlPages = (PPFN_TYPE)(Mdl + 1);
MdlPages = (PPFN_NUMBER)(Mdl + 1);
while (current2 != NULL && !current2->Valid && current_size < MAX_RW_LENGTH)
{
PVOID address = current2->BaseAddress;
@ -619,7 +619,7 @@ CcZeroData (IN PFILE_OBJECT FileObject,
Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ);
for (i = 0; i < ((Mdl->Size - sizeof(MDL)) / sizeof(ULONG)); i++)
{
((PPFN_TYPE)(Mdl + 1))[i] = CcZeroPage;
((PPFN_NUMBER)(Mdl + 1))[i] = CcZeroPage;
}
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Status = IoSynchronousPageWrite(FileObject, Mdl, &WriteOffset, &Event, &Iosb);

View file

@ -330,8 +330,8 @@ CcRosTrimCache(ULONG Target, ULONG Priority, PULONG NrFreed)
KeReleaseGuardedMutex(&ViewLock);
for (i = 0; i < current->Bcb->CacheSegmentSize / PAGE_SIZE; i++)
{
PFN_TYPE Page;
Page = (PFN_TYPE)(MmGetPhysicalAddress((char*)current->BaseAddress + i * PAGE_SIZE).QuadPart >> PAGE_SHIFT);
PFN_NUMBER Page;
Page = (PFN_NUMBER)(MmGetPhysicalAddress((char*)current->BaseAddress + i * PAGE_SIZE).QuadPart >> PAGE_SHIFT);
Status = MmPageOutPhysicalAddress(Page);
}
KeAcquireGuardedMutex(&ViewLock);
@ -842,7 +842,7 @@ CcRosRequestCacheSegment(PBCB Bcb,
#else
static VOID
CcFreeCachePage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
PFN_TYPE Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
{
ASSERT(SwapEntry == 0);
if (Page != 0)
@ -861,7 +861,7 @@ CcRosInternalFreeCacheSegment(PCACHE_SEGMENT CacheSeg)
ULONG i;
ULONG RegionSize;
ULONG Base;
PFN_TYPE Page;
PFN_NUMBER Page;
KIRQL oldIrql;
#endif
DPRINT("Freeing cache segment 0x%p\n", CacheSeg);

View file

@ -53,7 +53,6 @@ struct _EPROCESS;
struct _MM_RMAP_ENTRY;
struct _MM_PAGEOP;
typedef ULONG SWAPENTRY;
typedef ULONG PFN_TYPE, *PPFN_TYPE;
//
// MmDbgCopyMemory Flags
@ -466,7 +465,7 @@ typedef VOID
PVOID Context,
PMEMORY_AREA MemoryArea,
PVOID Address,
PFN_TYPE Page,
PFN_NUMBER Page,
SWAPENTRY SwapEntry,
BOOLEAN Dirty
);
@ -688,7 +687,7 @@ VOID
NTAPI
MmBuildMdlFromPages(
PMDL Mdl,
PULONG Pages
PPFN_NUMBER Pages
);
/* mminit.c ******************************************************************/
@ -738,7 +737,7 @@ NTSTATUS
NTAPI
MmReadFromSwapPage(
SWAPENTRY SwapEntry,
PFN_TYPE Page
PFN_NUMBER Page
);
BOOLEAN
@ -749,7 +748,7 @@ NTSTATUS
NTAPI
MmWriteToSwapPage(
SWAPENTRY SwapEntry,
PFN_TYPE Page
PFN_NUMBER Page
);
NTSTATUS
@ -917,18 +916,18 @@ ExUnmapPage(PVOID Addr);
PVOID
NTAPI
ExAllocatePageWithPhysPage(PFN_TYPE Page);
ExAllocatePageWithPhysPage(PFN_NUMBER Page);
NTSTATUS
NTAPI
MiCopyFromUserPage(
PFN_TYPE Page,
PFN_NUMBER Page,
PVOID SourceAddress
);
NTSTATUS
NTAPI
MiZeroPage(PFN_TYPE Page);
MiZeroPage(PFN_NUMBER Page);
/* memsafe.s *****************************************************************/
@ -999,7 +998,7 @@ NTSTATUS
NTAPI
MmReleasePageMemoryConsumer(
ULONG Consumer,
PFN_TYPE Page
PFN_NUMBER Page
);
NTSTATUS
@ -1007,7 +1006,7 @@ NTAPI
MmRequestPageMemoryConsumer(
ULONG Consumer,
BOOLEAN MyWait,
PPFN_TYPE AllocatedPage
PPFN_NUMBER AllocatedPage
);
VOID
@ -1023,18 +1022,18 @@ MmRebalanceMemoryConsumers(VOID);
VOID
NTAPI
MmSetRmapListHeadPage(
PFN_TYPE Page,
PFN_NUMBER Page,
struct _MM_RMAP_ENTRY* ListHead
);
struct _MM_RMAP_ENTRY*
NTAPI
MmGetRmapListHeadPage(PFN_TYPE Page);
MmGetRmapListHeadPage(PFN_NUMBER Page);
VOID
NTAPI
MmInsertRmap(
PFN_TYPE Page,
PFN_NUMBER Page,
struct _EPROCESS *Process,
PVOID Address
);
@ -1042,7 +1041,7 @@ MmInsertRmap(
VOID
NTAPI
MmDeleteAllRmaps(
PFN_TYPE Page,
PFN_NUMBER Page,
PVOID Context,
VOID (*DeleteMapping)(PVOID Context, struct _EPROCESS *Process, PVOID Address)
);
@ -1050,7 +1049,7 @@ MmDeleteAllRmaps(
VOID
NTAPI
MmDeleteRmap(
PFN_TYPE Page,
PFN_NUMBER Page,
struct _EPROCESS *Process,
PVOID Address
);
@ -1061,29 +1060,29 @@ MmInitializeRmapList(VOID);
VOID
NTAPI
MmSetCleanAllRmaps(PFN_TYPE Page);
MmSetCleanAllRmaps(PFN_NUMBER Page);
VOID
NTAPI
MmSetDirtyAllRmaps(PFN_TYPE Page);
MmSetDirtyAllRmaps(PFN_NUMBER Page);
BOOLEAN
NTAPI
MmIsDirtyPageRmap(PFN_TYPE Page);
MmIsDirtyPageRmap(PFN_NUMBER Page);
NTSTATUS
NTAPI
MmWritePagePhysicalAddress(PFN_TYPE Page);
MmWritePagePhysicalAddress(PFN_NUMBER Page);
NTSTATUS
NTAPI
MmPageOutPhysicalAddress(PFN_TYPE Page);
MmPageOutPhysicalAddress(PFN_NUMBER Page);
/* freelist.c **********************************************************/
FORCEINLINE
PMMPFN
MiGetPfnEntry(IN PFN_TYPE Pfn)
MiGetPfnEntry(IN PFN_NUMBER Pfn)
{
PMMPFN Page;
extern RTL_BITMAP MiPfnBitMap;
@ -1111,33 +1110,33 @@ MiGetPfnEntryIndex(IN PMMPFN Pfn1)
return Pfn1 - MmPfnDatabase;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetLRUNextUserPage(PFN_TYPE PreviousPage);
MmGetLRUNextUserPage(PFN_NUMBER PreviousPage);
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetLRUFirstUserPage(VOID);
VOID
NTAPI
MmInsertLRULastUserPage(PFN_TYPE Page);
MmInsertLRULastUserPage(PFN_NUMBER Page);
VOID
NTAPI
MmRemoveLRUUserPage(PFN_TYPE Page);
MmRemoveLRUUserPage(PFN_NUMBER Page);
VOID
NTAPI
MmLockPage(PFN_TYPE Page);
MmLockPage(PFN_NUMBER Page);
VOID
NTAPI
MmUnlockPage(PFN_TYPE Page);
MmUnlockPage(PFN_NUMBER Page);
ULONG
NTAPI
MmGetLockCountPage(PFN_TYPE Page);
MmGetLockCountPage(PFN_NUMBER Page);
VOID
NTAPI
@ -1151,7 +1150,7 @@ MmDumpPfnDatabase(
VOID
);
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetContinuousPages(
ULONG NumberOfBytes,
@ -1222,7 +1221,7 @@ NTAPI
MmCreateVirtualMappingForKernel(
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount
);
@ -1239,7 +1238,7 @@ MmCreateVirtualMapping(
struct _EPROCESS* Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount
);
@ -1249,7 +1248,7 @@ MmCreateVirtualMappingUnsafe(
struct _EPROCESS* Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount
);
@ -1284,7 +1283,7 @@ MmDisableVirtualMapping(
struct _EPROCESS *Process,
PVOID Address,
BOOLEAN* WasDirty,
PPFN_TYPE Page
PPFN_NUMBER Page
);
VOID
@ -1324,7 +1323,7 @@ MmIsPageSwapEntry(
VOID
NTAPI
MmTransferOwnershipPage(
PFN_TYPE Page,
PFN_NUMBER Page,
ULONG NewConsumer
);
@ -1335,7 +1334,7 @@ MmSetDirtyPage(
PVOID Address
);
PFN_TYPE
PFN_NUMBER
NTAPI
MmAllocPage(
ULONG Consumer
@ -1348,34 +1347,34 @@ MmAllocPagesSpecifyRange(
PHYSICAL_ADDRESS LowestAddress,
PHYSICAL_ADDRESS HighestAddress,
ULONG NumberOfPages,
PPFN_TYPE Pages
PPFN_NUMBER Pages
);
VOID
NTAPI
MmDereferencePage(PFN_TYPE Page);
MmDereferencePage(PFN_NUMBER Page);
VOID
NTAPI
MmReferencePage(PFN_TYPE Page);
MmReferencePage(PFN_NUMBER Page);
ULONG
NTAPI
MmGetReferenceCountPage(PFN_TYPE Page);
MmGetReferenceCountPage(PFN_NUMBER Page);
BOOLEAN
NTAPI
MmIsPageInUse(PFN_TYPE Page);
MmIsPageInUse(PFN_NUMBER Page);
VOID
NTAPI
MmSetSavedSwapEntryPage(
PFN_TYPE Page,
PFN_NUMBER Page,
SWAPENTRY SavedSwapEntry);
SWAPENTRY
NTAPI
MmGetSavedSwapEntryPage(PFN_TYPE Page);
MmGetSavedSwapEntryPage(PFN_NUMBER Page);
VOID
NTAPI
@ -1395,7 +1394,7 @@ MmDeletePageTable(
PVOID Address
);
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetPfnForProcess(
struct _EPROCESS *Process,
@ -1439,7 +1438,7 @@ MmDeleteVirtualMapping(
PVOID Address,
BOOLEAN FreePage,
BOOLEAN* WasDirty,
PPFN_TYPE Page
PPFN_NUMBER Page
);
BOOLEAN
@ -1451,11 +1450,11 @@ MmIsDirtyPage(
VOID
NTAPI
MmMarkPageMapped(PFN_TYPE Page);
MmMarkPageMapped(PFN_NUMBER Page);
VOID
NTAPI
MmMarkPageUnmapped(PFN_TYPE Page);
MmMarkPageUnmapped(PFN_NUMBER Page);
VOID
NTAPI

View file

@ -50,7 +50,7 @@ MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress,
IN MEMORY_CACHING_TYPE CacheType)
{
PFN_TYPE Pfn, PageCount;
PFN_NUMBER Pfn, PageCount;
PMMPTE PointerPte;
PVOID BaseAddress;
MMPTE TempPte;

View file

@ -573,7 +573,7 @@ MmProbeAndLockPages(IN PMDL Mdl,
IN KPROCESSOR_MODE AccessMode,
IN LOCK_OPERATION Operation)
{
PPFN_TYPE MdlPages;
PPFN_NUMBER MdlPages;
PVOID Base, Address, LastAddress, StartAddress;
ULONG LockPages, TotalPages;
NTSTATUS Status = STATUS_SUCCESS;

View file

@ -53,7 +53,7 @@ MmWritePageVirtualMemory(PMMSUPPORT AddressSpace,
PMM_PAGEOP PageOp)
{
SWAPENTRY SwapEntry;
PFN_TYPE Page;
PFN_NUMBER Page;
NTSTATUS Status;
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
@ -135,7 +135,7 @@ MmPageOutVirtualMemory(PMMSUPPORT AddressSpace,
PVOID Address,
PMM_PAGEOP PageOp)
{
PFN_TYPE Page;
PFN_NUMBER Page;
BOOLEAN WasDirty;
SWAPENTRY SwapEntry;
NTSTATUS Status;
@ -253,7 +253,7 @@ MmNotPresentFaultVirtualMemory(PMMSUPPORT AddressSpace,
* NOTES: This function is called with the address space lock held.
*/
{
PFN_TYPE Page;
PFN_NUMBER Page;
NTSTATUS Status;
PMM_REGION Region;
PMM_PAGEOP PageOp;
@ -457,7 +457,7 @@ MmModifyAttributes(PMMSUPPORT AddressSpace,
for (i=0; i < PAGE_ROUND_UP(RegionSize)/PAGE_SIZE; i++)
{
PFN_TYPE Page;
PFN_NUMBER Page;
if (MmIsPageSwapEntry(Process,
(char*)BaseAddress + (i * PAGE_SIZE)))
@ -853,7 +853,7 @@ static VOID
MmFreeVirtualMemoryPage(PVOID Context,
MEMORY_AREA* MemoryArea,
PVOID Address,
PFN_TYPE Page,
PFN_NUMBER Page,
SWAPENTRY SwapEntry,
BOOLEAN Dirty)
{

View file

@ -81,7 +81,7 @@ NTAPI
MmDisableVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
OUT PBOOLEAN WasDirty,
OUT PPFN_TYPE Page)
OUT PPFN_NUMBER Page)
{
UNIMPLEMENTED;
while (TRUE);
@ -101,7 +101,7 @@ NTAPI
MmCreateVirtualMappingUnsafe(IN PEPROCESS Process,
IN PVOID Address,
IN ULONG Protection,
IN PPFN_TYPE Pages,
IN PPFN_NUMBER Pages,
IN ULONG PageCount)
{
UNIMPLEMENTED;
@ -114,7 +114,7 @@ NTAPI
MmCreateVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
IN ULONG Protection,
IN PPFN_TYPE Pages,
IN PPFN_NUMBER Pages,
IN ULONG PageCount)
{
UNIMPLEMENTED;
@ -136,7 +136,7 @@ MmDeleteVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
IN BOOLEAN FreePage,
OUT PBOOLEAN WasDirty,
OUT PPFN_TYPE Page)
OUT PPFN_NUMBER Page)
{
UNIMPLEMENTED;
while (TRUE);
@ -163,7 +163,7 @@ MmCreatePageFileMapping(IN PEPROCESS Process,
return 0;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetPfnForProcess(IN PEPROCESS Process,
IN PVOID Address)

View file

@ -430,7 +430,7 @@ NTAPI
MmDisableVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
OUT PBOOLEAN WasDirty,
OUT PPFN_TYPE Page)
OUT PPFN_NUMBER Page)
{
//
// TODO
@ -557,7 +557,7 @@ NTAPI
MmCreateVirtualMappingUnsafe(IN PEPROCESS Process,
IN PVOID Address,
IN ULONG Protection,
IN PPFN_TYPE Pages,
IN PPFN_NUMBER Pages,
IN ULONG PageCount)
{
//
@ -588,7 +588,7 @@ NTAPI
MmCreateVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
IN ULONG Protection,
IN PPFN_TYPE Pages,
IN PPFN_NUMBER Pages,
IN ULONG PageCount)
{
ULONG i;
@ -644,7 +644,7 @@ MmDeleteVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
IN BOOLEAN FreePage,
OUT PBOOLEAN WasDirty,
OUT PPFN_TYPE Page)
OUT PPFN_NUMBER Page)
{
PMMPTE PointerPte;
MMPTE Pte;
@ -712,7 +712,7 @@ MmCreatePageFileMapping(IN PEPROCESS Process,
return 0;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetPfnForProcess(IN PEPROCESS Process,
IN PVOID Address)

View file

@ -23,7 +23,7 @@
/* TYPES ********************************************************************/
typedef struct _MM_ALLOCATION_REQUEST
{
PFN_TYPE Page;
PFN_NUMBER Page;
LIST_ENTRY ListEntry;
KEVENT Event;
}
@ -101,7 +101,7 @@ MmInitializeMemoryConsumer(ULONG Consumer,
NTSTATUS
NTAPI
MmReleasePageMemoryConsumer(ULONG Consumer, PFN_TYPE Page)
MmReleasePageMemoryConsumer(ULONG Consumer, PFN_NUMBER Page)
{
PMM_ALLOCATION_REQUEST Request;
PLIST_ENTRY Entry;
@ -171,8 +171,8 @@ MiTrimMemoryConsumer(ULONG Consumer)
NTSTATUS
MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages)
{
PFN_TYPE CurrentPage;
PFN_TYPE NextPage;
PFN_NUMBER CurrentPage;
PFN_NUMBER NextPage;
NTSTATUS Status;
(*NrFreedPages) = 0;
@ -228,15 +228,15 @@ MiIsBalancerThread(VOID)
PsGetCurrentThread() == MiBalancerThreadId.UniqueThread;
}
VOID NTAPI MiSetConsumer(IN PFN_TYPE Pfn, IN ULONG Consumer);
VOID NTAPI MiSetConsumer(IN PFN_NUMBER Pfn, IN ULONG Consumer);
NTSTATUS
NTAPI
MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
PPFN_TYPE AllocatedPage)
PPFN_NUMBER AllocatedPage)
{
ULONG OldUsed;
PFN_TYPE Page;
PFN_NUMBER Page;
KIRQL OldIrql;
/*

View file

@ -73,7 +73,7 @@ MiInitializeUserPfnBitmap(VOID)
RtlClearAllBits(&MiUserPfnBitMap);
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetLRUFirstUserPage(VOID)
{
@ -92,7 +92,7 @@ MmGetLRUFirstUserPage(VOID)
VOID
NTAPI
MmInsertLRULastUserPage(PFN_TYPE Pfn)
MmInsertLRULastUserPage(PFN_NUMBER Pfn)
{
KIRQL OldIrql;
@ -102,9 +102,9 @@ MmInsertLRULastUserPage(PFN_TYPE Pfn)
KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetLRUNextUserPage(PFN_TYPE PreviousPfn)
MmGetLRUNextUserPage(PFN_NUMBER PreviousPfn)
{
ULONG Position;
KIRQL OldIrql;
@ -121,7 +121,7 @@ MmGetLRUNextUserPage(PFN_TYPE PreviousPfn)
VOID
NTAPI
MmRemoveLRUUserPage(PFN_TYPE Page)
MmRemoveLRUUserPage(PFN_NUMBER Page)
{
/* Unset the page as a user page */
RtlClearBit(&MiUserPfnBitMap, Page);
@ -448,7 +448,7 @@ MmDumpPfnDatabase(VOID)
VOID
NTAPI
MmSetRmapListHeadPage(PFN_TYPE Pfn, struct _MM_RMAP_ENTRY* ListHead)
MmSetRmapListHeadPage(PFN_NUMBER Pfn, struct _MM_RMAP_ENTRY* ListHead)
{
KIRQL oldIrql;
@ -459,7 +459,7 @@ MmSetRmapListHeadPage(PFN_TYPE Pfn, struct _MM_RMAP_ENTRY* ListHead)
struct _MM_RMAP_ENTRY*
NTAPI
MmGetRmapListHeadPage(PFN_TYPE Pfn)
MmGetRmapListHeadPage(PFN_NUMBER Pfn)
{
KIRQL oldIrql;
struct _MM_RMAP_ENTRY* ListHead;
@ -473,7 +473,7 @@ MmGetRmapListHeadPage(PFN_TYPE Pfn)
VOID
NTAPI
MmSetSavedSwapEntryPage(PFN_TYPE Pfn, SWAPENTRY SwapEntry)
MmSetSavedSwapEntryPage(PFN_NUMBER Pfn, SWAPENTRY SwapEntry)
{
KIRQL oldIrql;
@ -484,7 +484,7 @@ MmSetSavedSwapEntryPage(PFN_TYPE Pfn, SWAPENTRY SwapEntry)
SWAPENTRY
NTAPI
MmGetSavedSwapEntryPage(PFN_TYPE Pfn)
MmGetSavedSwapEntryPage(PFN_NUMBER Pfn)
{
SWAPENTRY SwapEntry;
KIRQL oldIrql;
@ -498,7 +498,7 @@ MmGetSavedSwapEntryPage(PFN_TYPE Pfn)
VOID
NTAPI
MmReferencePage(PFN_TYPE Pfn)
MmReferencePage(PFN_NUMBER Pfn)
{
PPHYSICAL_PAGE Page;
@ -517,7 +517,7 @@ MmReferencePage(PFN_TYPE Pfn)
ULONG
NTAPI
MmGetReferenceCountPage(PFN_TYPE Pfn)
MmGetReferenceCountPage(PFN_NUMBER Pfn)
{
KIRQL oldIrql;
ULONG RCount;
@ -537,14 +537,14 @@ MmGetReferenceCountPage(PFN_TYPE Pfn)
BOOLEAN
NTAPI
MmIsPageInUse(PFN_TYPE Pfn)
MmIsPageInUse(PFN_NUMBER Pfn)
{
return MiIsPfnInUse(MiGetPfnEntry(Pfn));
}
VOID
NTAPI
MiSetConsumer(IN PFN_TYPE Pfn,
MiSetConsumer(IN PFN_NUMBER Pfn,
IN ULONG Type)
{
MiGetPfnEntry(Pfn)->u3.e1.PageLocation = ActiveAndValid;
@ -552,7 +552,7 @@ MiSetConsumer(IN PFN_TYPE Pfn,
VOID
NTAPI
MmDereferencePage(PFN_TYPE Pfn)
MmDereferencePage(PFN_NUMBER Pfn)
{
PPHYSICAL_PAGE Page;
@ -574,11 +574,11 @@ MmDereferencePage(PFN_TYPE Pfn)
}
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmAllocPage(ULONG Type)
{
PFN_TYPE PfnOffset;
PFN_NUMBER PfnOffset;
PPHYSICAL_PAGE PageDescriptor;
BOOLEAN NeedClear = FALSE;
@ -622,7 +622,7 @@ MmAllocPage(ULONG Type)
NTSTATUS
NTAPI
MiZeroPage(PFN_TYPE Page)
MiZeroPage(PFN_NUMBER Page)
{
KIRQL Irql;
PVOID TempAddress;
@ -646,7 +646,7 @@ MmZeroPageThreadMain(PVOID Ignored)
NTSTATUS Status;
KIRQL oldIrql;
PPHYSICAL_PAGE PageDescriptor;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ULONG Count;
/* Free initial kernel memory */

View file

@ -183,7 +183,7 @@ MmCreateProcessAddressSpace(IN ULONG MinWs,
{
NTSTATUS Status;
ULONG i, j;
PFN_TYPE Pfn[2];
PFN_NUMBER Pfn[2];
PULONG PageDirectory;
DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", MinWs, Process);
@ -225,7 +225,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
{
ULONG PdeOffset = ADDR_TO_PDE_OFFSET(Address);
NTSTATUS Status;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ULONG Entry;
PULONG Pt, PageDir;
@ -344,7 +344,7 @@ static ULONG MmGetPageEntryForProcess(PEPROCESS Process, PVOID Address)
return 0;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetPfnForProcess(PEPROCESS Process,
PVOID Address)
@ -360,7 +360,7 @@ MmGetPfnForProcess(PEPROCESS Process,
VOID
NTAPI
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
@ -422,13 +422,13 @@ MmRawDeleteVirtualMapping(PVOID Address)
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
BOOLEAN* WasDirty, PPFN_TYPE Page)
BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
{
BOOLEAN WasValid = FALSE;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ULONG Pte;
PULONG Pt;
@ -701,7 +701,7 @@ NTAPI
MmCreateVirtualMappingUnsafe(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
@ -816,7 +816,7 @@ NTAPI
MmCreateVirtualMapping(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;

View file

@ -348,7 +348,7 @@ MmCreateProcessAddressSpace(IN ULONG MinWs,
{
NTSTATUS Status;
ULONG i, j;
PFN_TYPE Pfn[7];
PFN_NUMBER Pfn[7];
ULONG Count;
DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", MinWs, Process);
@ -459,7 +459,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address)
{
PEPROCESS CurrentProcess = PsGetCurrentProcess();
ULONG i;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
DPRINT("ProcessId %d, Address %x\n", Process->UniqueProcessId, Address);
if (Process != NULL && Process != CurrentProcess)
@ -521,7 +521,7 @@ static PULONGLONG
MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
{
NTSTATUS Status;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ULONGLONG Entry;
ULONGLONG ZeroEntry = 0LL;
PULONGLONG Pt;
@ -636,7 +636,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
{
ULONG PdeOffset = ADDR_TO_PDE_OFFSET(Address);
NTSTATUS Status;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ULONG Entry;
PULONG Pt, PageDir;
@ -780,7 +780,7 @@ static ULONG MmGetPageEntryForProcess(PEPROCESS Process, PVOID Address)
return 0;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetPfnForProcess(PEPROCESS Process,
PVOID Address)
@ -810,7 +810,7 @@ MmGetPfnForProcess(PEPROCESS Process,
VOID
NTAPI
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
@ -931,13 +931,13 @@ MmRawDeleteVirtualMapping(PVOID Address)
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
BOOLEAN* WasDirty, PPFN_TYPE Page)
BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
{
BOOLEAN WasValid = FALSE;
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
Process, Address, FreePage, WasDirty, Page);
@ -1510,7 +1510,7 @@ NTSTATUS
NTAPI
MmCreateVirtualMappingForKernel(PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
@ -1727,7 +1727,7 @@ NTAPI
MmCreateVirtualMappingUnsafe(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
@ -1933,7 +1933,7 @@ NTAPI
MmCreateVirtualMapping(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
@ -2114,7 +2114,7 @@ MmGetPhysicalAddress(PVOID vaddr)
PVOID
NTAPI
MmCreateHyperspaceMapping(PFN_TYPE Page)
MmCreateHyperspaceMapping(PFN_NUMBER Page)
{
PVOID Address;
ULONG i;
@ -2241,11 +2241,11 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
return Address;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
MmChangeHyperspaceMapping(PVOID Address, PFN_NUMBER NewPage)
{
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ASSERT (IS_HYPERSPACE(Address));
if (Ke386Pae)
{
@ -2263,11 +2263,11 @@ MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
return Pfn;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmDeleteHyperspaceMapping(PVOID Address)
{
PFN_TYPE Pfn;
PFN_NUMBER Pfn;
ASSERT (IS_HYPERSPACE(Address));
if (Ke386Pae)
{

View file

@ -754,7 +754,7 @@ MmFreeMemoryArea(
{
BOOLEAN Dirty = FALSE;
SWAPENTRY SwapEntry = 0;
PFN_TYPE Page = 0;
PFN_NUMBER Page = 0;
if (MmIsPageSwapEntry(Process, (PVOID)Address))
{
@ -1039,7 +1039,7 @@ MmMapMemoryArea(PVOID BaseAddress,
for (i = 0; i < PAGE_ROUND_UP(Length) / PAGE_SIZE; i++)
{
PFN_TYPE Page;
PFN_NUMBER Page;
Status = MmRequestPageMemoryConsumer(Consumer, TRUE, &Page);
if (!NT_SUCCESS(Status))

View file

@ -312,7 +312,7 @@ NTAPI
MmCommitPagedPoolAddress(PVOID Address, BOOLEAN Locked)
{
NTSTATUS Status;
PFN_TYPE AllocatedPage;
PFN_NUMBER AllocatedPage;
Status = MmRequestPageMemoryConsumer(MC_PPOOL, FALSE, &AllocatedPage);
if (!NT_SUCCESS(Status))

View file

@ -121,9 +121,9 @@ static BOOLEAN MmSwapSpaceMessage = FALSE;
VOID
NTAPI
MmBuildMdlFromPages(PMDL Mdl, PPFN_TYPE Pages)
MmBuildMdlFromPages(PMDL Mdl, PPFN_NUMBER Pages)
{
memcpy(Mdl + 1, Pages, sizeof(PFN_TYPE) * (PAGE_ROUND_UP(Mdl->ByteOffset+Mdl->ByteCount)/PAGE_SIZE));
memcpy(Mdl + 1, Pages, sizeof(PFN_NUMBER) * (PAGE_ROUND_UP(Mdl->ByteOffset+Mdl->ByteCount)/PAGE_SIZE));
/* FIXME: this flag should be set by the caller perhaps? */
Mdl->MdlFlags |= MDL_IO_PAGE_READ;
@ -217,7 +217,7 @@ MmGetOffsetPageFile(PRETRIEVAL_POINTERS_BUFFER RetrievalPointers, LARGE_INTEGER
NTSTATUS
NTAPI
MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
{
ULONG i, offset;
LARGE_INTEGER file_offset;
@ -278,7 +278,7 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
NTSTATUS
NTAPI
MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
{
ULONG i, offset;
LARGE_INTEGER file_offset;

View file

@ -191,17 +191,17 @@ MmGetPhysicalAddress(PVOID vaddr)
return Addr;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmGetPfnForProcess(PEPROCESS Process,
PVOID Address)
{
return((PFN_TYPE)MmGetPhysicalAddressProcess(Process, Address) >> PAGE_SHIFT);
return((PFN_NUMBER)MmGetPhysicalAddressProcess(Process, Address) >> PAGE_SHIFT);
}
VOID
NTAPI
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
@ -221,7 +221,7 @@ MmRawDeleteVirtualMapping(PVOID Address)
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
BOOLEAN* WasDirty, PPFN_TYPE Page)
BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
@ -358,7 +358,7 @@ NTSTATUS
NTAPI
MmCreateVirtualMappingForKernel(PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
@ -424,7 +424,7 @@ NTAPI
MmCreateVirtualMappingUnsafe(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
@ -498,7 +498,7 @@ NTAPI
MmCreateVirtualMapping(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
PPFN_TYPE Pages,
PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
@ -573,7 +573,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
PVOID
NTAPI
MmCreateHyperspaceMapping(PFN_TYPE Page)
MmCreateHyperspaceMapping(PFN_NUMBER Page)
{
PVOID Address;
ppc_map_info_t info = { 0 };
@ -587,11 +587,11 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
return Address;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
MmChangeHyperspaceMapping(PVOID Address, PFN_NUMBER NewPage)
{
PFN_TYPE OldPage;
PFN_NUMBER OldPage;
ppc_map_info_t info = { 0 };
info.proc = 0;
@ -604,7 +604,7 @@ MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
return NewPage;
}
PFN_TYPE
PFN_NUMBER
NTAPI
MmDeleteHyperspaceMapping(PVOID Address)
{
@ -616,7 +616,7 @@ MmDeleteHyperspaceMapping(PVOID Address)
MmuUnmapPage(&info, 1);
return (PFN_TYPE)info.phys;
return (PFN_NUMBER)info.phys;
}
VOID
@ -658,7 +658,7 @@ NTSTATUS MmPPCCreatePrimitiveMapping(ULONG_PTR PageAddr)
}
/* Use our primitive allocator */
PFN_TYPE MmPPCPrimitiveAllocPage()
PFN_NUMBER MmPPCPrimitiveAllocPage()
{
paddr_t Result = MmuGetPage();
DbgPrint("Got Page %x\n", Result);

View file

@ -54,7 +54,7 @@ MmInitializeRmapList(VOID)
NTSTATUS
NTAPI
MmWritePagePhysicalAddress(PFN_TYPE Page)
MmWritePagePhysicalAddress(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY entry;
PMEMORY_AREA MemoryArea;
@ -188,7 +188,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page)
NTSTATUS
NTAPI
MmPageOutPhysicalAddress(PFN_TYPE Page)
MmPageOutPhysicalAddress(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY entry;
PMEMORY_AREA MemoryArea;
@ -312,7 +312,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page)
VOID
NTAPI
MmSetCleanAllRmaps(PFN_TYPE Page)
MmSetCleanAllRmaps(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY current_entry;
@ -333,7 +333,7 @@ MmSetCleanAllRmaps(PFN_TYPE Page)
VOID
NTAPI
MmSetDirtyAllRmaps(PFN_TYPE Page)
MmSetDirtyAllRmaps(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY current_entry;
@ -354,7 +354,7 @@ MmSetDirtyAllRmaps(PFN_TYPE Page)
BOOLEAN
NTAPI
MmIsDirtyPageRmap(PFN_TYPE Page)
MmIsDirtyPageRmap(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY current_entry;
@ -380,7 +380,7 @@ MmIsDirtyPageRmap(PFN_TYPE Page)
VOID
NTAPI
MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
MmInsertRmap(PFN_NUMBER Page, PEPROCESS Process,
PVOID Address)
{
PMM_RMAP_ENTRY current_entry;
@ -450,7 +450,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
VOID
NTAPI
MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context,
MmDeleteAllRmaps(PFN_NUMBER Page, PVOID Context,
VOID (*DeleteMapping)(PVOID Context, PEPROCESS Process,
PVOID Address))
{
@ -491,7 +491,7 @@ MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context,
VOID
NTAPI
MmDeleteRmap(PFN_TYPE Page, PEPROCESS Process,
MmDeleteRmap(PFN_NUMBER Page, PEPROCESS Process,
PVOID Address)
{
PMM_RMAP_ENTRY current_entry, previous_entry;

View file

@ -465,7 +465,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section,
PFILE_OBJECT FileObject;
PBCB Bcb;
SWAPENTRY SavedSwapEntry;
PFN_TYPE Page;
PFN_NUMBER Page;
BOOLEAN IsImageSection;
ULONG FileOffset;
@ -580,7 +580,7 @@ BOOLEAN MiIsPageFromCache(PMEMORY_AREA MemoryArea,
NTSTATUS
NTAPI
MiCopyFromUserPage(PFN_TYPE DestPage, PVOID SourceAddress)
MiCopyFromUserPage(PFN_NUMBER DestPage, PVOID SourceAddress)
{
PEPROCESS Process;
KIRQL Irql;
@ -601,7 +601,7 @@ NTSTATUS
NTAPI
MiReadPage(PMEMORY_AREA MemoryArea,
ULONG SegOffset,
PPFN_TYPE Page)
PPFN_NUMBER Page)
/*
* FUNCTION: Read a page for a section backed memory area.
* PARAMETERS:
@ -782,7 +782,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
BOOLEAN Locked)
{
ULONG Offset;
PFN_TYPE Page;
PFN_NUMBER Page;
NTSTATUS Status;
PVOID PAddress;
PROS_SECTION_OBJECT Section;
@ -1267,8 +1267,8 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
{
PMM_SECTION_SEGMENT Segment;
PROS_SECTION_OBJECT Section;
PFN_TYPE OldPage;
PFN_TYPE NewPage;
PFN_NUMBER OldPage;
PFN_NUMBER NewPage;
NTSTATUS Status;
PVOID PAddress;
ULONG Offset;
@ -1435,7 +1435,7 @@ MmPageOutDeleteMapping(PVOID Context, PEPROCESS Process, PVOID Address)
{
MM_SECTION_PAGEOUT_CONTEXT* PageOutContext;
BOOLEAN WasDirty;
PFN_TYPE Page;
PFN_NUMBER Page;
PageOutContext = (MM_SECTION_PAGEOUT_CONTEXT*)Context;
if (Process)
@ -1482,7 +1482,7 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace,
PVOID Address,
PMM_PAGEOP PageOp)
{
PFN_TYPE Page;
PFN_NUMBER Page;
MM_SECTION_PAGEOUT_CONTEXT Context;
SWAPENTRY SwapEntry;
ULONG Entry;
@ -1842,7 +1842,7 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace,
ULONG Offset;
PROS_SECTION_OBJECT Section;
PMM_SECTION_SEGMENT Segment;
PFN_TYPE Page;
PFN_NUMBER Page;
SWAPENTRY SwapEntry;
ULONG Entry;
BOOLEAN Private;
@ -2019,7 +2019,7 @@ MmAlterViewAttributes(PMMSUPPORT AddressSpace,
{
ULONG Offset;
ULONG Entry;
PFN_TYPE Page;
PFN_NUMBER Page;
Offset = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress
+ MemoryArea->Data.SectionData.ViewOffset;
@ -2128,7 +2128,7 @@ MmpFreePageFileSegment(PMM_SECTION_SEGMENT Segment)
ULONG Offset;
ULONG Entry;
ULONG SavedSwapEntry;
PFN_TYPE Page;
PFN_NUMBER Page;
Page = 0;
@ -3877,7 +3877,7 @@ NtMapViewOfSection(IN HANDLE SectionHandle,
static VOID
MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
PFN_TYPE Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
{
ULONG Entry;
PFILE_OBJECT FileObject;