thread_context: move getSystemPtr so SE mode can get to it.
There was really no reason that it should be FS only.
This commit is contained in:
@@ -86,10 +86,10 @@ class O3ThreadContext : public ThreadContext
|
||||
virtual int threadId() { return thread->threadId(); }
|
||||
virtual void setThreadId(int id) { return thread->setThreadId(id); }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
/** Returns a pointer to the system. */
|
||||
virtual System *getSystemPtr() { return cpu->system; }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
/** Returns a pointer to physical memory. */
|
||||
virtual PhysicalMemory *getPhysMemPtr() { return cpu->physmem; }
|
||||
|
||||
|
||||
@@ -54,9 +54,8 @@ void
|
||||
O3ThreadContext<Impl>::takeOverFrom(ThreadContext *old_context)
|
||||
{
|
||||
// some things should already be set up
|
||||
#if FULL_SYSTEM
|
||||
assert(getSystemPtr() == old_context->getSystemPtr());
|
||||
#else
|
||||
#if !FULL_SYSTEM
|
||||
assert(getProcessPtr() == old_context->getProcessPtr());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -201,9 +201,9 @@ class SimpleThread : public ThreadState
|
||||
|
||||
TheISA::DTB *getDTBPtr() { return dtb; }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
System *getSystemPtr() { return system; }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
FunctionalPort *getPhysPort() { return physPort; }
|
||||
|
||||
/** Return a virtual port. This port cannot be cached locally in an object.
|
||||
|
||||
@@ -129,9 +129,9 @@ class ThreadContext
|
||||
|
||||
virtual TheISA::DTB *getDTBPtr() = 0;
|
||||
|
||||
#if FULL_SYSTEM
|
||||
virtual System *getSystemPtr() = 0;
|
||||
|
||||
#if FULL_SYSTEM
|
||||
virtual TheISA::Kernel::Statistics *getKernelStats() = 0;
|
||||
|
||||
virtual FunctionalPort *getPhysPort() = 0;
|
||||
@@ -318,9 +318,9 @@ class ProxyThreadContext : public ThreadContext
|
||||
|
||||
TheISA::DTB *getDTBPtr() { return actualTC->getDTBPtr(); }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
System *getSystemPtr() { return actualTC->getSystemPtr(); }
|
||||
|
||||
#if FULL_SYSTEM
|
||||
TheISA::Kernel::Statistics *getKernelStats()
|
||||
{ return actualTC->getKernelStats(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user