some more win32k 64 bit fixes
[reactos.git] / reactos / ntoskrnl / include / internal / arm / mm.h
1 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARM_MM_H
2 #define __NTOSKRNL_INCLUDE_INTERNAL_ARM_MM_H
3
4 #if __GNUC__ >=3
5 #pragma GCC system_header
6 #endif
7
8 //
9 // Number of bits corresponding to the area that a PDE entry represents (1MB)
10 //
11 #define PDE_SHIFT 20
12 #define PDE_SIZE (1 << PDE_SHIFT)
13
14 //
15 // Number of bits corresponding to the area that a coarse page table entry represents (4KB)
16 //
17 #define PTE_SHIFT 12
18 #define PAGE_SIZE (1 << PTE_SHIFT)
19
20 //
21 // Number of bits corresponding to the area that a coarse page table occupies (1KB)
22 //
23 #define CPT_SHIFT 10
24 #define CPT_SIZE (1 << CPT_SHIFT)
25
26 typedef union _ARM_PTE
27 {
28 union
29 {
30 struct
31 {
32 ULONG Type:2;
33 ULONG Unused:30;
34 } Fault;
35 struct
36 {
37 ULONG Type:2;
38 ULONG Ignored:2;
39 ULONG Reserved:1;
40 ULONG Domain:4;
41 ULONG Ignored1:1;
42 ULONG BaseAddress:22;
43 } Coarse;
44 struct
45 {
46 ULONG Type:2;
47 ULONG Buffered:1;
48 ULONG Cached:1;
49 ULONG Reserved:1;
50 ULONG Domain:4;
51 ULONG Ignored:1;
52 ULONG Access:2;
53 ULONG Ignored1:8;
54 ULONG BaseAddress:12;
55 } Section;
56 struct
57 {
58 ULONG Type:2;
59 ULONG Reserved:3;
60 ULONG Domain:4;
61 ULONG Ignored:3;
62 ULONG BaseAddress:20;
63 } Fine;
64 } L1;
65 union
66 {
67 struct
68 {
69 ULONG Type:2;
70 ULONG Unused:30;
71 } Fault;
72 struct
73 {
74 ULONG Type:2;
75 ULONG Buffered:1;
76 ULONG Cached:1;
77 ULONG Access0:2;
78 ULONG Access1:2;
79 ULONG Access2:2;
80 ULONG Access3:2;
81 ULONG Ignored:4;
82 ULONG BaseAddress:16;
83 } Large;
84 struct
85 {
86 ULONG Type:2;
87 ULONG Buffered:1;
88 ULONG Cached:1;
89 ULONG Access0:2;
90 ULONG Access1:2;
91 ULONG Access2:2;
92 ULONG Access3:2;
93 ULONG BaseAddress:20;
94 } Small;
95 struct
96 {
97 ULONG Type:2;
98 ULONG Buffered:1;
99 ULONG Cached:1;
100 ULONG Access0:2;
101 ULONG Ignored:4;
102 ULONG BaseAddress:22;
103 } Tiny;
104 } L2;
105 ULONG AsUlong;
106 } ARM_PTE, *PARM_PTE;
107
108 typedef struct _ARM_TRANSLATION_TABLE
109 {
110 ARM_PTE Pte[4096];
111 } ARM_TRANSLATION_TABLE, *PARM_TRANSLATION_TABLE;
112
113 typedef struct _ARM_COARSE_PAGE_TABLE
114 {
115 ARM_PTE Pte[256];
116 ULONG Padding[768];
117 } ARM_COARSE_PAGE_TABLE, *PARM_COARSE_PAGE_TABLE;
118
119 typedef enum _ARM_L1_PTE_TYPE
120 {
121 FaultPte,
122 CoarsePte,
123 SectionPte,
124 FinePte
125 } ARM_L1_PTE_TYPE;
126
127 typedef enum _ARM_L2_PTE_TYPE
128 {
129 LargePte = 1,
130 SmallPte,
131 TinyPte
132 } ARM_L2_PTE_TYPE;
133
134 typedef enum _ARM_PTE_ACCESS
135 {
136 FaultAccess,
137 SupervisorAccess,
138 SharedAccess,
139 UserAccess
140 } ARM_PTE_ACCESS;
141
142 typedef enum _ARM_DOMAIN
143 {
144 FaultDomain,
145 ClientDomain,
146 InvalidDomain,
147 ManagerDomain
148 } ARM_DOMAIN;
149
150 #endif