32d31
< #include "cpu/base.hh"
35,36d33
< #include "mem/port.hh"
< #include "mem/translating_port.hh"
45,46c42,43
< ThreadState::ThreadState(BaseCPU *cpu, int _cpuId, int _tid)
< : baseCpu(cpu), cpuId(_cpuId), tid(_tid), lastActivate(0), lastSuspend(0),
---
> ThreadState::ThreadState(int _cpuId, int _tid)
> : cpuId(_cpuId), tid(_tid), lastActivate(0), lastSuspend(0),
48d44
< physPort(NULL), virtPort(NULL),
51,54c47,50
< ThreadState::ThreadState(BaseCPU *cpu, int _cpuId, int _tid, Process *_process,
< short _asid)
< : baseCpu(cpu), cpuId(_cpuId), tid(_tid), lastActivate(0), lastSuspend(0),
< port(NULL), process(_process), asid(_asid),
---
> ThreadState::ThreadState(int _cpuId, int _tid, Process *_process,
> short _asid, MemObject *mem)
> : cpuId(_cpuId), tid(_tid), lastActivate(0), lastSuspend(0),
> process(_process), asid(_asid),
68a65,66
> SERIALIZE_SCALAR(microPC);
> SERIALIZE_SCALAR(nextMicroPC);
87a86,87
> UNSERIALIZE_SCALAR(microPC);
> UNSERIALIZE_SCALAR(nextMicroPC);
115,141d114
< #else
< TranslatingPort *
< ThreadState::getMemPort()
< {
< if (port != NULL)
< return port;
<
< /* Use this port to for syscall emulation writes to memory. */
< Port *dcache_port, *func_mem_port;
< port = new TranslatingPort(csprintf("%s-%d-funcport",
< baseCpu->name(), tid),
< process->pTable, false);
<
< dcache_port = baseCpu->getPort("dcache_port");
< assert(dcache_port != NULL);
<
< MemObject *mem_object = dcache_port->getPeer()->getOwner();
< assert(mem_object != NULL);
<
< func_mem_port = mem_object->getPort("functional");
< assert(func_mem_port != NULL);
<
< func_mem_port->setPeer(port);
< port->setPeer(func_mem_port);
<
< return port;
< }