mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[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.
svn path=/trunk/; revision=48976
This commit is contained in:
parent
251be92abf
commit
ee353ad690
1 changed files with 11 additions and 3 deletions
|
@ -713,6 +713,16 @@ MiInitializePfn(IN PFN_NUMBER PageFrameIndex,
|
||||||
{
|
{
|
||||||
/* Only valid from MmCreateProcessAddressSpace path */
|
/* Only valid from MmCreateProcessAddressSpace path */
|
||||||
ASSERT(PsGetCurrentProcess()->Vm.WorkingSetSize == 0);
|
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 */
|
/* Otherwise this is a fresh page -- set it up */
|
||||||
|
@ -870,11 +880,9 @@ MiInitializePfnForOtherProcess(IN PFN_NUMBER PageFrameIndex,
|
||||||
/* Setup the PTE */
|
/* Setup the PTE */
|
||||||
Pfn1 = MiGetPfnEntry(PageFrameIndex);
|
Pfn1 = MiGetPfnEntry(PageFrameIndex);
|
||||||
Pfn1->PteAddress = PointerPte;
|
Pfn1->PteAddress = PointerPte;
|
||||||
|
|
||||||
#if 0 // When using ARM3 PFN
|
|
||||||
/* Make this a software PTE */
|
/* Make this a software PTE */
|
||||||
MI_MAKE_SOFTWARE_PTE(&Pfn1->OriginalPte, MM_READWRITE);
|
MI_MAKE_SOFTWARE_PTE(&Pfn1->OriginalPte, MM_READWRITE);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Setup the page */
|
/* Setup the page */
|
||||||
ASSERT(Pfn1->u3.e2.ReferenceCount == 0);
|
ASSERT(Pfn1->u3.e2.ReferenceCount == 0);
|
||||||
|
|
Loading…
Reference in a new issue