From 7ae0f48fb5290c10e0161cdad2830bf22267f727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Thu, 29 Nov 2007 21:01:46 +0000 Subject: [PATCH] save/restore the modified pl var Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3053 --- src/cpu/paging.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpu/paging.cpp b/src/cpu/paging.cpp index ab11e3ab..ddce5992 100644 --- a/src/cpu/paging.cpp +++ b/src/cpu/paging.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: paging.cpp,v 1.30 2007-11-26 00:00:58 c2woody Exp $ */ +/* $Id: paging.cpp,v 1.31 2007-11-29 21:01:46 c2woody Exp $ */ #include #include @@ -124,7 +124,7 @@ static Bits PageFaultCore(void) { X86PageEntry pentry; pentry.load=phys_readd(entry->page_addr); if (pentry.block.p && entry->cs == SegValue(cs) && entry->eip==reg_eip) { - cpu.cpl=entry->mpl; + cpu.mpl=entry->mpl; return -1; } return 0; @@ -151,7 +151,8 @@ void PAGING_PageFault(PhysPt lin_addr,Bitu page_addr,Bitu faultcode) { entry->eip=reg_eip; entry->page_addr=page_addr; entry->mpl=cpu.mpl; - //Caused by a write by default? + cpu.mpl=3; + CPU_Exception(EXCEPTION_PF,faultcode); #if C_DEBUG // DEBUG_EnableDebugger();