https://git.reactos.org/?p=reactos.git;a=commitdiff;h=11c78f701dabaa098f80d…
commit 11c78f701dabaa098f80dfea2e259861b02c80e0
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue Dec 19 15:16:04 2017 +0100
[NTOS:MM] Implement x64 version of MI_MAKE_SUBSECTION_PTE
---
ntoskrnl/include/internal/amd64/mm.h | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/include/internal/amd64/mm.h b/ntoskrnl/include/internal/amd64/mm.h
index 0f5f3b7c03..2248ab490e 100644
--- a/ntoskrnl/include/internal/amd64/mm.h
+++ b/ntoskrnl/include/internal/amd64/mm.h
@@ -242,10 +242,18 @@ MiPxeToAddress(PMMPTE PointerPxe)
FORCEINLINE
VOID
-MI_MAKE_SUBSECTION_PTE(IN PMMPTE NewPte,
- IN PVOID Segment)
+MI_MAKE_SUBSECTION_PTE(
+ _Out_ PMMPTE NewPte,
+ _In_ PVOID Segment)
{
- ASSERT(FALSE);
+ ULONG_PTR Offset;
+
+ /* Mark this as a prototype */
+ NewPte->u.Long = 0;
+ NewPte->u.Subsect.Prototype = 1;
+
+ /* Store the lower 48 bits of the Segment address */
+ NewPte->u.Subsect.SubsectionAddress = ((ULONG_PTR)Segment &
0x0000FFFFFFFFFFFF);
}
FORCEINLINE