arch,cpu,mem,sim: Reimplement the SE translating proxy using the FS one.

The only functional difference between them was that the SE one might
have optionally fixed up missing translations for demand paging.

This lets us get rid of some code recreating the proxy ports in
setProcessPtr since the SE translating port no longer keeps a copy of
the process object pointer.

Change-Id: Id97df1874f1de138ffd4f2dbb5846dda79d9e4ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26550
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2020-03-09 16:50:32 -07:00
parent 8e0e7da5ab
commit 7342bccd8d
15 changed files with 122 additions and 216 deletions

View File

@@ -115,9 +115,8 @@ ThreadState::initMemProxies(ThreadContext *tc)
virtProxy = new FSTranslatingPortProxy(tc);
} else {
assert(virtProxy == NULL);
virtProxy = new SETranslatingPortProxy(baseCpu->getSendFunctional(),
process,
SETranslatingPortProxy::NextPage);
virtProxy = new SETranslatingPortProxy(
tc, SETranslatingPortProxy::NextPage);
}
}

View File

@@ -105,20 +105,7 @@ struct ThreadState : public Serializable {
Process *getProcessPtr() { return process; }
void setProcessPtr(Process *p)
{
process = p;
/**
* When the process pointer changes while operating in SE Mode,
* the se translating port proxy needs to be reinitialized since it
* holds a pointer to the process class.
*/
if (virtProxy) {
delete virtProxy;
virtProxy = NULL;
initMemProxies(NULL);
}
}
void setProcessPtr(Process *p) { process = p; }
/** Reads the number of instructions functionally executed and
* committed.