Fixed the bug caused failures of instrumentation on SMP configuration ...

This commit is contained in:
Stanislav Shwartsman 2002-09-29 16:59:28 +00:00
parent 4593431f49
commit b8f1d5c031
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: init.cc,v 1.33 2002-09-28 00:54:05 kevinlawton Exp $
// $Id: init.cc,v 1.34 2002-09-29 16:59:28 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -166,7 +166,7 @@ cpu_param_handler (bx_param_c *param, int set, Bit32s val)
void BX_CPU_C::init(BX_MEM_C *addrspace)
{
BX_DEBUG(( "Init $Id: init.cc,v 1.33 2002-09-28 00:54:05 kevinlawton Exp $"));
BX_DEBUG(( "Init $Id: init.cc,v 1.34 2002-09-29 16:59:28 sshwarts Exp $"));
// BX_CPU_C constructor
BX_CPU_THIS_PTR set_INTR (0);
#if BX_SUPPORT_APIC
@ -325,8 +325,6 @@ void BX_CPU_C::init(BX_MEM_C *addrspace)
mem = addrspace;
sprintf (name, "CPU %p", this);
BX_INSTR_INIT(CPU_ID);
#if BX_WITH_WX
// Register some of the CPUs variables as shadow parameters so that
// they can be visible in the config interface.

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: main.cc,v 1.151 2002-09-25 19:04:59 bdenney Exp $
// $Id: main.cc,v 1.152 2002-09-29 16:58:54 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -1610,6 +1610,7 @@ bx_init_hardware()
BX_CPU(0)->init (BX_MEM(0));
#if BX_SUPPORT_APIC
BX_CPU(0)->local_apic.set_id (0);
BX_INSTR_INIT(0);
#endif
BX_CPU(0)->reset(BX_RESET_HARDWARE);
#else
@ -1638,6 +1639,7 @@ bx_init_hardware()
// assign apic ID from the index of this loop
// if !BX_SUPPORT_APIC, this will not compile.
BX_CPU(i)->local_apic.set_id (i);
BX_INSTR_INIT(i);
BX_CPU(i)->reset(BX_RESET_HARDWARE);
}
#endif