correctly deliver INIT
This commit is contained in:
parent
4499ae8d02
commit
fbc6f04d8a
@ -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,8 +854,10 @@ void BX_CPU_C::deliver_SIPI(unsigned vector)
|
||||
|
||||
void BX_CPU_C::deliver_INIT(void)
|
||||
{
|
||||
BX_CPU_THIS_PTR pending_INIT = 1;
|
||||
BX_CPU_THIS_PTR async_event = 1;
|
||||
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)
|
||||
|
@ -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,20 +1026,22 @@ void BX_CPU_C::reset(unsigned source)
|
||||
#endif
|
||||
|
||||
#if BX_SUPPORT_SMP
|
||||
// notice if I'm the bootstrap processor. If not, do the equivalent of
|
||||
// a HALT instruction.
|
||||
int apic_id = local_apic.get_id();
|
||||
if (BX_BOOTSTRAP_PROCESSOR == apic_id) {
|
||||
// boot normally
|
||||
BX_CPU_THIS_PTR msr.apicbase |= 0x0100; /* set bit 8 BSP */
|
||||
BX_INFO(("CPU[%d] is the bootstrap processor", apic_id));
|
||||
} else {
|
||||
// it's an application processor, halt until IPI is heard.
|
||||
BX_CPU_THIS_PTR msr.apicbase &= ~0x0100; /* clear bit 8 BSP */
|
||||
BX_INFO(("CPU[%d] is an application processor. Halting until IPI.", apic_id));
|
||||
activity_state = BX_ACTIVITY_STATE_WAIT_FOR_SIPI;
|
||||
disable_INIT = 1; // INIT is disabled when CPU is waiting for SIPI
|
||||
async_event = 1;
|
||||
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();
|
||||
if (BX_BOOTSTRAP_PROCESSOR == apic_id) {
|
||||
// boot normally
|
||||
BX_CPU_THIS_PTR msr.apicbase |= 0x0100; /* set bit 8 BSP */
|
||||
BX_INFO(("CPU[%d] is the bootstrap processor", apic_id));
|
||||
} else {
|
||||
// it's an application processor, halt until IPI is heard.
|
||||
BX_CPU_THIS_PTR msr.apicbase &= ~0x0100; /* clear bit 8 BSP */
|
||||
BX_INFO(("CPU[%d] is an application processor. Halting until IPI.", apic_id));
|
||||
activity_state = BX_ACTIVITY_STATE_WAIT_FOR_SIPI;
|
||||
disable_INIT = 1; // INIT is disabled when CPU is waiting for SIPI
|
||||
async_event = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user