Author: ros-arm-bringup
Date: Tue Jun 23 13:11:01 2009
New Revision: 41576
URL:
http://svn.reactos.org/svn/reactos?rev=41576&view=rev
Log:
- So it turns out bad things can happen if you play behind Mm's back.
- The lovely poetry is brought to you by 7AM coding marathons...
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/init.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/init.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/init.c [iso-8859-1] Tue Jun 23 13:11:01 2009
@@ -103,6 +103,29 @@
ULONG MmNumberOfSystemPtes;
/* PRIVATE FUNCTIONS **********************************************************/
+
+//
+// In Bavaria, this is probably a hate crime
+//
+VOID
+FASTCALL
+MiSyncARM3WithROS(IN PVOID AddressStart,
+ IN PVOID AddressEnd)
+{
+ //
+ // Puerile piece of junk-grade carbonized horseshit puss sold to the lowest bidder
+ //
+ ULONG Pde = ADDR_TO_PDE_OFFSET(AddressStart);
+ while (Pde < ADDR_TO_PDE_OFFSET(AddressEnd))
+ {
+ //
+ // This both odious and heinous
+ //
+ extern PULONG MmGlobalKernelPageDirectory;
+ MmGlobalKernelPageDirectory[Pde] = ((PULONG)PAGEDIRECTORY_MAP)[Pde];
+ Pde++;
+ }
+}
NTSTATUS
NTAPI
@@ -490,6 +513,13 @@
// Set the counter to maximum to boot with
//
MiFirstReservedZeroingPte->u.Hard.PageFrameNumber = MI_ZERO_PTES - 1;
+
+ //
+ // Sync us up with ReactOS Mm
+ //
+ MiSyncARM3WithROS(MmNonPagedSystemStart, (PVOID)((ULONG_PTR)MmNonPagedPoolEnd -
1));
+ MiSyncARM3WithROS(MmNonPagedPoolStart, (PVOID)((ULONG_PTR)MmNonPagedPoolStart +
MmSizeOfNonPagedPoolInBytes - 1));
+ MiSyncARM3WithROS((PVOID)HYPER_SPACE, (PVOID)(HYPER_SPACE + PAGE_SIZE - 1));
}
//