From b07e698b3e5d758661d703e327d3d270c4aba33e Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Thu, 5 Jan 2006 21:39:11 +0000 Subject: [PATCH] Initialize CPU and APIC after the bx_pc_system object --- bochs/cpu/cpu.cc | 12 +----------- bochs/main.cc | 14 +++++++++++--- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/bochs/cpu/cpu.cc b/bochs/cpu/cpu.cc index ed0876b42..8c9222796 100644 --- a/bochs/cpu/cpu.cc +++ b/bochs/cpu/cpu.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: cpu.cc,v 1.119 2005-12-28 19:18:50 sshwarts Exp $ +// $Id: cpu.cc,v 1.120 2006-01-05 21:39:11 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -31,16 +31,6 @@ #include "iodev/iodev.h" #define LOG_THIS BX_CPU_THIS_PTR -#if BX_SMP_PROCESSORS==1 -// single processor simulation, so there's one of everything -BOCHSAPI BX_CPU_C bx_cpu; -BOCHSAPI BX_MEM_C bx_mem; -#else -// multiprocessor simulation, we need an array of cpus and memories -BOCHSAPI BX_CPU_C *bx_cpu_array[BX_SMP_PROCESSORS]; -BOCHSAPI BX_MEM_C *bx_mem_array[BX_ADDRESS_SPACES]; -#endif - #if BX_SUPPORT_ICACHE bxPageWriteStampTable pageWriteStampTable; diff --git a/bochs/main.cc b/bochs/main.cc index d3e72ad85..e5560c93d 100644 --- a/bochs/main.cc +++ b/bochs/main.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: main.cc,v 1.298 2005-11-26 21:36:50 sshwarts Exp $ +// $Id: main.cc,v 1.299 2006-01-05 21:39:11 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -75,8 +75,6 @@ void bx_unmapped_io_write_handler(Bit32u address, Bit32u value, void bx_close_harddrive(void); #endif - - void bx_init_bx_dbg (void); static char *divider = "========================================================================"; static logfunctions thePluginLog; @@ -95,6 +93,16 @@ bx_pc_system_c bx_pc_system; bx_debug_t bx_dbg; +#if BX_SMP_PROCESSORS==1 +// single processor simulation, so there's one of everything +BOCHSAPI BX_CPU_C bx_cpu; +BOCHSAPI BX_MEM_C bx_mem; +#else +// multiprocessor simulation, we need an array of cpus and memories +BOCHSAPI BX_CPU_C *bx_cpu_array[BX_SMP_PROCESSORS]; +BOCHSAPI BX_MEM_C *bx_mem_array[BX_ADDRESS_SPACES]; +#endif + char *bochsrc_filename = NULL; void bx_print_header ()