Ge van Geldorp schrieb:
From: Alex
Ionescu
Do you know however if any of ROS Kernel depends on the old
GDT? There are two weird issues with SYSEXIT:
1) GvG reported that FPU is broken
2) Explorer now crashes in shlwapi when clicking on a disk.
Actually, it's only one issue. The crash in shlwapi is in
StrFormatByteSizeW(), which uses floating point.
Gé van Geldorp.
Hi,
adding the stack segment register to one instruction at the begin of
_KiFastCallEntry does fix the fpu problem for me. And I don't understand
why the interrupt flag is manipulated after sysenter and before sysexit.
- Hartmut
E:\Sandbox\ros_mp\reactos>set SVN_EDITOR=notepad
E:\Sandbox\ros_mp\reactos>d:\programme\subversion\bin\svn.exe diff
ntoskrnl\ke\i386\syscall.s
Index: ntoskrnl/ke/i386/syscall.S
===================================================================
--- ntoskrnl/ke/i386/syscall.S (Revision 13103)
+++ ntoskrnl/ke/i386/syscall.S (Arbeitskopie)
@@ -26,21 +26,22 @@
.globl _KiSystemService
_KiFastCallEntry:
-
+ sti
+
/* Set FS to PCR */
movl $PCR_SELECTOR, %ecx
movw %cx, %fs
/* Set the current stack to Kernel Stack */
movl %fs:KPCR_TSS, %ecx
- movl KTSS_ESP0(%ecx), %ecx
+ movl %ss:KTSS_ESP0(%ecx), %ecx
movl %ecx, %esp
/* Set up a fake INT Stack. */
pushl $USER_DS
pushl %edx /* Ring 3 SS:ESP */
pushfl
- orl $200, (%esp) /* Re-enable IRQs in EFLAGS, to fake INT */
+// orl $200, (%esp) /* Re-enable IRQs in EFLAGS, to fake INT */
pushl $USER_CS
pushl $KUSER_SHARED_SYSCALL_RET
@@ -205,7 +206,7 @@
/* Save pointer to Trap Frame */
movl %esp, %ebx
- /* Raise IRQL to HIGH_LEVEL */
+ /* Raise IRQL to APC_LEVEL */
movl $1, %ecx
call @KfRaiseIrql@4
@@ -280,7 +281,6 @@
/* We will be cleaning up the stack ourselves */
popl %edx /* New Ring 3 EIP */
add $0x4, %esp /* Skip Ring 3 DS */
- andl $0xFD, 9(%esp) /* Remove IRQ hack from EFLAGS */
popfl /* Restore old EFLAGS */
popl %ecx /* Old Ring 3 SS:ESP */