diff options
author | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 13:05:44 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@ARM.com> | 2013-01-07 13:05:44 -0500 |
commit | 6daada2701c7ea361843a7c2a50cb616b56b1519 (patch) | |
tree | a43585695855049cbc84ff919dde117c92b49b85 /src/cpu/o3/cpu.cc | |
parent | e2dad8236a95b5d7b1c1470385d0b543d3c7af4a (diff) | |
download | gem5-6daada2701c7ea361843a7c2a50cb616b56b1519.tar.xz |
cpu: Initialize the O3 pipeline from startup()
The entire O3 pipeline used to be initialized from init(), which is
called before initState() or unserialize(). This causes the pipeline
to be initialized from an incorrect thread context. This doesn't
currently lead to correctness problems as instructions fetched from
the incorrect start PC will be squashed a few cycles after
initialization.
This patch will affect the regressions since the O3 CPU now issues its
first instruction fetch to the correct PC instead of 0x0.
Diffstat (limited to 'src/cpu/o3/cpu.cc')
-rw-r--r-- | src/cpu/o3/cpu.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 2e972b765..0419a6173 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -679,17 +679,21 @@ FullO3CPU<Impl>::init() for (int tid = 0; tid < numThreads; ++tid) thread[tid]->noSquashFromTC = false; - // Initialize stages. - fetch.initStage(); - iew.initStage(); - rename.initStage(); - commit.initStage(); - commit.setThreads(thread); } template <class Impl> void +FullO3CPU<Impl>::startup() +{ + fetch.startupStage(); + iew.startupStage(); + rename.startupStage(); + commit.startupStage(); +} + +template <class Impl> +void FullO3CPU<Impl>::activateThread(ThreadID tid) { list<ThreadID>::iterator isActive = |