From ef451286cfbda00deb1c6d6274312e9e4420d01b Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Fri, 25 Jun 2010 22:13:16 +0300 Subject: [PATCH] Use new LDT when loading registers in jump to TSS Previously, the code tried to load segment registers against the old LDT, which is very probably wrong. --- Changelog.utf8 | 1 + org/jpc/emulator/memory/codeblock/optimised/ProtectedModeUBlock.java | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.utf8 b/Changelog.utf8 index ade205e..0074b3d 100644 --- a/Changelog.utf8 +++ b/Changelog.utf8 @@ -1,5 +1,6 @@ Changes since JPC-RR Release 10.12: =================================== +- Use new LDT when loading registers in jump to TSS. Changes from JPC-RR Release 10.11 to JPC-RR Release 10.12: ========================================================== diff --git a/org/jpc/emulator/memory/codeblock/optimised/ProtectedModeUBlock.java b/org/jpc/emulator/memory/codeblock/optimised/ProtectedModeUBlock.java index 8b128dd..85f5411 100644 --- a/org/jpc/emulator/memory/codeblock/optimised/ProtectedModeUBlock.java +++ b/org/jpc/emulator/memory/codeblock/optimised/ProtectedModeUBlock.java @@ -4376,6 +4376,7 @@ System.err.println("Accessed LDT selector global byte 5:" + cpu.readSupervisorBy cpu.setCR0(cpu.getCR0() | 0x8); // set TS flag in CR0; + cpu.ldtr = newLdtr; cpu.tss=newSegment; ((ProtectedModeSegment.AbstractTSS) cpu.tss).restoreCPUState(cpu); cpu.cs.checkAddress(cpu.eip); -- 2.11.4.GIT