summaryrefslogtreecommitdiff
path: root/sim/system.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sim/system.hh')
-rw-r--r--sim/system.hh45
1 files changed, 37 insertions, 8 deletions
diff --git a/sim/system.hh b/sim/system.hh
index ea482a102..cbe876c42 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;
+class Memory;
+
+#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;
+ Memory *physmem;
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;
@@ -85,6 +92,13 @@ class System : public SimObject
Kernel::Binning *kernelBinning;
+#else
+
+ int page_ptr;
+
+
+#endif // FULL_SYSTEM
+
protected:
/**
@@ -111,6 +125,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)
@@ -118,18 +133,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;
+ Memory *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 +157,7 @@ class System : public SimObject
std::string kernel_path;
std::string readfile;
+#endif
};
protected:
@@ -151,6 +172,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 +192,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);