summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/o3/cpu.cc3
-rw-r--r--src/cpu/simple/base.cc7
-rw-r--r--src/cpu/simple/base.hh2
-rw-r--r--src/cpu/simple_thread.cc6
-rw-r--r--src/cpu/simple_thread.hh1
5 files changed, 19 insertions, 0 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 18c536090..393b9a189 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -678,6 +678,9 @@ template <class Impl>
void
FullO3CPU<Impl>::startup()
{
+ for (int tid = 0; tid < numThreads; ++tid)
+ isa[tid]->startup(threadContexts[tid]);
+
fetch.startupStage();
decode.startupStage();
iew.startupStage();
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index 13e08a6cb..4db1c6c10 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -515,6 +515,13 @@ BaseSimpleCPU::advancePC(Fault fault)
}
}
+void
+BaseSimpleCPU::startup()
+{
+ BaseCPU::startup();
+ thread->startup();
+}
+
/*Fault
BaseSimpleCPU::CacheOp(uint8_t Op, Addr EffAddr)
{
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index 18b97c42f..7e84dcc16 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -172,6 +172,8 @@ class BaseSimpleCPU : public BaseCPU
virtual void regStats();
virtual void resetStats();
+ virtual void startup();
+
// number of simulated instructions
Counter numInst;
Counter startNumInst;
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 9cf8da7b4..77569aa68 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -143,6 +143,12 @@ SimpleThread::unserialize(Checkpoint *cp, const std::string &section)
}
void
+SimpleThread::startup()
+{
+ isa->startup(tc);
+}
+
+void
SimpleThread::dumpFuncProfile()
{
std::ostream *os = simout.create(csprintf("profile.%s.dat",
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 6f1173b7f..d752ed105 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -150,6 +150,7 @@ class SimpleThread : public ThreadState
void serialize(std::ostream &os);
void unserialize(Checkpoint *cp, const std::string &section);
+ void startup();
/***************************************************************
* SimpleThread functions to provide CPU with access to various