diff options
Diffstat (limited to 'src/sim/system.hh')
-rw-r--r-- | src/sim/system.hh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sim/system.hh b/src/sim/system.hh index 059dc92dc..c138d2ee4 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -39,6 +39,7 @@ #include "base/loader/symtab.hh" #include "base/misc.hh" #include "base/statistics.hh" +#include "config/full_system.hh" #include "cpu/pc_event.hh" #include "mem/port.hh" #include "sim/sim_object.hh" @@ -61,6 +62,23 @@ class RemoteGDB; class System : public SimObject { public: + enum MemoryMode { + Invalid=0, + Atomic, + Timing + }; + + static const char *MemoryModeStrings[3]; + + + MemoryMode getMemoryMode() { assert(memoryMode); return memoryMode; } + + /** Change the memory mode of the system. This should only be called by the + * python!! + * @param mode Mode to change to (atomic/timing) + */ + void setMemoryMode(MemoryMode mode); + PhysicalMemory *physmem; PCEventQueue pcEventQueue; @@ -108,6 +126,8 @@ class System : public SimObject protected: + MemoryMode memoryMode; + #if FULL_SYSTEM /** * Fix up an address used to match PCs for hooking simulator @@ -153,6 +173,7 @@ class System : public SimObject { std::string name; PhysicalMemory *physmem; + MemoryMode mem_mode; #if FULL_SYSTEM Tick boot_cpu_frequency; |