summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-06-28 01:09:13 -0400
committerNathan Binkert <binkertn@umich.edu>2005-06-28 01:09:13 -0400
commitd172447a7ae945139d0c3465b8504cd6b77ae819 (patch)
treef5f0e9e811ef97d1f2a50dfaef634aac77916643 /sim
parent769234f69e10a923fb4251996746b31d84c9357a (diff)
downloadgem5-d172447a7ae945139d0c3465b8504cd6b77ae819.tar.xz
Pass the location of the m5 console backdoor to the console
instead of compiling it into the console version dev/alpha_access.h: move serialization stuff to alpha_console.hh define the ALPHA_ACCESS_BASE in m5 instead of in console.c and have m5 pass the value to the console dev/alpha_console.cc: dev/alpha_console.hh: Move serialization stuff into a derived class of AlphaAccess sim/system.cc: pass the value of ALPHA_ACCESS_BASE to the console code via the m5AlphaAccess console variable. --HG-- extra : convert_revision : 0ea4ba239f03d6dad51a6efae0385aa543064117
Diffstat (limited to 'sim')
-rw-r--r--sim/system.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sim/system.cc b/sim/system.cc
index 3ac0fdce1..c1a4c2a87 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -30,6 +30,7 @@
#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"
@@ -144,6 +145,21 @@ 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.
*/