https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d5c71429d70b389ef525d…
commit d5c71429d70b389ef525dd894ac989d1e37d691b
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Jan 1 22:52:37 2018 +0100
[NTOS:MM] Pass The FaultCode to MmArmAcceessFault as well and translate it there to
what was declared as "StoreInstruction"
No functional changes.
---
ntoskrnl/mm/ARM3/miarm.h | 2 +-
ntoskrnl/mm/ARM3/pagfault.c | 3 ++-
ntoskrnl/mm/mmfault.c | 7 +++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h
index b68d680210..00801d8c16 100644
--- a/ntoskrnl/mm/ARM3/miarm.h
+++ b/ntoskrnl/mm/ARM3/miarm.h
@@ -1766,7 +1766,7 @@ MiRosProtectVirtualMemory(
NTSTATUS
NTAPI
MmArmAccessFault(
- IN BOOLEAN StoreInstruction,
+ IN ULONG FaultCode,
IN PVOID Address,
IN KPROCESSOR_MODE Mode,
IN PVOID TrapInformation
diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c
index 3176a6b0d1..b85a25be05 100644
--- a/ntoskrnl/mm/ARM3/pagfault.c
+++ b/ntoskrnl/mm/ARM3/pagfault.c
@@ -1618,7 +1618,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
NTSTATUS
NTAPI
-MmArmAccessFault(IN BOOLEAN StoreInstruction,
+MmArmAccessFault(IN ULONG FaultCode,
IN PVOID Address,
IN KPROCESSOR_MODE Mode,
IN PVOID TrapInformation)
@@ -1644,6 +1644,7 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
ULONG Color;
BOOLEAN IsSessionAddress;
PMMPFN Pfn1;
+ BOOLEAN StoreInstruction = !MI_IS_NOT_PRESENT_FAULT(FaultCode);
DPRINT("ARM3 FAULT AT: %p\n", Address);
/* Check for page fault on high IRQL */
diff --git a/ntoskrnl/mm/mmfault.c b/ntoskrnl/mm/mmfault.c
index 12774d6ebb..68910e7a2d 100644
--- a/ntoskrnl/mm/mmfault.c
+++ b/ntoskrnl/mm/mmfault.c
@@ -207,7 +207,6 @@ MmAccessFault(IN ULONG FaultCode,
IN PVOID TrapInformation)
{
PMEMORY_AREA MemoryArea = NULL;
- BOOLEAN StoreInstruction = !MI_IS_NOT_PRESENT_FAULT(FaultCode);
/* Cute little hack for ROS */
if ((ULONG_PTR)Address >= (ULONG_PTR)MmSystemRangeStart)
@@ -227,7 +226,7 @@ MmAccessFault(IN ULONG FaultCode,
{
/* This is an ARM3 fault */
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? */
@@ -249,11 +248,11 @@ MmAccessFault(IN ULONG FaultCode,
{
/* This is an ARM3 fault */
DPRINT("ARM3 fault %p\n", MemoryArea);
- return MmArmAccessFault(StoreInstruction, Address, Mode, TrapInformation);
+ return MmArmAccessFault(FaultCode, Address, Mode, TrapInformation);
}
/* Keep same old ReactOS Behaviour */
- if (StoreInstruction)
+ if (!MI_IS_NOT_PRESENT_FAULT(FaultCode))
{
/* Call access fault */
return MmpAccessFault(Mode, (ULONG_PTR)Address, TrapInformation ? FALSE : TRUE);