xref: /reactos/sdk/include/xdk/amd64/mm.h (revision c2c66aff)
1 $if (_NTDDK_)
2 
3 #define PTI_SHIFT  12L
4 #define PDI_SHIFT  21L
5 #define PPI_SHIFT  30L
6 #define PXI_SHIFT  39L
7 #define PTE_PER_PAGE 512
8 #define PDE_PER_PAGE 512
9 #define PPE_PER_PAGE 512
10 #define PXE_PER_PAGE 512
11 #define PTI_MASK_AMD64 (PTE_PER_PAGE - 1)
12 #define PDI_MASK_AMD64 (PDE_PER_PAGE - 1)
13 #define PPI_MASK (PPE_PER_PAGE - 1)
14 #define PXI_MASK (PXE_PER_PAGE - 1)
15 
16 #define PXE_BASE    0xFFFFF6FB7DBED000ULL
17 #define PXE_SELFMAP 0xFFFFF6FB7DBEDF68ULL
18 #define PPE_BASE    0xFFFFF6FB7DA00000ULL
19 #define PDE_BASE    0xFFFFF6FB40000000ULL
20 #define PTE_BASE    0xFFFFF68000000000ULL
21 #define PXE_TOP     0xFFFFF6FB7DBEDFFFULL
22 #define PPE_TOP     0xFFFFF6FB7DBFFFFFULL
23 #define PDE_TOP     0xFFFFF6FB7FFFFFFFULL
24 #define PTE_TOP     0xFFFFF6FFFFFFFFFFULL
25 
26 extern NTKERNELAPI PVOID MmHighestUserAddress;
27 extern NTKERNELAPI PVOID MmSystemRangeStart;
28 extern NTKERNELAPI ULONG64 MmUserProbeAddress;
29 
30 #define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
31 #define MM_SYSTEM_RANGE_START MmSystemRangeStart
32 #if defined(_LOCAL_COPY_USER_PROBE_ADDRESS_)
33 #define MM_USER_PROBE_ADDRESS _LOCAL_COPY_USER_PROBE_ADDRESS_
34 extern ULONG64 _LOCAL_COPY_USER_PROBE_ADDRESS_;
35 #else
36 #define MM_USER_PROBE_ADDRESS MmUserProbeAddress
37 #endif
38 #define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
39 #define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xFFFF080000000000ULL
40 
41 $endif /* _NTDDK_ */
42