diff options
Diffstat (limited to 'sim/system.hh')
-rw-r--r-- | sim/system.hh | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/sim/system.hh b/sim/system.hh index aa697c040..6602f8582 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -35,27 +35,29 @@ #include "base/statistics.hh" #include "base/loader/symtab.hh" #include "cpu/pc_event.hh" -#include "kern/system_events.hh" #include "sim/sim_object.hh" +#if FULL_SYSTEM +#include "kern/system_events.hh" +#endif class BaseCPU; class ExecContext; -class GDBListener; class MemoryController; class ObjectFile; class PhysicalMemory; + +#if FULL_SYSTEM class Platform; +class GDBListener; class RemoteGDB; namespace Kernel { class Binning; } +#endif class System : public SimObject { public: - MemoryController *memctrl; PhysicalMemory *physmem; - Platform *platform; PCEventQueue pcEventQueue; - uint64_t init_param; std::vector<ExecContext *> execContexts; int numcpus; @@ -68,6 +70,11 @@ class System : public SimObject return numcpus; } +#if FULL_SYSTEM + MemoryController *memctrl; + Platform *platform; + uint64_t init_param; + /** kernel symbol table */ SymbolTable *kernelSymtab; @@ -97,11 +104,18 @@ class System : public SimObject Kernel::Binning *kernelBinning; -#ifndef NDEBUG +#ifdef DEBUG /** Event to halt the simulator if the console calls panic() */ BreakPCEvent *consolePanicEvent; #endif +#else + + int page_ptr; + + +#endif // FULL_SYSTEM + protected: /** @@ -128,6 +142,7 @@ class System : public SimObject return NULL; } +#if FULL_SYSTEM /** Add a function-based event to kernel code. */ template <class T> T *System::addKernelFuncEvent(const char *lbl) @@ -148,19 +163,24 @@ class System : public SimObject { return addFuncEvent<T>(consoleSymtab, lbl); } +#endif public: +#if FULL_SYSTEM std::vector<RemoteGDB *> remoteGDB; std::vector<GDBListener *> gdbListen; bool breakpoint(); +#endif // FULL_SYSTEM public: struct Params { std::string name; + PhysicalMemory *physmem; + +#if FULL_SYSTEM Tick boot_cpu_frequency; MemoryController *memctrl; - PhysicalMemory *physmem; uint64_t init_param; bool bin; std::vector<std::string> binned_fns; @@ -174,6 +194,7 @@ class System : public SimObject std::string readfile; uint64_t system_type; uint64_t system_rev; +#endif }; Params *params; @@ -183,6 +204,8 @@ class System : public SimObject void startup(); public: + +#if FULL_SYSTEM /** * Set the m5AlphaAccess pointer in the console */ @@ -206,6 +229,12 @@ class System : public SimObject */ Addr getKernelEntry() const { return kernelEntry; } +#else + + Addr new_page(); + +#endif // FULL_SYSTEM + int registerExecContext(ExecContext *xc, int xcIndex); void replaceExecContext(ExecContext *xc, int xcIndex); |