summaryrefslogtreecommitdiff
path: root/src/cpu/simple_thread.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-11-02 15:20:47 -0500
committerKevin Lim <ktlim@umich.edu>2006-11-02 15:20:47 -0500
commite71ccde66369951c23eb20281c68a8cb66c4a504 (patch)
tree209293eb44ceeee7eb04bc778956f57ae812978b /src/cpu/simple_thread.cc
parent683d8f0831b476a906dc2720265a2334ba0117e3 (diff)
parent45363ea658251df0c31a75d7bd5d0ac3a3809623 (diff)
downloadgem5-e71ccde66369951c23eb20281c68a8cb66c4a504.tar.xz
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-busfix --HG-- extra : convert_revision : a9a41e2c292bd95aa148e1cf4d9a77c0622a462b
Diffstat (limited to 'src/cpu/simple_thread.cc')
-rw-r--r--src/cpu/simple_thread.cc30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index d4e5f8230..8bb4ec46b 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -129,6 +129,10 @@ SimpleThread::SimpleThread()
SimpleThread::~SimpleThread()
{
+#if FULL_SYSTEM
+ delete physPort;
+ delete virtPort;
+#endif
delete tc;
}
@@ -304,11 +308,9 @@ SimpleThread::getVirtPort(ThreadContext *src_tc)
if (!src_tc)
return virtPort;
- VirtualPort *vp;
- Port *mem_port;
+ VirtualPort *vp = new VirtualPort("tc-vport", src_tc);
+ Port *mem_port = getMemFuncPort();
- vp = new VirtualPort("tc-vport", src_tc);
- mem_port = system->physmem->getPort("functional");
mem_port->setPeer(vp);
vp->setPeer(mem_port);
return vp;
@@ -323,25 +325,5 @@ SimpleThread::delVirtPort(VirtualPort *vp)
}
}
-#else
-TranslatingPort *
-SimpleThread::getMemPort()
-{
- if (port != NULL)
- return port;
-
- /* Use this port to for syscall emulation writes to memory. */
- Port *dcache_port;
- port = new TranslatingPort(csprintf("%s-%d-funcport",
- cpu->name(), tid),
- process->pTable, false);
- dcache_port = cpu->getPort("dcache_port");
- assert(dcache_port != NULL);
- dcache_port = dcache_port->getPeer();
-// mem_port->setPeer(port);
- port->setPeer(dcache_port);
- return port;
-}
-
#endif