Author: ros-arm-bringup
Date: Wed Jul 15 19:52:32 2009
New Revision: 41978
URL:
http://svn.reactos.org/svn/reactos?rev=41978&view=rev
Log:
- Define portable flags for touching fields in the MMPTE structure, which might have
different names/not exist on other architectures.
- Define PTE_BASE and PDE_BASE since these are the correct cross-platform definitions.
Modified:
trunk/reactos/ntoskrnl/include/internal/i386/mm.h
Modified: trunk/reactos/ntoskrnl/include/internal/i386/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] Wed Jul 15 19:52:32
2009
@@ -14,7 +14,10 @@
/* Base addresses of PTE and PDE */
#define PAGETABLE_MAP (0xc0000000)
#define PAGEDIRECTORY_MAP (0xc0000000 + (PAGETABLE_MAP / (1024)))
-#define HYPER_SPACE (0xC0400000)
+
+#define PTE_BASE 0xC0000000
+#define PDE_BASE 0xC0300000
+#define HYPER_SPACE 0xC0400000
/* Converting address to a corresponding PDE or PTE entry */
#define MiAddressToPde(x) \
@@ -36,4 +39,13 @@
/* Easy accessing PFN in PTE */
#define PFN_FROM_PTE(v) ((v)->u.Hard.PageFrameNumber)
+#define MI_MAKE_LOCAL_PAGE(x) ((x)->u.Hard.Global = 0)
+#define MI_MAKE_DIRTY_PAGE(x) ((x)->u.Hard.Dirty = 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)
+#define MI_IS_PAGE_WRITEABLE(x) ((x)->u.Hard.Write == 1)
+#define MI_IS_PAGE_COPY_ON_WRITE(x)((x)->u.Hard.CopyOnWrite == 1)
+#define MI_IS_PAGE_DIRTY(x) ((x)->u.Hard.Dirty == 1)
+
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H */