table_walker.cc (11579:6b8a05582dc7) table_walker.cc (11580:afe051c345e9)
1/*
2 * Copyright (c) 2010, 2012-2016 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 167 unchanged lines hidden (view full) ---

176 pendingChange();
177 }
178}
179
180Fault
181TableWalker::walk(RequestPtr _req, ThreadContext *_tc, uint16_t _asid,
182 uint8_t _vmid, bool _isHyp, TLB::Mode _mode,
183 TLB::Translation *_trans, bool _timing, bool _functional,
1/*
2 * Copyright (c) 2010, 2012-2016 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 167 unchanged lines hidden (view full) ---

176 pendingChange();
177 }
178}
179
180Fault
181TableWalker::walk(RequestPtr _req, ThreadContext *_tc, uint16_t _asid,
182 uint8_t _vmid, bool _isHyp, TLB::Mode _mode,
183 TLB::Translation *_trans, bool _timing, bool _functional,
184 bool secure, TLB::ArmTranslationType tranType)
184 bool secure, TLB::ArmTranslationType tranType,
185 bool _stage2Req)
185{
186 assert(!(_functional && _timing));
187 ++statWalks;
188
189 WalkerState *savedCurrState = NULL;
190
191 if (!currState && !_functional) {
192 // For atomic mode, a new WalkerState instance should be only created

--- 94 unchanged lines hidden (view full) ---

287 currState->isFetch = (currState->mode == TLB::Execute);
288 currState->isWrite = (currState->mode == TLB::Write);
289
290 statRequestOrigin[REQUESTED][currState->isFetch]++;
291
292 // We only do a second stage of translation if we're not secure, or in
293 // hyp mode, the second stage MMU is enabled, and this table walker
294 // instance is the first stage.
186{
187 assert(!(_functional && _timing));
188 ++statWalks;
189
190 WalkerState *savedCurrState = NULL;
191
192 if (!currState && !_functional) {
193 // For atomic mode, a new WalkerState instance should be only created

--- 94 unchanged lines hidden (view full) ---

288 currState->isFetch = (currState->mode == TLB::Execute);
289 currState->isWrite = (currState->mode == TLB::Write);
290
291 statRequestOrigin[REQUESTED][currState->isFetch]++;
292
293 // We only do a second stage of translation if we're not secure, or in
294 // hyp mode, the second stage MMU is enabled, and this table walker
295 // instance is the first stage.
296 // TODO: fix setting of doingStage2 for timing mode
295 currState->doingStage2 = false;
297 currState->doingStage2 = false;
296 currState->stage2Req = currState->hcr.vm && !isStage2 &&
297 !currState->isSecure && !currState->isHyp;
298 currState->stage2Req = _stage2Req && !isStage2;
298
299 bool long_desc_format = currState->aarch64 || _isHyp || isStage2 ||
300 longDescFormatInUse(currState->tc);
301
302 if (long_desc_format) {
303 // Helper variables used for hierarchical permissions
304 currState->secureLookup = currState->isSecure;
305 currState->rwTable = true;

--- 1936 unchanged lines hidden ---
299
300 bool long_desc_format = currState->aarch64 || _isHyp || isStage2 ||
301 longDescFormatInUse(currState->tc);
302
303 if (long_desc_format) {
304 // Helper variables used for hierarchical permissions
305 currState->secureLookup = currState->isSecure;
306 currState->rwTable = true;

--- 1936 unchanged lines hidden ---