[NTOS:MM] Pass The FaultCode to MmArmAcceessFault as well and translate it there to what was declared as "StoreInstruction"

No functional changes.
This commit is contained in:
Timo Kreuzer 2018-01-01 22:52:37 +01:00
parent 3021c2d571
commit d5c71429d7
3 changed files with 6 additions and 6 deletions

View file

@ -1766,7 +1766,7 @@ MiRosProtectVirtualMemory(
NTSTATUS NTSTATUS
NTAPI NTAPI
MmArmAccessFault( MmArmAccessFault(
IN BOOLEAN StoreInstruction, IN ULONG FaultCode,
IN PVOID Address, IN PVOID Address,
IN KPROCESSOR_MODE Mode, IN KPROCESSOR_MODE Mode,
IN PVOID TrapInformation IN PVOID TrapInformation

View file

@ -1618,7 +1618,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
NTSTATUS NTSTATUS
NTAPI NTAPI
MmArmAccessFault(IN BOOLEAN StoreInstruction, MmArmAccessFault(IN ULONG FaultCode,
IN PVOID Address, IN PVOID Address,
IN KPROCESSOR_MODE Mode, IN KPROCESSOR_MODE Mode,
IN PVOID TrapInformation) IN PVOID TrapInformation)
@ -1644,6 +1644,7 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
ULONG Color; ULONG Color;
BOOLEAN IsSessionAddress; BOOLEAN IsSessionAddress;
PMMPFN Pfn1; PMMPFN Pfn1;
BOOLEAN StoreInstruction = !MI_IS_NOT_PRESENT_FAULT(FaultCode);
DPRINT("ARM3 FAULT AT: %p\n", Address); DPRINT("ARM3 FAULT AT: %p\n", Address);
/* Check for page fault on high IRQL */ /* Check for page fault on high IRQL */

View file

@ -207,7 +207,6 @@ MmAccessFault(IN ULONG FaultCode,
IN PVOID TrapInformation) IN PVOID TrapInformation)
{ {
PMEMORY_AREA MemoryArea = NULL; PMEMORY_AREA MemoryArea = NULL;
BOOLEAN StoreInstruction = !MI_IS_NOT_PRESENT_FAULT(FaultCode);
/* Cute little hack for ROS */ /* Cute little hack for ROS */
if ((ULONG_PTR)Address >= (ULONG_PTR)MmSystemRangeStart) if ((ULONG_PTR)Address >= (ULONG_PTR)MmSystemRangeStart)
@ -227,7 +226,7 @@ MmAccessFault(IN ULONG FaultCode,
{ {
/* This is an ARM3 fault */ /* This is an ARM3 fault */
DPRINT("ARM3 fault %p\n", MemoryArea); DPRINT("ARM3 fault %p\n", MemoryArea);
return MmArmAccessFault(StoreInstruction, Address, Mode, TrapInformation); return MmArmAccessFault(FaultCode, Address, Mode, TrapInformation);
} }
/* Is there a ReactOS address space yet? */ /* Is there a ReactOS address space yet? */
@ -249,11 +248,11 @@ MmAccessFault(IN ULONG FaultCode,
{ {
/* This is an ARM3 fault */ /* This is an ARM3 fault */
DPRINT("ARM3 fault %p\n", MemoryArea); DPRINT("ARM3 fault %p\n", MemoryArea);
return MmArmAccessFault(StoreInstruction, Address, Mode, TrapInformation); return MmArmAccessFault(FaultCode, Address, Mode, TrapInformation);
} }
/* Keep same old ReactOS Behaviour */ /* Keep same old ReactOS Behaviour */
if (StoreInstruction) if (!MI_IS_NOT_PRESENT_FAULT(FaultCode))
{ {
/* Call access fault */ /* Call access fault */
return MmpAccessFault(Mode, (ULONG_PTR)Address, TrapInformation ? FALSE : TRUE); return MmpAccessFault(Mode, (ULONG_PTR)Address, TrapInformation ? FALSE : TRUE);