diff options
Diffstat (limited to 'sim/system.hh')
-rw-r--r-- | sim/system.hh | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/sim/system.hh b/sim/system.hh index ea482a102..0f82f81f5 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -32,30 +32,33 @@ #include <string> #include <vector> -#include "base/statistics.hh" #include "base/loader/symtab.hh" +#include "base/misc.hh" +#include "base/statistics.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; +class MemObject; + +#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; + MemObject *physmem; PCEventQueue pcEventQueue; - uint64_t init_param; std::vector<ExecContext *> execContexts; int numcpus; @@ -68,6 +71,11 @@ class System : public SimObject return numcpus; } +#if FULL_SYSTEM + MemoryController *memctrl; + Platform *platform; + uint64_t init_param; + /** kernel symbol table */ SymbolTable *kernelSymtab; @@ -85,8 +93,16 @@ class System : public SimObject Kernel::Binning *kernelBinning; +#else + + int page_ptr; + + +#endif // FULL_SYSTEM + protected: +#if FULL_SYSTEM /** * Fix up an address used to match PCs for hooking simulator * events on to target function executions. See comment in @@ -118,18 +134,23 @@ class System : public SimObject return addFuncEvent<T>(kernelSymtab, lbl); } +#endif public: +#if FULL_SYSTEM std::vector<RemoteGDB *> remoteGDB; std::vector<GDBListener *> gdbListen; virtual bool breakpoint() = 0; +#endif // FULL_SYSTEM public: struct Params { std::string name; + MemObject *physmem; + +#if FULL_SYSTEM Tick boot_cpu_frequency; MemoryController *memctrl; - PhysicalMemory *physmem; uint64_t init_param; bool bin; std::vector<std::string> binned_fns; @@ -137,6 +158,7 @@ class System : public SimObject std::string kernel_path; std::string readfile; +#endif }; protected: @@ -151,6 +173,8 @@ class System : public SimObject const Params *params() const { return (const Params *)_params; } public: + +#if FULL_SYSTEM /** * Returns the addess the kernel starts at. * @return address the kernel starts at @@ -169,6 +193,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); |