Author: tkreuzer
Date: Fri Jan 15 12:27:54 2010
New Revision: 45083
URL:
http://svn.reactos.org/svn/reactos?rev=45083&view=rev
Log:
[NTOS]
Enable fx save restore support earlier and uncomment it in trap handlers.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] Fri Jan 15
12:27:54 2010
@@ -277,9 +277,6 @@
/* Disable fpu monitoring */
__writecr0(__readcr0() & ~CR0_MP);
- /* Enable fx save restore support */
- __writecr4(__readcr4() | CR4_FXSR);
-
}
VOID
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Fri Jan 15
12:27:54 2010
@@ -679,6 +679,9 @@
/* LDT is unused */
// __lldt(0);
+ /* Enable fx save restore support */
+ __writecr4(__readcr4() | CR4_FXSR);
+
/* Align stack to 16 bytes */
LoaderBlock->KernelStack &= ~(16 - 1);
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] Fri Jan 15
12:27:54 2010
@@ -117,12 +117,12 @@
.if (TRAPFLAGS & TRAPFLAG_XMM)
/* Save xmm registers */
-// movdqa [rbp + KTRAP_FRAME_Xmm0], xmm0
-// movdqa [rbp + KTRAP_FRAME_Xmm1], xmm1
-// movdqa [rbp + KTRAP_FRAME_Xmm2], xmm2
-// movdqa [rbp + KTRAP_FRAME_Xmm3], xmm3
-// movdqa [rbp + KTRAP_FRAME_Xmm4], xmm4
-// movdqa [rbp + KTRAP_FRAME_Xmm5], xmm5
+ movdqa [rbp + KTRAP_FRAME_Xmm0], xmm0
+ movdqa [rbp + KTRAP_FRAME_Xmm1], xmm1
+ movdqa [rbp + KTRAP_FRAME_Xmm2], xmm2
+ movdqa [rbp + KTRAP_FRAME_Xmm3], xmm3
+ movdqa [rbp + KTRAP_FRAME_Xmm4], xmm4
+ movdqa [rbp + KTRAP_FRAME_Xmm5], xmm5
.endif
.if (TRAPFLAGS & TRAPFLAG_SEGMENTS)
@@ -221,12 +221,12 @@
.if (TRAPFLAGS & TRAPFLAG_XMM)
/* Restore xmm registers */
-// movdqa xmm0, [rbp + KTRAP_FRAME_Xmm0]
-// movdqa xmm1, [rbp + KTRAP_FRAME_Xmm1]
-// movdqa xmm2, [rbp + KTRAP_FRAME_Xmm2]
-// movdqa xmm3, [rbp + KTRAP_FRAME_Xmm3]
-// movdqa xmm4, [rbp + KTRAP_FRAME_Xmm4]
-// movdqa xmm5, [rbp + KTRAP_FRAME_Xmm5]
+ movdqa xmm0, [rbp + KTRAP_FRAME_Xmm0]
+ movdqa xmm1, [rbp + KTRAP_FRAME_Xmm1]
+ movdqa xmm2, [rbp + KTRAP_FRAME_Xmm2]
+ movdqa xmm3, [rbp + KTRAP_FRAME_Xmm3]
+ movdqa xmm4, [rbp + KTRAP_FRAME_Xmm4]
+ movdqa xmm5, [rbp + KTRAP_FRAME_Xmm5]
.endif
/* Restore rbp */