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:
@@ -116,8 +116,6 @@ Process::Process(ProcessParams *params, EmulationPageTable *pTable,
|
||||
kvmInSE(params->kvmInSE),
|
||||
useForClone(false),
|
||||
pTable(pTable),
|
||||
initVirtMem(system->getSystemPort(), this,
|
||||
SETranslatingPortProxy::Always),
|
||||
objFile(obj_file),
|
||||
argv(params->cmd), envp(params->env),
|
||||
executable(params->executable),
|
||||
@@ -189,9 +187,6 @@ Process::clone(ThreadContext *otc, ThreadContext *ntc,
|
||||
*/
|
||||
delete np->pTable;
|
||||
np->pTable = pTable;
|
||||
auto &proxy = dynamic_cast<SETranslatingPortProxy &>(
|
||||
ntc->getVirtProxy());
|
||||
proxy.setPageTable(np->pTable);
|
||||
|
||||
np->memState = memState;
|
||||
} else {
|
||||
@@ -312,9 +307,12 @@ Process::initState()
|
||||
|
||||
pTable->initState();
|
||||
|
||||
initVirtMem.reset(new SETranslatingPortProxy(
|
||||
tc, SETranslatingPortProxy::Always));
|
||||
|
||||
// load object file into target memory
|
||||
image.write(initVirtMem);
|
||||
interpImage.write(initVirtMem);
|
||||
image.write(*initVirtMem);
|
||||
interpImage.write(*initVirtMem);
|
||||
}
|
||||
|
||||
DrainState
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -172,7 +173,8 @@ class Process : public SimObject
|
||||
|
||||
EmulationPageTable *pTable;
|
||||
|
||||
SETranslatingPortProxy initVirtMem; // memory proxy for initial image load
|
||||
// Memory proxy for initial image load.
|
||||
std::unique_ptr<SETranslatingPortProxy> initVirtMem;
|
||||
|
||||
/**
|
||||
* Each instance of a Loader subclass will have a chance to try to load
|
||||
|
||||
Reference in New Issue
Block a user