summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 7b04f5a90..677152ce8 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -352,7 +352,7 @@ BaseCPU::takeOverFrom(BaseCPU *oldCPU, Port *ic, Port *dc)
// connected to anything. Also connect old CPU's memory to new
// CPU.
Port *peer;
- if (ic->getPeer() == NULL) {
+ if (ic->getPeer() == NULL || ic->getPeer()->isDefaultPort()) {
peer = oldCPU->getPort("icache_port")->getPeer();
ic->setPeer(peer);
} else {
@@ -360,7 +360,7 @@ BaseCPU::takeOverFrom(BaseCPU *oldCPU, Port *ic, Port *dc)
}
peer->setPeer(ic);
- if (dc->getPeer() == NULL) {
+ if (dc->getPeer() == NULL || dc->getPeer()->isDefaultPort()) {
peer = oldCPU->getPort("dcache_port")->getPeer();
dc->setPeer(peer);
} else {