ReactOS  r75385
mmtypes.h
Go to the documentation of this file.
1 /*++ NDK Version: 0095
2 
3 Copyright (c) Alex Ionescu. All rights reserved.
4 
5 Header Name:
6 
7  mmtypes.h (AMD64)
8 
9 Abstract:
10 
11  AMD64 Type definitions for the Memory Manager
12 
13 Author:
14 
15  Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
16  Timo Kreuzer (timo.kreuzer@reactos.com) 15-Aug-2008
17 
18 --*/
19 
20 #ifndef _AMD64_MMTYPES_H
21 #define _AMD64_MMTYPES_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 //
28 // Dependencies
29 //
30 
31 //
32 // Page-related Macros
33 //
34 #define PAGE_SIZE 0x1000
35 #define PAGE_SHIFT 12L
36 #define MM_ALLOCATION_GRANULARITY 0x10000
37 #define MM_ALLOCATION_GRANULARITY_SHIFT 16L
38 #define MM_PAGE_FRAME_NUMBER_SIZE 52
39 
40 //
41 // User space range limit
42 //
43 #define MI_HIGHEST_USER_ADDRESS (PVOID)0x000007FFFFFEFFFFULL
44 
45 //
46 // Address of the shared user page
47 //
48 #define MM_SHARED_USER_DATA_VA 0x7FFE0000ULL
49 
50 //
51 // Sanity checks for Paging Macros
52 //
53 #ifdef C_ASSERT
54 C_ASSERT(PAGE_SIZE == (1 << PAGE_SHIFT));
59 #endif
60 
61 //
62 // Page Table Entry Definitions
63 //
64 typedef struct _HARDWARE_PTE
65 {
83 
84 typedef struct _MMPTE_SOFTWARE
85 {
95 
96 typedef struct _MMPTE_TRANSITION
97 {
106 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
109 #else
111  ULONG64 Unused:24;
112 #endif
114 
115 typedef struct _MMPTE_PROTOTYPE
116 {
125 
126 typedef struct _MMPTE_SUBSECTION
127 {
135 
136 typedef struct _MMPTE_LIST
137 {
146 } MMPTE_LIST;
147 
148 typedef struct _MMPTE_HARDWARE
149 {
151 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
153 #else
154 #ifdef CONFIG_SMP
155  ULONG64 Writable:1;
156 #else
157  ULONG64 Write:1;
158 #endif
159 #endif
169 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
173 #else
174 #ifdef CONFIG_SMP
175  ULONG64 Write:1;
176 #else
177  ULONG64 reserved0:1;
178 #endif
180  ULONG64 reserved1:12;
181 #endif
185 
187 {
202 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
205 #else
207  ULONG64 reserved2:24;
208 #endif
210 
211 typedef struct _MMPTE
212 {
213  union
214  {
223  } u;
224 } MMPTE, *PMMPTE,
225  MMPDE, *PMMPDE,
226  MMPPE, *PMMPPE,
227  MMPXE, *PMMPXE;
228 
229 #ifdef __cplusplus
230 }; // extern "C"
231 #endif
232 
233 #endif // !AMD64_MMTYPES_H
ULONG64 Valid
Definition: mmtypes.h:66
ULONG64 Unused0
Definition: mmtypes.h:129
ULONG64 Write
Definition: mmtypes.h:170
ULONG64 Unused0
Definition: mmtypes.h:118
ULONG64 Valid
Definition: mmtypes.h:117
ULONG64 CacheDisable
Definition: mmtypes.h:102
ULONG64 NextEntry
Definition: mmtypes.h:145
struct _MMPTE_TRANSITION MMPTE_TRANSITION
ULONG64 Global
Definition: mmtypes.h:74
ULONG64 OneEntry
Definition: mmtypes.h:139
ULONG64 Owner
Definition: mmtypes.h:68
ULONG64 CacheDisable
Definition: mmtypes.h:70
ULONG64 Prototype
Definition: mmtypes.h:76
struct _MMPTE_HARDWARE * PMMPTE_HARDWARE
ULONG64 Protection
Definition: mmtypes.h:130
ULONG64 PageFrameNumber
Definition: mmtypes.h:107
HARDWARE_PTE Flush
Definition: mmtypes.h:216
ULONG64 Transition
Definition: mmtypes.h:105
ULONG64 Transition
Definition: mmtypes.h:143
ULONG64 CopyOnWrite
Definition: mmtypes.h:75
ULONG64 Protection
Definition: mmtypes.h:122
ULONG64 Valid
Definition: mmtypes.h:128
ULONG64 Global
Definition: mmtypes.h:166
struct _MMPTE * PMMPXE
uint32_t ULONG_PTR
Definition: typedefs.h:64
ULONG64 Dirty
Definition: mmtypes.h:164
ULONG64 NoExecute
Definition: mmtypes.h:183
struct _MMPTE_SUBSECTION MMPTE_SUBSECTION
ULONG64 Owner
Definition: mmtypes.h:160
struct _HARDWARE_PTE * PHARDWARE_PTE
ULONG64 reserved0
Definition: mmtypes.h:77
uint64_t ULONG64
Definition: typedefs.h:66
struct _HARDWARE_PTE HARDWARE_PTE
ULONG64 Valid
Definition: mmtypes.h:138
ULONG64 WriteThrough
Definition: mmtypes.h:161
struct _MMPTE_HARDWARE_LARGEPAGE * PMMPTE_HARDWARE_LARGEPAGE
#define PAGE_SIZE
Definition: mmtypes.h:34
ULONG64 filler0
Definition: mmtypes.h:140
ULONG64 WriteThrough
Definition: mmtypes.h:69
struct _MMPTE * PMMPDE
struct _MMPTE_HARDWARE_LARGEPAGE MMPTE_HARDWARE_LARGEPAGE
struct _MMPTE MMPDE
ULONG64 Protection
Definition: mmtypes.h:88
struct _MMPTE MMPPE
ULONG64 Write
Definition: mmtypes.h:99
ULONG64 filler1
Definition: mmtypes.h:144
int64_t LONG64
Definition: typedefs.h:67
struct _MMPTE MMPXE
MMPTE_TRANSITION Trans
Definition: mmtypes.h:220
ULONG64 UsedPageTableEntries
Definition: mmtypes.h:91
MMPTE_LIST List
Definition: mmtypes.h:222
ULONG64 Prototype
Definition: mmtypes.h:131
ULONG64 Valid
Definition: mmtypes.h:150
struct _MMPTE * PMMPTE
ULONG64 SoftwareWsIndex
Definition: mmtypes.h:80
ULONG64 PageFileLow
Definition: mmtypes.h:87
struct _MMPTE * PMMPPE
ULONG64 CopyOnWrite
Definition: mmtypes.h:167
ULONG64 Prototype
Definition: mmtypes.h:104
ULONG64 CacheDisable
Definition: mmtypes.h:162
ULONG64 SoftwareWsIndex
Definition: mmtypes.h:182
ULONG64 reserved1
Definition: mmtypes.h:79
struct _MMPTE_SOFTWARE MMPTE_SOFTWARE
ULONG64 PageFrameNumber
Definition: mmtypes.h:78
#define PAGE_SHIFT
Definition: mmtypes.h:35
ULONG64 PageFileHigh
Definition: mmtypes.h:93
ULONG64 Prototype
Definition: mmtypes.h:89
ULONG64 Valid
Definition: mmtypes.h:86
ULONG PVOID Reserved
Definition: ntimage.h:533
struct _MMPTE_LIST MMPTE_LIST
ULONG64 LargePage
Definition: mmtypes.h:73
ULONG_PTR Long
Definition: mmtypes.h:215
MMPTE_HARDWARE Hard
Definition: mmtypes.h:217
ULONG64 Valid
Definition: mmtypes.h:98
ULONG64 Accessed
Definition: mmtypes.h:71
ULONG64 reserved1
Definition: mmtypes.h:172
ULONG64 WriteThrough
Definition: mmtypes.h:101
ULONG64 Protection
Definition: mmtypes.h:141
struct _MMPTE_PROTOTYPE MMPTE_PROTOTYPE
ULONG64 Transition
Definition: mmtypes.h:90
C_ASSERT(sizeof(HARDWARE_PDE_ARMV6)==sizeof(ULONG))
MMPTE_SOFTWARE Soft
Definition: mmtypes.h:219
struct _MMPTE MMPTE
ULONG64 Unused1
Definition: mmtypes.h:120
ULONG64 Dirty1
Definition: mmtypes.h:152
ULONG64 Prototype
Definition: mmtypes.h:121
ULONG64 Write
Definition: mmtypes.h:67
LONG64 ProtoAddress
Definition: mmtypes.h:123
ULONG64 ReadOnly
Definition: mmtypes.h:119
#define MM_ALLOCATION_GRANULARITY_SHIFT
Definition: mmtypes.h:37
ULONG64 LargePage
Definition: mmtypes.h:165
ULONG64 Dirty
Definition: mmtypes.h:72
ULONG64 Unused1
Definition: mmtypes.h:132
ULONG64 PageFrameNumber
Definition: mmtypes.h:171
ULONG64 Unused
Definition: mmtypes.h:108
struct _MMPTE_HARDWARE MMPTE_HARDWARE
union _MMPTE::@2063 u
MMPTE_SUBSECTION Subsect
Definition: mmtypes.h:221
ULONG64 Owner
Definition: mmtypes.h:100
ULONG64 Prototype
Definition: mmtypes.h:142
struct _MMPTE_SOFTWARE * PMMPTE_SOFTWARE
ULONG64 NoExecute
Definition: mmtypes.h:81
ULONG64 Protection
Definition: mmtypes.h:103
MMPTE_PROTOTYPE Proto
Definition: mmtypes.h:218
ULONG64 Accessed
Definition: mmtypes.h:163
#define MM_ALLOCATION_GRANULARITY
Definition: mmtypes.h:36
LONG64 SubsectionAddress
Definition: mmtypes.h:133
ULONG64 Prototype
Definition: mmtypes.h:168