Added patch to emulate write to CR4 register.

This commit is contained in:
Sebastian Lackner
2014-10-31 07:33:27 +01:00
parent 7e6191a4cd
commit 953163c6ff
5 changed files with 57 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ PATCHLIST := \
ntdll-Pipe_SpecialCharacters.ok \
ntdll-WRITECOPY.ok \
ntoskrnl-Irp_Status.ok \
ntoskrnl-Write_CR4.ok \
quartz-MediaSeeking_Positions.ok \
riched20-IText_Interface.ok \
server-ACL_Compat.ok \
@@ -987,6 +988,24 @@ ntoskrnl-Irp_Status.ok:
echo '+ { "ntoskrnl-Irp_Status", "Sebastian Lackner", "Handle issues when driver returns two different status codes from dispatcher." },'; \
) > ntoskrnl-Irp_Status.ok
# Patchset ntoskrnl-Write_CR4
# |
# | Included patches:
# | * Emulate write to CR4 register. [by Stefan Leichter]
# |
# | This patchset fixes the following Wine bugs:
# | * [#30220] Emulate write to CR4 register
# |
# | Modified files:
# | * dlls/ntoskrnl.exe/instr.c
# |
.INTERMEDIATE: ntoskrnl-Write_CR4.ok
ntoskrnl-Write_CR4.ok:
$(call APPLY_FILE,ntoskrnl-Write_CR4/0001-ntoskrnl.exe-Emulate-write-to-CR4-register.patch)
@( \
echo '+ { "ntoskrnl-Write_CR4", "Stefan Leichter", "Emulate write to CR4 register." },'; \
) > ntoskrnl-Write_CR4.ok
# Patchset quartz-MediaSeeking_Positions
# |
# | Included patches:

View File

@@ -0,0 +1,31 @@
From 0f039e31e5e405a94ddc907bffc796886a53c9b1 Mon Sep 17 00:00:00 2001
From: Stefan Leichter <Stefan.Leichter@camline.com>
Date: Fri, 31 Oct 2014 07:30:03 +0100
Subject: ntoskrnl.exe: Emulate write to CR4 register.
---
dlls/ntoskrnl.exe/instr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c
index 85ab9eb..e545269 100644
--- a/dlls/ntoskrnl.exe/instr.c
+++ b/dlls/ntoskrnl.exe/instr.c
@@ -319,9 +319,14 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
TRACE("mov eax,cr0 at 0x%08x, EAX=0x%08x\n", context->Eip,context->Eax );
context->Eip += prefixlen+3;
return ExceptionContinueExecution;
+ case 0xe0:
+ TRACE("mov eax,cr4 at 0x%08x, EAX=0x%08x\n", context->Eip,context->Eax );
+ context->Eip += prefixlen+3;
+ return ExceptionContinueExecution;
default:
break; /*fallthrough to bad instruction handling */
}
+ ERR("Unsupported CR register, eip+2 is %02x\n", instr[2]);
break; /*fallthrough to bad instruction handling */
case 0x20: /* mov crX, eax */
switch (instr[2])
--
2.1.2

View File

@@ -0,0 +1,4 @@
Author: Stefan Leichter
Subject: Emulate write to CR4 register.
Revision: 1
Fixes: [30220] Emulate write to CR4 register