Author: tkreuzer
Date: Sun Jan 17 10:38:11 2010
New Revision: 45120
URL:
http://svn.reactos.org/svn/reactos?rev=45120&view=rev
Log:
[KE]
- Fix setting of fs in KeContextToTrapFrame and comparison in KiGeneralProtectionFault
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c [iso-8859-1] Sun Jan 17
10:38:11 2010
@@ -102,7 +102,7 @@
/* Set valid selectors */
TrapFrame->SegDs = KGDT_64_DATA | RPL_MASK;
TrapFrame->SegEs = KGDT_64_DATA | RPL_MASK;
- TrapFrame->SegFs = KGDT_32_R3_TEB;
+ TrapFrame->SegFs = KGDT_32_R3_TEB | RPL_MASK;
TrapFrame->SegGs = KGDT_64_DATA | RPL_MASK;
}
else
@@ -218,7 +218,7 @@
/* Set valid selectors */
Context->SegDs = KGDT_64_DATA | RPL_MASK;
Context->SegEs = KGDT_64_DATA | RPL_MASK;
- Context->SegFs = KGDT_32_R3_TEB;
+ Context->SegFs = KGDT_32_R3_TEB | RPL_MASK;
Context->SegGs = KGDT_64_DATA | RPL_MASK;
}
else
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Sun Jan 17
10:38:11 2010
@@ -577,10 +577,11 @@
jne KiGpfPopSegDs
cmp [rbp + KTRAP_FRAME_SegEs], dx
jne KiGpfPopSegEs
+ cmp [rbp + KTRAP_FRAME_SegGs], dx
+ jne KiGpfPopSegGs
+ mov dx, 0x0053 // KGDT64_R3_CMTEB | RPL_MASK
cmp [rbp + KTRAP_FRAME_SegFs], dx
jne KiGpfPopSegFs
- cmp [rbp + KTRAP_FRAME_SegGs], dx
- jne KiGpfPopSegGs
KiGpfFatal: