Do not flood log with WBINVD/INVD messages

This commit is contained in:
Stanislav Shwartsman 2005-11-27 18:36:19 +00:00
parent c89ba98297
commit fe02ecab65
2 changed files with 7 additions and 34 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: debugstuff.cc,v 1.43 2005-11-26 21:36:51 sshwarts Exp $
// $Id: debugstuff.cc,v 1.44 2005-11-27 18:36:19 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -170,43 +170,15 @@ void BX_CPU_C::debug(bx_address offset)
#endif // BX_SUPPORT_X86_64
#if 0
/* (mch) Hack to display the area round EIP and prev_EIP */
char buf[100];
sprintf(buf, "%04x:%08x ", BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value, EIP);
for (int i = 0; i < 8; i++) {
Bit8u data;
BX_CPU_THIS_PTR read_virtual_byte(BX_SEG_REG_CS, EIP + i, &data);
sprintf(buf+strlen(buf), "%02x ", data);
}
BX_INFO((buf));
sprintf(buf, "%04x:%08x ", BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value, BX_CPU_THIS_PTR prev_eip);
for (int i = 0; i < 8; i++) {
Bit8u data;
BX_CPU_THIS_PTR read_virtual_byte(BX_SEG_REG_CS, BX_CPU_THIS_PTR prev_eip + i, &data);
sprintf(buf+strlen(buf), "%02x ", data);
}
BX_INFO((buf));
#endif
#if BX_DISASM
bx_bool valid;
Bit32u phy_addr, Base;
Bit32u phy_addr;
Bit8u instr_buf[32];
char char_buf[256];
unsigned isize;
static disassembler bx_disassemble;
if (protected_mode()) { // 16bit & 32bit protected mode
Base=BX_CPU_THIS_PTR get_segment_base(BX_SEG_REG_CS);
}
else {
Base=BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value<<4;
}
dbg_xlate_linear2phy(BX_CPU_THIS_PTR get_segment_base(BX_SEG_REG_CS) + offset,
&phy_addr, &valid);
if (valid && BX_CPU_THIS_PTR mem!=NULL) {
@ -214,7 +186,8 @@ void BX_CPU_C::debug(bx_address offset)
isize = bx_disassemble.disasm(
BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.d_b,
BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64,
Base, EIP, instr_buf, char_buf);
BX_CPU_THIS_PTR get_segment_base(BX_SEG_REG_CS), offset,
instr_buf, char_buf);
#if BX_SUPPORT_X86_64
if (BX_CPU_THIS_PTR cpu_mode == BX_MODE_LONG_64) isize = 16;
#endif

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: proc_ctrl.cc,v 1.124 2005-11-26 21:36:51 sshwarts Exp $
// $Id: proc_ctrl.cc,v 1.125 2005-11-27 18:36:19 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -119,7 +119,7 @@ void BX_CPU_C::INVD(bxInstruction_c *i)
}
}
BX_INFO(("INVD: Flush caches and TLB !"));
BX_DEBUG(("INVD: Flush caches and TLB !"));
BX_INSTR_CACHE_CNTRL(BX_CPU_ID, BX_INSTR_INVD);
TLB_flush(1); // 1 = Flush Global entries too
#if BX_SUPPORT_ICACHE
@ -144,7 +144,7 @@ void BX_CPU_C::WBINVD(bxInstruction_c *i)
}
}
BX_INFO(("WBINVD: Flush caches and TLB !"));
BX_DEBUG(("WBINVD: Flush caches and TLB !"));
BX_INSTR_CACHE_CNTRL(BX_CPU_ID, BX_INSTR_WBINVD);
TLB_flush(1); // 1 = Flush Global entries too
#if BX_SUPPORT_ICACHE