Author: sir_richard
Date: Tue Feb 9 03:14:58 2010
New Revision: 45516
URL:
http://svn.reactos.org/svn/reactos?rev=45516&view=rev
Log:
[NDK]: Use new ARMv6 PTE structures.
Modified:
trunk/reactos/include/ndk/arm/mmtypes.h
Modified: trunk/reactos/include/ndk/arm/mmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/mmtypes.h?…
==============================================================================
--- trunk/reactos/include/ndk/arm/mmtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/arm/mmtypes.h [iso-8859-1] Tue Feb 9 03:14:58 2010
@@ -47,90 +47,56 @@
//
// Page Table Entry Definitions
//
-typedef struct _HARDWARE_PTE_ARM
+typedef struct _HARDWARE_PDE_ARMV6
{
- union
- {
- union
- {
- struct
- {
- ULONG Type:2;
- ULONG Unused:30;
- } Fault;
- struct
- {
- ULONG Type:2;
- ULONG Ignored:2;
- ULONG Reserved:1;
- ULONG Domain:4;
- ULONG Ignored1:1;
- ULONG BaseAddress:22;
- } Coarse;
- struct
- {
- ULONG Type:2;
- ULONG Buffered:1;
- ULONG Cached:1;
- ULONG Reserved:1;
- ULONG Domain:4;
- ULONG Ignored:1;
- ULONG Access:2;
- ULONG Ignored1:8;
- ULONG BaseAddress:12;
- } Section;
- struct
- {
- ULONG Type:2;
- ULONG Reserved:3;
- ULONG Domain:4;
- ULONG Ignored:3;
- ULONG BaseAddress:20;
- } Fine;
- } L1;
- union
- {
- struct
- {
- ULONG Type:2;
- ULONG Unused:30;
- } Fault;
- struct
- {
- ULONG Type:2;
- ULONG Buffered:1;
- ULONG Cached:1;
- ULONG Access0:2;
- ULONG Access1:2;
- ULONG Access2:2;
- ULONG Access3:2;
- ULONG Ignored:4;
- ULONG BaseAddress:16;
- } Large;
- struct
- {
- ULONG Type:2;
- ULONG Buffered:1;
- ULONG Cached:1;
- ULONG Access0:2;
- ULONG Access1:2;
- ULONG Access2:2;
- ULONG Access3:2;
- ULONG BaseAddress:20;
- } Small;
- struct
- {
- ULONG Type:2;
- ULONG Buffered:1;
- ULONG Cached:1;
- ULONG Access0:2;
- ULONG Ignored:4;
- ULONG BaseAddress:22;
- } Tiny;
- } L2;
- ULONG AsUlong;
- };
-} HARDWARE_PTE_ARM, *PHARDWARE_PTE_ARM;
+ ULONG Valid:1; // Only for small pages
+ ULONG LargePage:1; // Note, if large then Valid = 0
+ ULONG Buffered:1;
+ ULONG Cached:1;
+ ULONG NoExecute:1;
+ ULONG Domain:4;
+ ULONG Ecc:1;
+ ULONG PageFrameNumber:22;
+} HARDWARE_PDE_ARMV6, *PHARDWARE_PDE_ARMV6;
+
+typedef struct _HARDWARE_LARGE_PTE_ARMV6
+{
+ ULONG Valid:1; // Only for small pages
+ ULONG LargePage:1; // Note, if large then Valid = 0
+ ULONG Buffered:1;
+ ULONG Cached:1;
+ ULONG NoExecute:1;
+ ULONG Domain:4;
+ ULONG Ecc:1;
+ ULONG Accessed:1;
+ ULONG Owner:1;
+ ULONG CacheAttributes:3;
+ ULONG ReadOnly:1;
+ ULONG Shared:1;
+ ULONG NonGlobal:1;
+ ULONG SuperLagePage:1;
+ ULONG Reserved:1;
+ ULONG PageFrameNumber:12;
+} HARDWARE_LARGE_PTE_ARMV6, *PHARDWARE_LARGE_PTE_ARMV6;
+
+typedef struct _HARDWARE_PTE_ARMV6
+{
+ ULONG NoExecute:1;
+ ULONG Valid:1;
+ ULONG Buffered:1;
+ ULONG Cached:1;
+ ULONG Accessed:1;
+ ULONG Owner:1;
+ ULONG CacheAttributes:3;
+ ULONG ReadOnly:1;
+ ULONG Shared:1;
+ ULONG NonGlobal:1;
+ ULONG PageFrameNumber:20;
+} HARDWARE_PTE_ARMV6, *PHARDWARE_PTE_ARMV6;
+
+C_ASSERT(sizeof(HARDWARE_PDE_ARMV6) == sizeof(ULONG));
+C_ASSERT(sizeof(HARDWARE_LARGE_PTE_ARMV6) == sizeof(ULONG));
+C_ASSERT(sizeof(HARDWARE_PTE_ARMV6) == sizeof(ULONG));
typedef struct _MMPTE_SOFTWARE
{
@@ -185,53 +151,18 @@
ULONG filler1:1;
} MMPTE_LIST;
-typedef struct _MMPDE_HARDWARE // FIXFIX: Find a way to make this more portable
-{
- union
- {
- union
- {
- struct
- {
- ULONG Valid:1;
- ULONG Section:1;
- ULONG Sbz:3;
- ULONG Domain:4;
- ULONG EccEnabled:1;
- ULONG PageFrameNumber:22;
- } Coarse;
- struct
- {
- ULONG Coarse:1;
- ULONG Valid:1;
- ULONG Buffered:1;
- ULONG Cached:1;
- ULONG Reserved:1;
- ULONG Domain:4;
- ULONG EccEnabled:1;
- ULONG Access:2;
- ULONG ExtendedAccess:3;
- ULONG Sbz:3;
- ULONG SuperSection:1;
- ULONG Sbz1:1;
- ULONG PageFrameNumber:12;
- } Section;
- ULONG AsUlong;
- } Hard;
- } u;
-} MMPDE_HARDWARE, *PMMPDE_HARDWARE;
-
typedef union _MMPTE_HARDWARE
{
struct
{
- ULONG ExecuteNever:1;
+ ULONG NoExecute:1;
ULONG Valid:1;
ULONG Buffered:1;
ULONG Cached:1;
- ULONG Access:2;
- ULONG TypeExtension:3;
- ULONG ExtendedAccess:1;
+ ULONG Access:1;
+ ULONG Owner:1;
+ ULONG CacheAttributes:3;
+ ULONG ReadOnly:1;
ULONG Shared:1;
ULONG NonGlobal:1;
ULONG PageFrameNumber:20;
@@ -242,7 +173,7 @@
//
// Use the right PTE structure
//
-#define HARDWARE_PTE HARDWARE_PTE_ARM
-#define PHARDWARE_PTE PHARDWARE_PTE_ARM
+#define HARDWARE_PTE HARDWARE_PTE_ARMV6
+#define PHARDWARE_PTE PHARDWARE_PTE_ARMV6
#endif