correctly deliver INIT

This commit is contained in:
Stanislav Shwartsman 2009-02-03 19:26:09 +00:00
parent 4499ae8d02
commit fbc6f04d8a
2 changed files with 22 additions and 18 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cpu.cc,v 1.267 2009-02-03 19:17:15 sshwarts Exp $
// $Id: cpu.cc,v 1.268 2009-02-03 19:26:09 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -854,9 +854,11 @@ void BX_CPU_C::deliver_SIPI(unsigned vector)
void BX_CPU_C::deliver_INIT(void)
{
if (! BX_CPU_THIS_PTR disable_INIT) {
BX_CPU_THIS_PTR pending_INIT = 1;
BX_CPU_THIS_PTR async_event = 1;
}
}
void BX_CPU_C::deliver_NMI(void)
{

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: init.cc,v 1.196 2009-02-03 19:17:15 sshwarts Exp $
// $Id: init.cc,v 1.197 2009-02-03 19:26:09 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1026,6 +1026,7 @@ void BX_CPU_C::reset(unsigned source)
#endif
#if BX_SUPPORT_SMP
if (source == BX_RESET_HARDWARE) {
// notice if I'm the bootstrap processor. If not, do the equivalent of
// a HALT instruction.
int apic_id = local_apic.get_id();
@ -1041,6 +1042,7 @@ void BX_CPU_C::reset(unsigned source)
disable_INIT = 1; // INIT is disabled when CPU is waiting for SIPI
async_event = 1;
}
}
#endif
// initialize CPUID values - make sure apicbase already initialized