Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/18580
Change subject: cpu: Store the translating proxy with the same pointer in
SE or FS mode.
......................................................................
cpu: Store the translating proxy with the same pointer in SE or FS mode.
Only one is active at a time, so they can share the same pointer.
Change-Id: Ie4ae1f0ffbf9448f6730f9c7d072bc85d6d423da
---
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index c9fc564..3396c75 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -49,7 +49,7 @@
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL),
kernelStats(NULL), process(_process), physProxy(NULL),
virtProxy(NULL),
- proxy(NULL), funcExeInst(0), storeCondFailures(0)
+ funcExeInst(0), storeCondFailures(0)
{
}
@@ -59,8 +59,6 @@
delete physProxy;
if (virtProxy != NULL)
delete virtProxy;
- if (proxy != NULL)
- delete proxy;
}
void
@@ -118,8 +116,8 @@
assert(virtProxy == NULL);
virtProxy = new FSTranslatingPortProxy(tc);
} else {
- assert(proxy == NULL);
- proxy = new SETranslatingPortProxy(baseCpu->getDataPort(),
+ assert(virtProxy == NULL);
+ virtProxy = new SETranslatingPortProxy(baseCpu->getDataPort(),
process,
SETranslatingPortProxy::NextPage);
}
@@ -145,8 +143,8 @@
ThreadState::getMemProxy()
{
assert(!FullSystem);
- assert(proxy != NULL);
- return *proxy;
+ assert(virtProxy != NULL);
+ return *virtProxy;
}
void
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index e00c86f..db4a3f4 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -115,9 +115,9 @@
* the se translating port proxy needs to be reinitialized since it
* holds a pointer to the process class.
*/
- if (proxy) {
- delete proxy;
- proxy = NULL;
+ if (virtProxy) {
+ delete virtProxy;
+ virtProxy = NULL;
initMemProxies(NULL);
}
}
@@ -197,8 +197,7 @@
/** A translating port proxy, outgoing only, for functional
* accesse to virtual addresses. */
- FSTranslatingPortProxy *virtProxy;
- SETranslatingPortProxy *proxy;
+ PortProxy *virtProxy;
public:
/*
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18580
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ie4ae1f0ffbf9448f6730f9c7d072bc85d6d423da
Gerrit-Change-Number: 18580
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev