summaryrefslogtreecommitdiff
path: root/src/arch/arm/table_walker.cc
diff options
context:
space:
mode:
authorDylan Johnson <Dylan.Johnson@ARM.com>2016-08-02 10:38:02 +0100
committerDylan Johnson <Dylan.Johnson@ARM.com>2016-08-02 10:38:02 +0100
commit996c1ed33c251f80ebdfd972477709f95bdcbe65 (patch)
treef8bc3a721badae2896a9fe2f31bdf191e8b6dd86 /src/arch/arm/table_walker.cc
parenteac27759e77edfcb772021be714469f43f2e3b46 (diff)
downloadgem5-996c1ed33c251f80ebdfd972477709f95bdcbe65.tar.xz
arm: Fix stage 2 determination in table walker
We recompute if we are doing a stage 2 walk inside of the table walker but we have already figured it out in the tlb. Pass the information in to the walk instead of recomputing it. Change-Id: I39637ce99309b2ddbc30344d45ac9ebf6a203401
Diffstat (limited to 'src/arch/arm/table_walker.cc')
-rw-r--r--src/arch/arm/table_walker.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/arm/table_walker.cc b/src/arch/arm/table_walker.cc
index f1a7ca250..1c1f70599 100644
--- a/src/arch/arm/table_walker.cc
+++ b/src/arch/arm/table_walker.cc
@@ -181,7 +181,8 @@ Fault
TableWalker::walk(RequestPtr _req, ThreadContext *_tc, uint16_t _asid,
uint8_t _vmid, bool _isHyp, TLB::Mode _mode,
TLB::Translation *_trans, bool _timing, bool _functional,
- bool secure, TLB::ArmTranslationType tranType)
+ bool secure, TLB::ArmTranslationType tranType,
+ bool _stage2Req)
{
assert(!(_functional && _timing));
++statWalks;
@@ -292,9 +293,9 @@ TableWalker::walk(RequestPtr _req, ThreadContext *_tc, uint16_t _asid,
// We only do a second stage of translation if we're not secure, or in
// hyp mode, the second stage MMU is enabled, and this table walker
// instance is the first stage.
+ // TODO: fix setting of doingStage2 for timing mode
currState->doingStage2 = false;
- currState->stage2Req = currState->hcr.vm && !isStage2 &&
- !currState->isSecure && !currState->isHyp;
+ currState->stage2Req = _stage2Req && !isStage2;
bool long_desc_format = currState->aarch64 || _isHyp || isStage2 ||
longDescFormatInUse(currState->tc);