From 953163c6ff95957deff60e2286c2f070a32d529d Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 31 Oct 2014 07:33:27 +0100 Subject: [PATCH] Added patch to emulate write to CR4 register. --- README.md | 3 +- debian/changelog | 1 + patches/Makefile | 19 ++++++++++++ ...nl.exe-Emulate-write-to-CR4-register.patch | 31 +++++++++++++++++++ patches/ntoskrnl-Write_CR4/definition | 4 +++ 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 patches/ntoskrnl-Write_CR4/0001-ntoskrnl.exe-Emulate-write-to-CR4-register.patch create mode 100644 patches/ntoskrnl-Write_CR4/definition diff --git a/README.md b/README.md index 45b3cb2d..b4b7da98 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,11 @@ Wine. All those differences are also documented on the Included bugfixes and improvements ================================== -**Bugfixes and features included in the next upcoming release [5]:** +**Bugfixes and features included in the next upcoming release [6]:** * Cinema 4D needs NotifyIpInterfaceChange ([Wine Bug #34573](http://bugs.winehq.org/show_bug.cgi?id=34573)) * D3DCompileShader should filter specific warning messages ([Wine Bug #33770](http://bugs.winehq.org/show_bug.cgi?id=33770)) +* Emulate write to CR4 register ([Wine Bug #30220](http://bugs.winehq.org/show_bug.cgi?id=30220)) * Support for RtlDecompressBuffer ([Wine Bug #37449](http://bugs.winehq.org/show_bug.cgi?id=37449)) * Support for pasting HTML from Unix applications ([Wine Bug #7372](http://bugs.winehq.org/show_bug.cgi?id=7372)) * Tumblebugs 2 requires DXTn software encoding support ([Wine Bug #29586](http://bugs.winehq.org/show_bug.cgi?id=29586)) diff --git a/debian/changelog b/debian/changelog index 9c238667..33a6e463 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ wine-compholio (1.7.30) UNRELEASED; urgency=low * Added patch to implement iphlpapi stub functions. * Added patch to implement support for pasting HTML from native Unix applications. * Added patch to implement RtlDecompressBuffer. + * Added patch to emulate write to CR4 register. * Removed patch to avoid Clang compiler warning because of unused Vtable (accepted upstream). * Removed patch for additional ATL thunks (accepted upstream). * Removed patch to ímplement IRichEditOle and ITextDocument support for ITextServices (accepted upstream). diff --git a/patches/Makefile b/patches/Makefile index 11a7a674..d20ac5d6 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -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: diff --git a/patches/ntoskrnl-Write_CR4/0001-ntoskrnl.exe-Emulate-write-to-CR4-register.patch b/patches/ntoskrnl-Write_CR4/0001-ntoskrnl.exe-Emulate-write-to-CR4-register.patch new file mode 100644 index 00000000..feadb2c5 --- /dev/null +++ b/patches/ntoskrnl-Write_CR4/0001-ntoskrnl.exe-Emulate-write-to-CR4-register.patch @@ -0,0 +1,31 @@ +From 0f039e31e5e405a94ddc907bffc796886a53c9b1 Mon Sep 17 00:00:00 2001 +From: Stefan Leichter +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 + diff --git a/patches/ntoskrnl-Write_CR4/definition b/patches/ntoskrnl-Write_CR4/definition new file mode 100644 index 00000000..6037b565 --- /dev/null +++ b/patches/ntoskrnl-Write_CR4/definition @@ -0,0 +1,4 @@ +Author: Stefan Leichter +Subject: Emulate write to CR4 register. +Revision: 1 +Fixes: [30220] Emulate write to CR4 register