diff options
author | Gabe Black <gabeblack@google.com> | 2019-10-15 21:22:35 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-10-17 23:10:37 +0000 |
commit | 066349d784b6709df5994857b8f35c37fda7c564 (patch) | |
tree | f373220fad542e264e68fab8fb0249872d6082cc /src | |
parent | 3c642b1c5c95f9c8bae4994ae44ff2a12662f488 (diff) | |
download | gem5-066349d784b6709df5994857b8f35c37fda7c564.tar.xz |
arm: Don't force the ArmISA::TLB in vtophys.cc.
The only reason the TLB pointer is being cast to an ArmISA::TLB is so
that it can call a version of translateFunctional which takes more
arguments, when the standard version of translateFunctional just calls
that underlying function with the same arguments.
Change-Id: I3ffd3a8ecc2dda91ddca77f516e2b2ac7313a227
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21840
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/vtophys.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/arm/vtophys.cc b/src/arch/arm/vtophys.cc index 3a6731541..4b100f4e2 100644 --- a/src/arch/arm/vtophys.cc +++ b/src/arch/arm/vtophys.cc @@ -71,7 +71,7 @@ try_translate(ThreadContext *tc, Addr addr) // Set up a functional memory Request to pass to the TLB // to get it to translate the vaddr to a paddr auto req = std::make_shared<Request>(0, addr, 64, 0x40, -1, 0, 0); - ArmISA::TLB *tlb; + BaseTLB *tlb; // Check the TLBs for a translation // It's possible that there is a valid translation in the tlb @@ -80,13 +80,13 @@ try_translate(ThreadContext *tc, Addr addr) // // Calling translateFunctional invokes a table-walk if required // so we should always succeed - tlb = static_cast<ArmISA::TLB*>(tc->getDTBPtr()); - fault = tlb->translateFunctional(req, tc, BaseTLB::Read, TLB::NormalTran); + tlb = tc->getDTBPtr(); + fault = tlb->translateFunctional(req, tc, BaseTLB::Read); if (fault == NoFault) return std::make_pair(true, req->getPaddr()); - tlb = static_cast<ArmISA::TLB*>(tc->getITBPtr()); - fault = tlb->translateFunctional(req, tc, BaseTLB::Read, TLB::NormalTran); + tlb = tc->getITBPtr(); + fault = tlb->translateFunctional(req, tc, BaseTLB::Read); if (fault == NoFault) return std::make_pair(true, req->getPaddr()); |