[ros-diffs] [sir_richard] 49728: [NTOS]: Define portable MI_MAKE_ACCESSED_PAGE macro. [NTOS]: Fix MiDetermineUserGlobalPteMask to account ARM, where the PDE and PTE formats are different. [NTOS]: Fix MiDetermi...

sir_richard at svn.reactos.org sir_richard at svn.reactos.org
Tue Nov 23 16:34:31 UTC 2010


Author: sir_richard
Date: Tue Nov 23 16:34:30 2010
New Revision: 49728

URL: http://svn.reactos.org/svn/reactos?rev=49728&view=rev
Log:
[NTOS]: Define portable MI_MAKE_ACCESSED_PAGE macro.
[NTOS]: Fix MiDetermineUserGlobalPteMask to account ARM, where the PDE and PTE formats are different.
[NTOS]: Fix MiDetermineUserGlobalPteMask to use portable PTE macros instead of hard-coding x86-only fields.

Modified:
    trunk/reactos/ntoskrnl/include/internal/arm/mm.h
    trunk/reactos/ntoskrnl/include/internal/i386/mm.h
    trunk/reactos/ntoskrnl/mm/ARM3/miarm.h

Modified: trunk/reactos/ntoskrnl/include/internal/arm/mm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/arm/mm.h?rev=49728&r1=49727&r2=49728&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] Tue Nov 23 16:34:30 2010
@@ -20,6 +20,7 @@
 #define PTE_BASE    0xC0000000
 #define PTE_TOP     0xC03FFFFF
 #define PDE_BASE    0xC0400000
+#define PDE_TOP     0xC04FFFFF
 #define HYPER_SPACE 0xC0500000
 
 #if 0
@@ -106,6 +107,7 @@
 
 #define MI_MAKE_LOCAL_PAGE(x)      ((x)->u.Hard.NonGlobal = 1)
 #define MI_MAKE_DIRTY_PAGE(x)      
+#define MI_MAKE_ACCESSED_PAGE(x)      
 #define MI_MAKE_OWNER_PAGE(x)      ((x)->u.Hard.Owner = 1)
 #define MI_MAKE_WRITE_PAGE(x)      ((x)->u.Hard.ReadOnly = 0)
 #define MI_PAGE_DISABLE_CACHE(x)   ((x)->u.Hard.Cached = 0)

Modified: trunk/reactos/ntoskrnl/include/internal/i386/mm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i386/mm.h?rev=49728&r1=49727&r2=49728&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] Tue Nov 23 16:34:30 2010
@@ -51,6 +51,7 @@
 
 #define MI_MAKE_LOCAL_PAGE(x)      ((x)->u.Hard.Global = 0)
 #define MI_MAKE_DIRTY_PAGE(x)      ((x)->u.Hard.Dirty = 1)
+#define MI_MAKE_ACCESSED_PAGE(x)   ((x)->u.Hard.Accessed = 1)
 #define MI_PAGE_DISABLE_CACHE(x)   ((x)->u.Hard.CacheDisable = 1)
 #define MI_PAGE_WRITE_THROUGH(x)   ((x)->u.Hard.WriteThrough = 1)
 #define MI_PAGE_WRITE_COMBINED(x)  ((x)->u.Hard.WriteThrough = 0)

Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?rev=49728&r1=49727&r2=49728&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Tue Nov 23 16:34:30 2010
@@ -520,7 +520,7 @@
 //
 ULONG
 FORCEINLINE
-MiDetermineUserGlobalPteMask(IN PMMPTE PointerPte)
+MiDetermineUserGlobalPteMask(IN PVOID PointerPte)
 {
     MMPTE TempPte;
     
@@ -529,14 +529,15 @@
     
     /* Make it valid and accessed */
     TempPte.u.Hard.Valid = TRUE;
-    TempPte.u.Hard.Accessed = TRUE;
+    MI_MAKE_ACCESSED_PAGE(&TempPte);
     
     /* Is this for user-mode? */
-    if ((PointerPte <= MiHighestUserPte) ||
-        ((PointerPte >= MiAddressToPde(NULL)) && (PointerPte <= MiHighestUserPde)))
+    if ((PointerPte <= (PVOID)MiHighestUserPte) ||
+        ((PointerPte >= (PVOID)MiAddressToPde(NULL)) &&
+         (PointerPte <= (PVOID)MiHighestUserPde)))
     {
         /* Set the owner bit */
-        TempPte.u.Hard.Owner = TRUE;
+        MI_MAKE_OWNER_PAGE(&TempPte);
     }
     
     /* FIXME: We should also set the global bit */




More information about the Ros-diffs mailing list