Author: sir_richard
Date: Mon Oct 4 18:22:50 2010
New Revision: 48976
URL:
http://svn.reactos.org/svn/reactos?rev=48976&view=rev
Log:
[NTOS]: Go ahead and now fill out the OriginalPte field for PFNs initialized with
MiInitializePfn(ForOtherProcess). They should only belong to ARM3 so they'll never
have SwapEntry/RMAP associated with them. This functionality is important for future
Prototype PTE support, among other things, as it lets us get the original PTE value
written for a given PFN entry.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Mon Oct 4 18:22:50 2010
@@ -713,6 +713,16 @@
{
/* Only valid from MmCreateProcessAddressSpace path */
ASSERT(PsGetCurrentProcess()->Vm.WorkingSetSize == 0);
+
+ /* Make this a demand zero PTE */
+ MI_MAKE_SOFTWARE_PTE(&Pfn1->OriginalPte, MM_READWRITE);
+ }
+ else
+ {
+ /* Copy the PTE data */
+ Pfn1->OriginalPte = *PointerPte;
+ ASSERT(!((Pfn1->OriginalPte.u.Soft.Prototype == 0) &&
+ (Pfn1->OriginalPte.u.Soft.Transition == 1)));
}
/* Otherwise this is a fresh page -- set it up */
@@ -870,11 +880,9 @@
/* Setup the PTE */
Pfn1 = MiGetPfnEntry(PageFrameIndex);
Pfn1->PteAddress = PointerPte;
-
-#if 0 // When using ARM3 PFN
+
/* Make this a software PTE */
MI_MAKE_SOFTWARE_PTE(&Pfn1->OriginalPte, MM_READWRITE);
-#endif
/* Setup the page */
ASSERT(Pfn1->u3.e2.ReferenceCount == 0);