From: Nathan Binkert Date: Tue, 20 Jan 2009 04:36:49 +0000 (-0800) Subject: thread_context: move getSystemPtr so SE mode can get to it. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbac448b088eea12d8b20400c7a770e57e28d771;p=gem5.git thread_context: move getSystemPtr so SE mode can get to it. There was really no reason that it should be FS only. --- diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh index 8682e071e..6de773ff1 100755 --- a/src/cpu/o3/thread_context.hh +++ b/src/cpu/o3/thread_context.hh @@ -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; } diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index 735827ebc..12b2d1b31 100755 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -54,9 +54,8 @@ void O3ThreadContext::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 diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index 4831b701a..678bb42bb 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -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. diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index 9ee5250a3..7c3f11c12 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -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(); }