diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-12-16 03:48:13 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-12-16 03:48:13 -0500 |
commit | 71909a50de2dd5154622c936179d97ec5220f872 (patch) | |
tree | a563ba58ccf8596dc51aaf98c82ad6c6f71deec6 /src/cpu/simple/timing.cc | |
parent | b7ea470a976febd1fad8509a3b6b912672ba4ca3 (diff) | |
download | gem5-71909a50de2dd5154622c936179d97ec5220f872.tar.xz |
CPU: Update where the simple cpus read their cpu id from the thread context to init() to make sure they read the right value. This fixes a bug with multi-processor full-system configurations.
--HG--
extra : convert_revision : 4f2801967a271b43817d88e147c2f80c4480b2c3
Diffstat (limited to 'src/cpu/simple/timing.cc')
-rw-r--r-- | src/cpu/simple/timing.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 8d6a169ab..2f3ee5c73 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -57,12 +57,13 @@ void TimingSimpleCPU::init() { BaseCPU::init(); + cpuId = tc->readCpuId(); #if FULL_SYSTEM for (int i = 0; i < threadContexts.size(); ++i) { ThreadContext *tc = threadContexts[i]; // initialize CPU, including PC - TheISA::initCPU(tc, tc->readCpuId()); + TheISA::initCPU(tc, cpuId); } #endif } |