- bugfixes
This commit is contained in:
parent
b47d9046ca
commit
a5badd3b83
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: exception.cc,v 1.136 2009-02-08 17:37:19 sshwarts Exp $
|
||||
// $Id: exception.cc,v 1.137 2009-02-13 09:51:57 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -789,9 +789,9 @@ void BX_CPU_C::interrupt(Bit8u vector, unsigned type, bx_bool push_error, Bit16u
|
||||
switch(type) {
|
||||
case BX_SOFTWARE_INTERRUPT:
|
||||
case BX_SOFTWARE_EXCEPTION:
|
||||
case BX_PRIVILEGED_SOFTWARE_INTERRUPT:
|
||||
is_INT = 1;
|
||||
break;
|
||||
case BX_PRIVILEGED_SOFTWARE_INTERRUPT:
|
||||
case BX_EXTERNAL_INTERRUPT:
|
||||
case BX_NMI:
|
||||
case BX_HARDWARE_EXCEPTION:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: proc_ctrl.cc,v 1.285 2009-02-09 19:46:34 sshwarts Exp $
|
||||
// $Id: proc_ctrl.cc,v 1.286 2009-02-13 09:51:57 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -1615,10 +1615,17 @@ void BX_CPU_C::check_monitor(bx_phy_address begin_addr, unsigned len)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::MONITOR(bxInstruction_c *i)
|
||||
{
|
||||
#if BX_SUPPORT_MONITOR_MWAIT
|
||||
// TODO: #UD when CPL > 0 and
|
||||
// MSR 0xC0010015[MONITOR_MWAIT_USER_UNABLE] = 1
|
||||
if (!real_mode() && CPL != 0) {
|
||||
BX_DEBUG(("MWAIT instruction not recognized when CPL != 0"));
|
||||
exception(BX_UD_EXCEPTION, 0, 0);
|
||||
}
|
||||
|
||||
BX_DEBUG(("MONITOR instruction executed EAX = 0x08x", (unsigned) EAX));
|
||||
|
||||
#if BX_SUPPORT_VMX
|
||||
VMexit_MONITOR(i);
|
||||
#endif
|
||||
|
||||
if (RCX != 0) {
|
||||
BX_ERROR(("MONITOR: no optional extensions supported"));
|
||||
exception(BX_GP_EXCEPTION, 0, 0);
|
||||
@ -1697,10 +1704,17 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MONITOR(bxInstruction_c *i)
|
||||
void BX_CPP_AttrRegparmN(1) BX_CPU_C::MWAIT(bxInstruction_c *i)
|
||||
{
|
||||
#if BX_SUPPORT_MONITOR_MWAIT
|
||||
// TODO: #UD when CPL > 0 and
|
||||
// MSR 0xC0010015[MONITOR_MWAIT_USER_UNABLE] = 1
|
||||
if (!real_mode() && CPL != 0) {
|
||||
BX_DEBUG(("MWAIT instruction not recognized when CPL != 0"));
|
||||
exception(BX_UD_EXCEPTION, 0, 0);
|
||||
}
|
||||
|
||||
BX_DEBUG(("MWAIT instruction executed ECX = 0x%08x", ECX));
|
||||
|
||||
#if BX_SUPPORT_VMX
|
||||
VMexit_MWAIT(i);
|
||||
#endif
|
||||
|
||||
// only one extension is supported
|
||||
// ECX[0] - interrupt MWAIT even if EFLAGS.IF = 0
|
||||
if (RCX & ~(BX_CONST64(1))) {
|
||||
|
Loading…
Reference in New Issue
Block a user