ReactOS 0.4.16-dev-340-g0540c21
mmtypes.h
Go to the documentation of this file.
1/*++ NDK Version: 0095
2
3Copyright (c) Alex Ionescu. All rights reserved.
4
5Header Name:
6
7 mmtypes.h (AMD64)
8
9Abstract:
10
11 AMD64 Type definitions for the Memory Manager
12
13Author:
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
24extern "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
59#endif
60
61//
62// Page Table Entry Definitions
63//
64typedef struct _HARDWARE_PTE
65{
83
84typedef struct _MMPTE_SOFTWARE
85{
95
96typedef struct _MMPTE_TRANSITION
97{
106#if (NTDDI_VERSION >= NTDDI_LONGHORN)
109#else
111 ULONG64 Unused:24;
112#endif
114
115typedef struct _MMPTE_PROTOTYPE
116{
125
126typedef struct _MMPTE_SUBSECTION
127{
135
136typedef struct _MMPTE_LIST
137{
147
148typedef struct _MMPTE_HARDWARE
149{
151#if (NTDDI_VERSION >= NTDDI_LONGHORN)
153#else
154#ifdef CONFIG_SMP
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
181#endif
185
187{
202#if (NTDDI_VERSION >= NTDDI_LONGHORN)
205#else
208#endif
210
211typedef struct _MMPTE
212{
213 union
214 {
223 } u;
228
229#ifdef __cplusplus
230}; // extern "C"
231#endif
232
233#endif // !AMD64_MMTYPES_H
#define C_ASSERT(e)
Definition: intsafe.h:73
ULONG const BOOLEAN const _Out_ PBOOLEAN Writable
Definition: mmc.h:77
unsigned __int64 ULONG64
Definition: imports.h:198
#define MM_ALLOCATION_GRANULARITY_SHIFT
Definition: mmtypes.h:37
struct _MMPTE_HARDWARE MMPTE_HARDWARE
struct _MMPTE_LIST MMPTE_LIST
struct _MMPTE_SUBSECTION MMPTE_SUBSECTION
struct _MMPTE_SOFTWARE * PMMPTE_SOFTWARE
struct _MMPTE MMPDE
struct _MMPTE_SOFTWARE MMPTE_SOFTWARE
struct _MMPTE_HARDWARE * PMMPTE_HARDWARE
struct _MMPTE_HARDWARE_LARGEPAGE MMPTE_HARDWARE_LARGEPAGE
struct _MMPTE * PMMPTE
struct _MMPTE MMPXE
struct _MMPTE_HARDWARE_LARGEPAGE * PMMPTE_HARDWARE_LARGEPAGE
struct _MMPTE MMPPE
#define PAGE_SIZE
Definition: mmtypes.h:34
struct _HARDWARE_PTE HARDWARE_PTE
#define PAGE_SHIFT
Definition: mmtypes.h:35
struct _MMPTE * PMMPPE
struct _MMPTE_TRANSITION MMPTE_TRANSITION
#define MM_ALLOCATION_GRANULARITY
Definition: mmtypes.h:36
struct _HARDWARE_PTE * PHARDWARE_PTE
struct _MMPTE * PMMPXE
struct _MMPTE MMPTE
struct _MMPTE_PROTOTYPE MMPTE_PROTOTYPE
struct _MMPTE * PMMPDE
ULONG64 LargePage
Definition: mmtypes.h:73
ULONG64 WriteThrough
Definition: mmtypes.h:69
ULONG64 Dirty
Definition: mmtypes.h:72
ULONG64 reserved0
Definition: mmtypes.h:77
ULONG64 Owner
Definition: mmtypes.h:68
ULONG64 PageFrameNumber
Definition: mmtypes.h:78
ULONG64 reserved1
Definition: mmtypes.h:79
ULONG64 Write
Definition: mmtypes.h:67
ULONG64 Valid
Definition: mmtypes.h:66
ULONG64 Accessed
Definition: mmtypes.h:71
ULONG64 CacheDisable
Definition: mmtypes.h:70
ULONG64 Global
Definition: mmtypes.h:74
ULONG64 NoExecute
Definition: mmtypes.h:81
ULONG64 Prototype
Definition: mmtypes.h:76
ULONG64 SoftwareWsIndex
Definition: mmtypes.h:80
ULONG64 CopyOnWrite
Definition: mmtypes.h:75
ULONG64 Dirty1
Definition: mmtypes.h:152
ULONG64 Dirty
Definition: mmtypes.h:164
ULONG64 LargePage
Definition: mmtypes.h:165
ULONG64 Accessed
Definition: mmtypes.h:163
ULONG64 CacheDisable
Definition: mmtypes.h:162
ULONG64 Valid
Definition: mmtypes.h:150
ULONG64 WriteThrough
Definition: mmtypes.h:161
ULONG64 NoExecute
Definition: mmtypes.h:183
ULONG64 SoftwareWsIndex
Definition: mmtypes.h:182
ULONG64 Write
Definition: mmtypes.h:170
ULONG64 Prototype
Definition: mmtypes.h:168
ULONG64 Owner
Definition: mmtypes.h:160
ULONG64 Global
Definition: mmtypes.h:166
ULONG64 PageFrameNumber
Definition: mmtypes.h:171
ULONG64 reserved1
Definition: mmtypes.h:172
ULONG64 CopyOnWrite
Definition: mmtypes.h:167
ULONG64 Prototype
Definition: mmtypes.h:142
ULONG64 Transition
Definition: mmtypes.h:143
ULONG64 OneEntry
Definition: mmtypes.h:139
ULONG64 filler0
Definition: mmtypes.h:140
ULONG64 Valid
Definition: mmtypes.h:138
ULONG64 filler1
Definition: mmtypes.h:144
ULONG64 NextEntry
Definition: mmtypes.h:145
ULONG64 Protection
Definition: mmtypes.h:141
ULONG64 Valid
Definition: mmtypes.h:117
ULONG64 Unused1
Definition: mmtypes.h:120
ULONG64 ReadOnly
Definition: mmtypes.h:119
ULONG64 Protection
Definition: mmtypes.h:122
ULONG64 Prototype
Definition: mmtypes.h:121
ULONG64 Unused0
Definition: mmtypes.h:118
LONG64 ProtoAddress
Definition: mmtypes.h:123
ULONG64 Valid
Definition: mmtypes.h:86
ULONG64 UsedPageTableEntries
Definition: mmtypes.h:91
ULONG64 Transition
Definition: mmtypes.h:90
ULONG64 Protection
Definition: mmtypes.h:88
ULONG64 Prototype
Definition: mmtypes.h:89
ULONG64 PageFileHigh
Definition: mmtypes.h:93
ULONG64 Reserved
Definition: mmtypes.h:92
ULONG64 PageFileLow
Definition: mmtypes.h:87
ULONG64 Unused0
Definition: mmtypes.h:129
LONG64 SubsectionAddress
Definition: mmtypes.h:133
ULONG64 Protection
Definition: mmtypes.h:130
ULONG64 Prototype
Definition: mmtypes.h:131
ULONG64 Unused1
Definition: mmtypes.h:132
ULONG64 Valid
Definition: mmtypes.h:128
ULONG64 Unused
Definition: mmtypes.h:108
ULONG64 WriteThrough
Definition: mmtypes.h:101
ULONG64 Protection
Definition: mmtypes.h:103
ULONG64 Owner
Definition: mmtypes.h:100
ULONG64 Prototype
Definition: mmtypes.h:104
ULONG64 Transition
Definition: mmtypes.h:105
ULONG64 CacheDisable
Definition: mmtypes.h:102
ULONG64 Write
Definition: mmtypes.h:99
ULONG64 PageFrameNumber
Definition: mmtypes.h:107
ULONG64 Valid
Definition: mmtypes.h:98
MMPTE_LIST List
Definition: mmtypes.h:222
MMPTE_SUBSECTION Subsect
Definition: mmtypes.h:221
union _MMPTE::@2339 u
MMPTE_TRANSITION Trans
Definition: mmtypes.h:220
MMPTE_PROTOTYPE Proto
Definition: mmtypes.h:218
MMPTE_SOFTWARE Soft
Definition: mmtypes.h:219
HARDWARE_PTE Flush
Definition: mmtypes.h:216
MMPTE_HARDWARE Hard
Definition: mmtypes.h:217
ULONG_PTR Long
Definition: mmtypes.h:215
int64_t LONG64
Definition: typedefs.h:68
uint32_t ULONG_PTR
Definition: typedefs.h:65