summaryrefslogtreecommitdiff
path: root/kern/tru64
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-10-23 19:09:18 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2003-10-23 19:09:18 -0700
commitcc9a838f4c5a5bf5e8951bdb351fc7d4b74661fb (patch)
tree1bae8b1b09fcc39d04631c84beaf51f830938372 /kern/tru64
parent320540829d62f9c5a5290a8c9bd991fda297a210 (diff)
parent6e2fc8ce766d1f9cb601b4a2a15d1ba294ce97a5 (diff)
downloadgem5-cc9a838f4c5a5bf5e8951bdb351fc7d4b74661fb.tar.xz
Merge stever@zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG-- extra : convert_revision : b0f93bd35d767fd3a520a9fed70a71d40b0056db
Diffstat (limited to 'kern/tru64')
-rw-r--r--kern/tru64/tru64_system.cc40
-rw-r--r--kern/tru64/tru64_system.hh11
2 files changed, 36 insertions, 15 deletions
diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc
index 823a00e5a..8b4ff668d 100644
--- a/kern/tru64/tru64_system.cc
+++ b/kern/tru64/tru64_system.cc
@@ -184,24 +184,44 @@ Tru64System::~Tru64System()
}
-void
-Tru64System::init(ExecContext *xc)
+int
+Tru64System::registerExecContext(ExecContext *xc)
{
- xc->regs = *initRegs;
+ int xcIndex = System::registerExecContext(xc);
+
+ if (xcIndex == 0) {
+ // xc->regs = *initRegs;
+ xc->initStatus(ExecContext::Active);
+ }
+ else {
+ xc->initStatus(ExecContext::Unallocated);
+ }
+
+ RemoteGDB *rgdb = new RemoteGDB(this, xc);
+ GDBListener *gdbl = new GDBListener(rgdb, 7000 + xcIndex);
+ gdbl->listen();
+
+ if (remoteGDB.size() <= xcIndex) {
+ remoteGDB.resize(xcIndex+1);
+ }
+
+ remoteGDB[xcIndex] = rgdb;
+
+ return xcIndex;
+}
- remoteGDB = new RemoteGDB(this, xc);
- gdbListen = new GDBListener(remoteGDB, 7000);
- gdbListen->listen();
- // Reset the system
- //
- TheISA::init(physmem, &xc->regs);
+void
+Tru64System::replaceExecContext(ExecContext *xc, int xcIndex)
+{
+ System::replaceExecContext(xcIndex, xc);
+ remoteGDB[xcIndex]->replaceExecContext(xc);
}
bool
Tru64System::breakpoint()
{
- return remoteGDB->trap(ALPHA_KENTRY_IF);
+ return remoteGDB[0]->trap(ALPHA_KENTRY_IF);
}
BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64System)
diff --git a/kern/tru64/tru64_system.hh b/kern/tru64/tru64_system.hh
index f1b8bb532..a67792aaf 100644
--- a/kern/tru64/tru64_system.hh
+++ b/kern/tru64/tru64_system.hh
@@ -29,6 +29,8 @@
#ifndef __TRU64_SYSTEM_HH__
#define __TRU64_SYSTEM_HH__
+#include <vector>
+
#include "sim/system.hh"
#include "targetarch/isa_traits.hh"
@@ -48,8 +50,6 @@ class AlphaArguments;
class Tru64System : public System
{
private:
- ExecContext *xc;
-
EcoffObject *kernel;
EcoffObject *console;
@@ -74,8 +74,8 @@ class Tru64System : public System
Addr kernelEntry;
public:
- RemoteGDB *remoteGDB;
- GDBListener *gdbListen;
+ std::vector<RemoteGDB *> remoteGDB;
+ std::vector<GDBListener *> gdbListen;
public:
Tru64System(const std::string _name,
@@ -88,7 +88,8 @@ class Tru64System : public System
const std::string &boot_osflags);
~Tru64System();
- void init(ExecContext *xc);
+ int registerExecContext(ExecContext *xc);
+ void replaceExecContext(ExecContext *xc, int xcIndex);
Addr getKernelStart() const { return kernelStart; }
Addr getKernelEnd() const { return kernelEnd; }