Fixed paging permissions for code fetch

This commit is contained in:
Stanislav Shwartsman 2008-04-18 13:51:09 +00:00
parent eea58f04cd
commit 4ee1bf4b68
2 changed files with 5 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.cc,v 1.222 2008-04-18 10:19:33 sshwarts Exp $
// $Id: cpu.cc,v 1.223 2008-04-18 13:51:09 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -638,13 +638,11 @@ void BX_CPU_C::prefetch(void)
bx_TLB_entry *tlbEntry = &BX_CPU_THIS_PTR TLB.entry[TLB_index];
Bit8u *fetchPtr = 0;
if (tlbEntry->lpf == lpf) {
if (tlbEntry->accessBits & (0x01 << CPL)) {
pAddr = A20ADDR(tlbEntry->ppf | pageOffset);
if (tlbEntry->lpf == lpf && (tlbEntry->accessBits & (0x01 << CPL))) {
pAddr = A20ADDR(tlbEntry->ppf | pageOffset);
#if BX_SupportGuest2HostTLB
fetchPtr = (Bit8u*) (tlbEntry->hostPageAddr);
fetchPtr = (Bit8u*) (tlbEntry->hostPageAddr);
#endif
}
}
else {
if (BX_CPU_THIS_PTR cr0.get_PG()) {

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: extdb.cc,v 1.26 2008-03-31 20:56:27 sshwarts Exp $
// $Id: extdb.cc,v 1.27 2008-04-18 13:51:09 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
#include "bochs.h"
@ -21,7 +21,6 @@ void (*call_debugger)(TRegs *,Bit8u *, Bit32u);
void bx_external_debugger(BX_CPU_C *cpu)
{
//printf("Calling debugger state=%d\n",regs.debug_state);
switch (regs.debug_state) {
case debug_run:
return;