[ros-diffs] [sir_richard] 47173: [NTOS]: Compute MiHighestUserPte, MiHighestUserPde, MiSessionImagePteStart, MiSessionImagePteEnd, MiSessionBasePte, MiSessionLastPte since these internal variables did not exit yet. Useful for debugging and also future PFN support. Just computes some values, no behavior changes.

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Wed May 12 20:36:16 CEST 2010


Author: sir_richard
Date: Wed May 12 20:36:15 2010
New Revision: 47173

URL: http://svn.reactos.org/svn/reactos?rev=47173&view=rev
Log:
[NTOS]: Compute MiHighestUserPte, MiHighestUserPde, MiSessionImagePteStart, MiSessionImagePteEnd, MiSessionBasePte, MiSessionLastPte since these internal variables did not exit yet. Useful for debugging and also future PFN support. Just computes some values, no behavior changes.

Modified:
    trunk/reactos/ntoskrnl/mm/ARM3/mminit.c

Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?rev=47173&r1=47172&r2=47173&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Wed May 12 20:36:15 2010
@@ -136,6 +136,14 @@
 ULONG MmSessionPoolSize;
 ULONG MmSessionImageSize;
 
+/*
+ * These are the PTE addresses of the boundaries carved out above
+ */
+PMMPTE MiSessionImagePteStart;
+PMMPTE MiSessionImagePteEnd;
+PMMPTE MiSessionBasePte;
+PMMPTE MiSessionLastPte;
+
 //
 // The system view space, on the other hand, is where sections that are memory
 // mapped into "system space" end up.
@@ -217,6 +225,11 @@
 PVOID MmHighestUserAddress;
 PVOID MmSystemRangeStart;
 
+/* And these store the respective highest PTE/PDE address */
+PMMPTE MiHighestUserPte;
+PMMPDE MiHighestUserPde;
+
+/* These variables define the system cache address space */
 PVOID MmSystemCacheStart;
 PVOID MmSystemCacheEnd;
 MMSUPPORT MmSystemCacheWs;
@@ -1700,6 +1713,10 @@
         MmUserProbeAddress = (ULONG_PTR)MmSystemRangeStart - 0x10000;
         MmHighestUserAddress = (PVOID)(MmUserProbeAddress - 1);
         
+        /* Highest PTE and PDE based on the addresses above */
+        MiHighestUserPte = MiAddressToPte(MmHighestUserAddress);
+        MiHighestUserPde = MiAddressToPde(MmHighestUserAddress);
+        
         //
         // Get the size of the boot loader's image allocations and then round
         // that region up to a PDE size, so that any PDEs we might create for
@@ -1772,7 +1789,12 @@
         //
         MiSystemViewStart = (PVOID)((ULONG_PTR)MmSessionBase -
                                     MmSystemViewSize);
-                                    
+
+        /* Compute the PTE addresses for all the addresses we carved out */
+        MiSessionImagePteStart = MiAddressToPte(MiSessionImageStart);
+        MiSessionImagePteEnd = MiAddressToPte(MiSessionImageEnd);
+        MiSessionBasePte = MiAddressToPte(MmSessionBase);
+        MiSessionLastPte = MiAddressToPte(MiSessionSpaceEnd);
                                     
         /* Initialize the user mode image list */
         InitializeListHead(&MmLoadedUserImageList);




More information about the Ros-diffs mailing list