mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Fix SYSENTER support in VMware. New benchmar: 200ms. ***70%*** faster then with Int2E. Fix FPU save bug/explorer bug. Fix Vmware 4.0 crash bug. HARTMUT IS A GENIUS.
svn path=/trunk/; revision=13107
This commit is contained in:
@@ -26,14 +26,14 @@
|
||||
.globl _KiSystemService
|
||||
|
||||
_KiFastCallEntry:
|
||||
|
||||
|
||||
/* 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. */
|
||||
@@ -205,7 +205,7 @@ _KiServiceExit:
|
||||
/* Save pointer to Trap Frame */
|
||||
movl %esp, %ebx
|
||||
|
||||
/* Raise IRQL to HIGH_LEVEL */
|
||||
/* Raise IRQL to APC_LEVEL */
|
||||
movl $1, %ecx
|
||||
call @KfRaiseIrql@4
|
||||
|
||||
|
||||
@@ -315,43 +315,6 @@ SaveResolutionSettings(DWORD ResX, DWORD ResY, DWORD ColDepth)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
DisableFastSystemCall(VOID)
|
||||
{
|
||||
DWORD Value = 1;
|
||||
HKEY hReg;
|
||||
|
||||
/* Open or Create the Kernel Settings Key */
|
||||
if(RegCreateKeyEx(HKEY_LOCAL_MACHINE,
|
||||
L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Kernel",
|
||||
0,
|
||||
NULL,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
KEY_SET_VALUE,
|
||||
NULL,
|
||||
&hReg,
|
||||
NULL) != ERROR_SUCCESS) {
|
||||
DbgPrint("Failed to Disable Sysenter\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Disable Fast System Call */
|
||||
if(RegSetValueEx(hReg,
|
||||
L"FastSystemCallDisable",
|
||||
0,
|
||||
REG_DWORD,
|
||||
(BYTE*)&Value,
|
||||
sizeof(DWORD)) != ERROR_SUCCESS) {
|
||||
RegCloseKey(hReg);
|
||||
DbgPrint("Failed to Disable Sysenter\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Return Success */
|
||||
RegCloseKey(hReg);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
EnableDriver(WCHAR *Key, BOOL Enable)
|
||||
{
|
||||
@@ -1061,9 +1024,6 @@ WinMain(HINSTANCE hInstance,
|
||||
/* restore the exception handler */
|
||||
SetUnhandledExceptionFilter(OldHandler);
|
||||
|
||||
/* Disable Fast System Call no matter what */
|
||||
DisableFastSystemCall();
|
||||
|
||||
lc = DestinationPath;
|
||||
lc += GetSystemDirectory(DestinationPath, MAX_PATH) - 1;
|
||||
if(lc >= DestinationPath && *lc != L'\\')
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include "../gdi32/misc/win32k.c"
|
||||
Reference in New Issue
Block a user