Remove hack that skips privilages instructions
These need to be properly emulated eventually, so it's better for them to notify us with a crash than to go unnoticed
This commit is contained in:
parent
b7d73ccda3
commit
33bccd66de
|
@ -144,85 +144,6 @@ extern int EmuException(LPEXCEPTION_POINTERS e)
|
||||||
{
|
{
|
||||||
g_bEmuException = true;
|
g_bEmuException = true;
|
||||||
|
|
||||||
// Privileged instruction check
|
|
||||||
if(e->ExceptionRecord->ExceptionCode == 0xC0000096)
|
|
||||||
{
|
|
||||||
DWORD dwEip = e->ContextRecord->Eip;
|
|
||||||
|
|
||||||
// WRMSR
|
|
||||||
if(*((BYTE*)dwEip) == 0x0F && *((BYTE*)dwEip+1) == 0x30)
|
|
||||||
{
|
|
||||||
e->ContextRecord->Eip += 2;
|
|
||||||
|
|
||||||
DbgPrintf("EmuMain (0x%X): Skipping privileged instruction (WRMSR)\n", GetCurrentThreadId());
|
|
||||||
|
|
||||||
g_bEmuException = false;
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
// RDMSR
|
|
||||||
if(*((BYTE*)dwEip) == 0x0F && *((BYTE*)dwEip+1) == 0x32)
|
|
||||||
{
|
|
||||||
e->ContextRecord->Eip += 2;
|
|
||||||
|
|
||||||
DbgPrintf("EmuMain (0x%X): Skipping privileged instruction (RDMSR)\n", GetCurrentThreadId());
|
|
||||||
|
|
||||||
g_bEmuException = false;
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
// RDPMC
|
|
||||||
if(*((BYTE*)dwEip) == 0x0F && *((BYTE*)dwEip+1) == 0x33)
|
|
||||||
{
|
|
||||||
e->ContextRecord->Eip += 2;
|
|
||||||
|
|
||||||
DbgPrintf("EmuMain (0x%X): Skipping privileged instruction (RDPMC)\n", GetCurrentThreadId());
|
|
||||||
|
|
||||||
g_bEmuException = false;
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
// WBINVD
|
|
||||||
if(*((BYTE*)dwEip) == 0x0F && *((BYTE*)dwEip+1) == 0x09)
|
|
||||||
{
|
|
||||||
e->ContextRecord->Eip += 2;
|
|
||||||
|
|
||||||
DbgPrintf("EmuMain (0x%X): Skipping privileged instruction (WBINVD)\n", GetCurrentThreadId());
|
|
||||||
|
|
||||||
g_bEmuException = false;
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
// CLI
|
|
||||||
if(*((BYTE*)dwEip) == 0xFA)
|
|
||||||
{
|
|
||||||
e->ContextRecord->Eip += 1;
|
|
||||||
|
|
||||||
DbgPrintf("EmuMain (0x%X): Skipping privileged instruction (CLI)\n", GetCurrentThreadId());
|
|
||||||
|
|
||||||
g_bEmuException = false;
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
// STI
|
|
||||||
if(*((BYTE*)dwEip) == 0xFB)
|
|
||||||
{
|
|
||||||
e->ContextRecord->Eip += 1;
|
|
||||||
|
|
||||||
DbgPrintf("EmuMain (0x%X): Skipping privileged instruction (STI)\n", GetCurrentThreadId());
|
|
||||||
|
|
||||||
g_bEmuException = false;
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// print debug information
|
// print debug information
|
||||||
{
|
{
|
||||||
if(e->ExceptionRecord->ExceptionCode == 0x80000003)
|
if(e->ExceptionRecord->ExceptionCode == 0x80000003)
|
||||||
|
|
Loading…
Reference in New Issue