https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e6dce6aa147a980614b08...
commit 7e6dce6aa147a980614b0863b9654427996774c0 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sun Apr 14 19:18:38 2019 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Sat Oct 31 14:23:16 2020 +0100
[ASM:X64] Save GS base MSR in trap frame --- sdk/include/asm/trapamd64.inc | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/sdk/include/asm/trapamd64.inc b/sdk/include/asm/trapamd64.inc index 74209493d90..f5ae982a380 100644 --- a/sdk/include/asm/trapamd64.inc +++ b/sdk/include/asm/trapamd64.inc @@ -97,6 +97,13 @@ MACRO(EnterTrap, Flags) mov [rbp + KTRAP_FRAME_SegGs], gs endif
+#if DBG + mov ecx, MSR_GS_BASE + rdmsr + mov [rbp + KTRAP_FRAME_GsBase], eax + mov [rbp + KTRAP_FRAME_GsBase + 4], edx +#endif + /* Save previous mode and check if it was user mode */ mov ax, [rbp + KTRAP_FRAME_SegCs] and al, 1