diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/system.cc | 2 | ||||
-rw-r--r-- | src/sim/system.hh | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc index c0b9486f4..61c6decf7 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -45,14 +45,12 @@ * Rick Strong */ -#include "arch/isa_traits.hh" #include "arch/remote_gdb.hh" #include "arch/utility.hh" #include "base/loader/object_file.hh" #include "base/loader/symtab.hh" #include "base/str.hh" #include "base/trace.hh" -#include "config/the_isa.hh" #include "cpu/thread_context.hh" #include "debug/Loader.hh" #include "debug/WorkItems.hh" diff --git a/src/sim/system.hh b/src/sim/system.hh index 5b68373a6..d82978018 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 ARM Limited + * Copyright (c) 2012, 2014 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -51,9 +51,11 @@ #include <utility> #include <vector> +#include "arch/isa_traits.hh" #include "base/loader/symtab.hh" #include "base/misc.hh" #include "base/statistics.hh" +#include "config/the_isa.hh" #include "cpu/pc_event.hh" #include "enums/MemoryMode.hh" #include "kern/system_events.hh" @@ -269,6 +271,16 @@ class System : public MemObject */ bool isMemAddr(Addr addr) const; + /** + * Get the page bytes for the ISA. + */ + Addr getPageBytes() const { return TheISA::PageBytes; } + + /** + * Get the number of bits worth of in-page adress for the ISA. + */ + Addr getPageShift() const { return TheISA::PageShift; } + protected: PhysicalMemory physmem; |