mem-cache: Support for page crossing prefetches

Prefetchers can now issue hardware prefetch requests that go beyond
the boundaries of the system page. Page crossing references will need
to look up the TLBs to be able to compute the physical address to be
prefetched.

Change-Id: Ib56374097e3b7dc87414139d210ea9272f96b06b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/14620
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
Javier Bueno
2018-11-27 16:15:53 +01:00
committed by Javier Bueno Hedo
parent e2e26d3dc9
commit 151b22cddb
5 changed files with 388 additions and 112 deletions

View File

@@ -96,7 +96,7 @@ BasePrefetcher::BasePrefetcher(const BasePrefetcherParams *p)
masterId(p->sys->getMasterId(this)), pageBytes(p->sys->getPageBytes()),
prefetchOnAccess(p->prefetch_on_access),
useVirtualAddresses(p->use_virtual_addresses), issuedPrefetches(0),
usefulPrefetches(0)
usefulPrefetches(0), tlb(nullptr)
{
}
@@ -254,3 +254,10 @@ BasePrefetcher::addEventProbe(SimObject *obj, const char *name)
ProbeManager *pm(obj->getProbeManager());
listeners.push_back(new PrefetchListener(*this, pm, name));
}
void
BasePrefetcher::addTLB(BaseTLB *t)
{
fatal_if(tlb != nullptr, "Only one TLB can be registered");
tlb = t;
}