summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/system.cc16
-rw-r--r--sim/system.hh2
2 files changed, 12 insertions, 6 deletions
diff --git a/sim/system.cc b/sim/system.cc
index 9fdadf649..1b1a145c6 100644
--- a/sim/system.cc
+++ b/sim/system.cc
@@ -194,12 +194,6 @@ System::registerExecContext(ExecContext *xc)
int xcIndex = execContexts.size();
execContexts.push_back(xc);
- if (xcIndex == 0) {
- // activate with zero delay so that we start ticking right
- // away on cycle 0
- xc->activate(0);
- }
-
RemoteGDB *rgdb = new RemoteGDB(this, xc);
GDBListener *gdbl = new GDBListener(rgdb, 7000 + xcIndex);
gdbl->listen();
@@ -219,6 +213,16 @@ System::registerExecContext(ExecContext *xc)
}
void
+System::startup()
+{
+ if (!execContexts.empty()) {
+ // activate with zero delay so that we start ticking right
+ // away on cycle 0
+ execContexts[0]->activate(0);
+ }
+}
+
+void
System::replaceExecContext(ExecContext *xc, int xcIndex)
{
if (xcIndex >= execContexts.size()) {
diff --git a/sim/system.hh b/sim/system.hh
index 5294f417e..61784b044 100644
--- a/sim/system.hh
+++ b/sim/system.hh
@@ -122,6 +122,8 @@ class System : public SimObject
System(Params *p);
~System();
+ void startup();
+
public:
/**
* Returns the addess the kernel starts at.