mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[NTOS:MM] Pass FaultCode to MiDispatchFault
This commit is contained in:
parent
3f426aabde
commit
1014d50a4b
|
@ -1274,7 +1274,7 @@ MiResolveProtoPteFault(IN BOOLEAN StoreInstruction,
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
MiDispatchFault(IN BOOLEAN StoreInstruction,
|
||||
MiDispatchFault(IN ULONG FaultCode,
|
||||
IN PVOID Address,
|
||||
IN PMMPTE PointerPte,
|
||||
IN PMMPTE PointerProtoPte,
|
||||
|
@ -1333,7 +1333,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
|||
}
|
||||
|
||||
/* Resolve the fault -- this will release the PFN lock */
|
||||
Status = MiResolveProtoPteFault(StoreInstruction,
|
||||
Status = MiResolveProtoPteFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode),
|
||||
Address,
|
||||
PointerPte,
|
||||
PointerProtoPte,
|
||||
|
@ -1450,7 +1450,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
|||
if (++ProcessedPtes == PteCount)
|
||||
{
|
||||
/* Complete the fault */
|
||||
MiCompleteProtoPteFault(StoreInstruction,
|
||||
MiCompleteProtoPteFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode),
|
||||
Address,
|
||||
PointerPte,
|
||||
PointerProtoPte,
|
||||
|
@ -1489,7 +1489,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
|||
ASSERT(PointerPte->u.Hard.Valid == 0);
|
||||
|
||||
/* Resolve the fault -- this will release the PFN lock */
|
||||
Status = MiResolveProtoPteFault(StoreInstruction,
|
||||
Status = MiResolveProtoPteFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode),
|
||||
Address,
|
||||
PointerPte,
|
||||
PointerProtoPte,
|
||||
|
@ -1537,7 +1537,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
|||
LockIrql = MiAcquirePfnLock();
|
||||
|
||||
/* Resolve */
|
||||
Status = MiResolveTransitionFault(StoreInstruction, Address, PointerPte, Process, LockIrql, &InPageBlock);
|
||||
Status = MiResolveTransitionFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode), Address, PointerPte, Process, LockIrql, &InPageBlock);
|
||||
|
||||
ASSERT(NT_SUCCESS(Status));
|
||||
|
||||
|
@ -1576,7 +1576,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
|||
LockIrql = MiAcquirePfnLock();
|
||||
|
||||
/* Resolve */
|
||||
Status = MiResolvePageFileFault(StoreInstruction, Address, PointerPte, Process, &LockIrql);
|
||||
Status = MiResolvePageFileFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode), Address, PointerPte, Process, &LockIrql);
|
||||
|
||||
/* And now release the lock and leave*/
|
||||
MiReleasePfnLock(LockIrql);
|
||||
|
@ -2028,7 +2028,7 @@ _WARN("Session space stuff is not implemented yet!")
|
|||
}
|
||||
|
||||
/* Now do the real fault handling */
|
||||
Status = MiDispatchFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode),
|
||||
Status = MiDispatchFault(FaultCode,
|
||||
Address,
|
||||
PointerPte,
|
||||
ProtoPte,
|
||||
|
@ -2480,7 +2480,7 @@ UserFault:
|
|||
}
|
||||
|
||||
/* Dispatch the fault */
|
||||
Status = MiDispatchFault(!MI_IS_NOT_PRESENT_FAULT(FaultCode),
|
||||
Status = MiDispatchFault(FaultCode,
|
||||
Address,
|
||||
PointerPte,
|
||||
ProtoPte,
|
||||
|
|
|
@ -191,7 +191,7 @@ ProtectToPTE(ULONG flProtect)
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
MiDispatchFault(IN BOOLEAN StoreInstruction,
|
||||
MiDispatchFault(IN ULONG FaultCode,
|
||||
IN PVOID Address,
|
||||
IN PMMPTE PointerPte,
|
||||
IN PMMPTE PointerProtoPte,
|
||||
|
@ -262,7 +262,8 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
|
|||
ASSERT(PointerPde->u.Long == 0);
|
||||
|
||||
MI_WRITE_INVALID_PTE(PointerPde, DemandZeroPde);
|
||||
Status = MiDispatchFault(TRUE,
|
||||
// Tiny HACK: Parameter 1 is the architecture specific FaultCode for an access violation (i.e. page is present)
|
||||
Status = MiDispatchFault(0x1,
|
||||
Pt,
|
||||
PointerPde,
|
||||
NULL,
|
||||
|
|
Loading…
Reference in a new issue