SE/FS: Record the system pointer all the time for the simple CPU.
This pointer was only being stored in code that came from SE mode. The system pointer is always meaningful and available, so it should always be stored.
This commit is contained in:
parent
cdb32860b4
commit
e80ebc308f
3 changed files with 9 additions and 7 deletions
|
@ -94,8 +94,8 @@ BaseSimpleCPU::BaseSimpleCPU(BaseSimpleCPUParams *p)
|
||||||
if (FullSystem)
|
if (FullSystem)
|
||||||
thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb);
|
thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb);
|
||||||
else
|
else
|
||||||
thread = new SimpleThread(this, /* thread_num */ 0, p->workload[0],
|
thread = new SimpleThread(this, /* thread_num */ 0, p->system,
|
||||||
p->itb, p->dtb);
|
p->workload[0], p->itb, p->dtb);
|
||||||
|
|
||||||
thread->setStatus(ThreadContext::Halted);
|
thread->setStatus(ThreadContext::Halted);
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,11 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process,
|
SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
|
||||||
TheISA::TLB *_itb, TheISA::TLB *_dtb)
|
Process *_process, TheISA::TLB *_itb,
|
||||||
: ThreadState(_cpu, _thread_num, _process), itb(_itb), dtb(_dtb)
|
TheISA::TLB *_dtb)
|
||||||
|
: ThreadState(_cpu, _thread_num, _process), system(_sys), itb(_itb),
|
||||||
|
dtb(_dtb)
|
||||||
{
|
{
|
||||||
clearArchRegs();
|
clearArchRegs();
|
||||||
tc = new ProxyThreadContext<SimpleThread>(this);
|
tc = new ProxyThreadContext<SimpleThread>(this);
|
||||||
|
|
|
@ -137,8 +137,8 @@ class SimpleThread : public ThreadState
|
||||||
TheISA::TLB *_itb, TheISA::TLB *_dtb,
|
TheISA::TLB *_itb, TheISA::TLB *_dtb,
|
||||||
bool use_kernel_stats = true);
|
bool use_kernel_stats = true);
|
||||||
// SE
|
// SE
|
||||||
SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process,
|
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system,
|
||||||
TheISA::TLB *_itb, TheISA::TLB *_dtb);
|
Process *_process, TheISA::TLB *_itb, TheISA::TLB *_dtb);
|
||||||
|
|
||||||
SimpleThread();
|
SimpleThread();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue