|
|
Definition at line 594 of file pagfault.c.
Referenced by MiDispatchFault().
{
MMPTE TempPte, PteContents;
PMMPFN Pfn1;
PFN_NUMBER PageFrameIndex;
NTSTATUS Status;
PVOID InPageBlock = NULL;
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
ASSERT(PointerPte->u.Hard.Valid == 0);
ASSERT(PointerPte->u.Soft.Prototype == 1);
TempPte = *PointerProtoPte;
if (TempPte.u.Hard.Valid == 1)
{
PageFrameIndex = PFN_FROM_PTE(&TempPte);
Pfn1 = MiGetPfnEntry(PageFrameIndex);
Pfn1->u2.ShareCount++;
InterlockedIncrement(&KeGetCurrentPrcb()->MmTransitionCount);
return MiCompleteProtoPteFault(StoreInstruction,
Address,
PointerPte,
PointerProtoPte,
OldIrql,
NULL);
}
if (TempPte.u.Long == 0)
{
DPRINT1("Access on reserved section?\n");
KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
return STATUS_ACCESS_VIOLATION;
}
PteContents = *PointerPte;
if (PteContents.u.Soft.PageFileHigh != MI_PTE_LOOKUP_NEEDED)
{
if (!PteContents.u.Proto.ReadOnly)
{
}
}
else
{
}
if (PointerPte <= MiHighestUserPte) ASSERT(Process->CloneRoot == NULL);
ASSERT(TempPte.u.Soft.Prototype == 0);
if (TempPte.u.Soft.Transition == 1)
{
ASSERT(OldIrql != MM_NOIRQL);
Status = MiResolveTransitionFault(Address,
PointerProtoPte,
Process,
OldIrql,
&InPageBlock);
ASSERT(NT_SUCCESS(Status));
}
else
{
ASSERT(TempPte.u.Soft.PageFileHigh == 0);
Status = MiResolveDemandZeroFault(Address,
PointerProtoPte,
Process,
OldIrql);
ASSERT(NT_SUCCESS(Status));
}
ASSERT(PointerPte->u.Hard.Valid == 0);
return MiCompleteProtoPteFault(StoreInstruction,
Address,
PointerPte,
PointerProtoPte,
OldIrql,
NULL);
}
|