From f94ff9ace556d9aa1ac9d00b8b1dbc73e161d213 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 13 Oct 2003 17:24:27 -0400 Subject: Split up kernel.cc into separate files for dump_mbuf and printf cpu/exec_context.hh: dev/alpha_console.cc: sim/system.cc: sim/system.hh: Convert from fixed array to a vector arch/alpha/arguments.hh: now that CopyData and CopyString are in vtophys.hh, this include is not necessary arch/alpha/vtophys.hh: Include isa_traits.hh for Addr cpu/pc_event.cc: Temporarily get this working while we're changing things --HG-- extra : convert_revision : 9a7597b7bd5d050819766f8edf7a02f28447b9ca --- sim/system.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/system.hh') diff --git a/sim/system.hh b/sim/system.hh index 830e78f4a..3ab514bfa 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -30,6 +30,7 @@ #define __SYSTEM_HH__ #include +#include #include "sim/sim_object.hh" #include "cpu/pc_event.hh" @@ -72,8 +73,7 @@ class System : public SimObject PCEventQueue pcEventQueue; - ExecContext *xc_array[12/*MAX_CPUS*/]; - int num_cpus; + std::vector xcvec; RemoteGDB *remoteGDB; GDBListener *gdbListen; -- cgit v1.2.3 From 4759c203c774ef42a2a35832e220a95cffb5fa7b Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Tue, 14 Oct 2003 12:19:59 -0400 Subject: Remove all of the Tru64 specific stuff from the base System object into its own Tru64System object. Also remove the System builder stuff and create a Tru64System builder. This makes it much simpler to support more operating systems. arch/alpha/ev5.cc: Each system provides its own mechanism for doing a breakpoint. base/remote_gdb.hh: #include cpu/pc_event.cc: cpu/pc_event.hh: Separate out System specific PCEvents cpu/simple_cpu/simple_cpu.cc: each system provides its own init script kern/tru64/dump_mbuf.cc: kern/tru64/printf.cc: Stick this in a namespace --HG-- extra : convert_revision : 9f74527ed2ff8010431d9aff34357aaecc1fb3f6 --- sim/system.hh | 49 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) (limited to 'sim/system.hh') diff --git a/sim/system.hh b/sim/system.hh index 3ab514bfa..bec1011ce 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -45,66 +45,35 @@ class ExecContext; class System : public SimObject { - private: - - SymbolTable *kernelSymtab; - SymbolTable *consoleSymtab; - - BreakPCEvent kernel_panic_event; - BreakPCEvent console_panic_event; - BadAddrEvent badaddr_event; - SkipFuncEvent skip_power_state; - SkipFuncEvent skip_scavenge_boot; - PrintfEvent printf_event; - DebugPrintfEvent debug_printf_event; - DebugPrintfEvent debug_printfr_event; - DumpMbufEvent dump_mbuf_event; - - RegFile *initRegs; - - Addr kernelStart; - Addr kernelEnd; - Addr kernelEntry; - public: - MemoryController *memCtrl; PhysicalMemory *physmem; PCEventQueue pcEventQueue; std::vector xcvec; + void registerExecContext(ExecContext *xc); - RemoteGDB *remoteGDB; - GDBListener *gdbListen; - - System(const std::string name, - MemoryController *, PhysicalMemory *, - const std::string &kernel_path, const std::string &console_path, - const std::string &palcode, const std::string &boot_osflags); - + public: + System(const std::string name, MemoryController *, PhysicalMemory *); ~System(); - const SymbolTable *getKernelSymtab() const { return kernelSymtab; } - const SymbolTable *getConsoleSymtab() const { return consoleSymtab; } + virtual void init(ExecContext *xc) = 0; - Addr getKernelStart() const { return kernelStart; } - Addr getKernelEnd() const { return kernelEnd; } - Addr getKernelEntry() const { return kernelEntry; } + virtual Addr getKernelStart() const = 0; + virtual Addr getKernelEnd() const = 0; + virtual Addr getKernelEntry() const = 0; + virtual bool breakpoint() = 0; - void initBootContext(ExecContext *xc); - void registerExecContext(ExecContext *xc); + public: //////////////////////////////////////////// // // STATIC GLOBAL SYSTEM LIST // //////////////////////////////////////////// - public: - static std::vector systemList; - static int numSystemsRunning; static void printSystems(); -- cgit v1.2.3