summaryrefslogtreecommitdiff
path: root/sim/system.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sim/system.cc')
-rw-r--r--sim/system.cc33
1 files changed, 17 insertions, 16 deletions
diff --git a/sim/system.cc b/sim/system.cc
index c1a4c2a87..8397b8e01 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -30,7 +30,6 @@
#include "base/loader/symtab.hh"
#include "base/remote_gdb.hh"
#include "cpu/exec_context.hh"
-#include "dev/alpha_access.h"
#include "kern/kernel_stats.hh"
#include "mem/functional/memory_control.hh"
#include "mem/functional/physical.hh"
@@ -145,21 +144,6 @@ System::System(Params *p)
}
/**
- * Set the m5AlphaAccess pointer in the console
- */
- if (consoleSymtab->findAddress("m5AlphaAccess", addr)) {
- Addr paddr = vtophys(physmem, addr);
- uint64_t *m5AlphaAccess =
- (uint64_t *)physmem->dma_addr(paddr, sizeof(uint64_t));
-
- if (!m5AlphaAccess)
- panic("could not translate m5AlphaAccess addr\n");
-
- *m5AlphaAccess = htoa(ALPHA_ACCESS_BASE);
- } else
- panic("could not find m5AlphaAccess\n");
-
- /**
* Set the hardware reset parameter block system type and revision
* information to Tsunami.
*/
@@ -196,6 +180,23 @@ System::~System()
#endif
}
+void
+System::setAlphaAccess(Addr access)
+{
+ Addr addr = 0;
+ if (consoleSymtab->findAddress("m5AlphaAccess", addr)) {
+ Addr paddr = vtophys(physmem, addr);
+ uint64_t *m5AlphaAccess =
+ (uint64_t *)physmem->dma_addr(paddr, sizeof(uint64_t));
+
+ if (!m5AlphaAccess)
+ panic("could not translate m5AlphaAccess addr\n");
+
+ *m5AlphaAccess = htoa(EV5::Phys2K0Seg(access));
+ } else
+ panic("could not find m5AlphaAccess\n");
+}
+
bool
System::breakpoint()
{