arch,cpu,mem: Replace the mmmapped IPR mechanism with local accesses.
The new local access mechanism installs a callback in the request which implements what the mmapped IPR was doing. That avoids having to have stubs in ISAs that don't have mmapped IPRs, avoids having to encode what to do to communicate from the TLB and the mmapped IPR functions, and gets rid of another global ISA interface function and header files. Jira Issue: https://gem5.atlassian.net/browse/GEM5-187 Change-Id: I772c2ae2ca3830a4486919ce9804560c0f2d596a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23188 Reviewed-by: Matthew Poremba <matthew.poremba@amd.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -46,7 +46,6 @@
|
||||
#include <csignal>
|
||||
#include <ostream>
|
||||
|
||||
#include "arch/mmapped_ipr.hh"
|
||||
#include "arch/utility.hh"
|
||||
#include "debug/Checkpoint.hh"
|
||||
#include "debug/Drain.hh"
|
||||
@@ -1128,13 +1127,11 @@ BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write)
|
||||
PacketPtr pkt = new Packet(mmio_req, cmd);
|
||||
pkt->dataStatic(data);
|
||||
|
||||
if (mmio_req->isMmappedIpr()) {
|
||||
if (mmio_req->isLocalAccess()) {
|
||||
// We currently assume that there is no need to migrate to a
|
||||
// different event queue when doing IPRs. Currently, IPRs are
|
||||
// only used for m5ops, so it should be a valid assumption.
|
||||
const Cycles ipr_delay(write ?
|
||||
TheISA::handleIprWrite(tc, pkt) :
|
||||
TheISA::handleIprRead(tc, pkt));
|
||||
// different event queue when doing local accesses. Currently, they
|
||||
// are only used for m5ops, so it should be a valid assumption.
|
||||
const Cycles ipr_delay = mmio_req->localAccessor(tc, pkt);
|
||||
threadContextDirty = true;
|
||||
delete pkt;
|
||||
return clockPeriod() * ipr_delay;
|
||||
|
||||
Reference in New Issue
Block a user