misc: Move MemPool based calls to the SEWorkload.
These currently proxy to the System object, but this is one step towards moving the MemPool-s out of the System and into the SEWorkload where they really should have been from the start. Change-Id: Id27e7b874c283abf07bd892c8467a9cc52e2fdff Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50342 Reviewed-by: Matthew Poremba <matthew.poremba@amd.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "base/types.hh"
|
||||
#include "debug/MMU.hh"
|
||||
#include "mem/page_table.hh"
|
||||
#include "sim/se_workload.hh"
|
||||
#include "sim/system.hh"
|
||||
|
||||
namespace gem5
|
||||
@@ -106,7 +107,9 @@ template <class First, class ...Rest>
|
||||
Addr
|
||||
prepTopTable(System *system, Addr pageSize)
|
||||
{
|
||||
Addr addr = system->allocPhysPages(First::tableSize());
|
||||
auto *se_workload = dynamic_cast<SEWorkload *>(system->workload);
|
||||
fatal_if(!se_workload, "Couldn't find an appropriate workload object.");
|
||||
Addr addr = se_workload->allocPhysPages(First::tableSize());
|
||||
PortProxy &p = system->physProxy;
|
||||
p.memsetBlob(addr, 0, First::tableSize() * pageSize);
|
||||
return addr;
|
||||
|
||||
Reference in New Issue
Block a user