gem5  v20.1.0.0
tlb.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2013, 2016, 2019 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
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2001-2005 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
41 #ifndef __ARCH_ARM_TLB_HH__
42 #define __ARCH_ARM_TLB_HH__
43 
44 
45 #include "arch/arm/faults.hh"
46 #include "arch/arm/isa_traits.hh"
47 #include "arch/arm/pagetable.hh"
48 #include "arch/arm/utility.hh"
49 #include "arch/generic/tlb.hh"
50 #include "base/statistics.hh"
51 #include "mem/request.hh"
52 #include "params/ArmTLB.hh"
53 #include "sim/probe/pmu.hh"
54 
55 class ThreadContext;
56 
57 namespace ArmISA {
58 
59 class TableWalker;
60 class Stage2LookUp;
61 class Stage2MMU;
62 class TLB;
63 
65 {
66  public:
68  virtual ~TlbTestInterface() {}
69 
78  virtual Fault translationCheck(const RequestPtr &req, bool is_priv,
81 
94  virtual Fault walkCheck(Addr pa, Addr size, Addr va, bool is_secure,
95  Addr is_priv, BaseTLB::Mode mode,
97  LookupLevel lookup_level) = 0;
98 };
99 
100 class TLB : public BaseTLB
101 {
102  public:
103  enum ArmFlags {
105 
106  AlignByte = 0x0,
108  AlignWord = 0x2,
112 
114  // Priv code operating as if it wasn't
115  UserMode = 0x10
116  };
117 
120  S1CTran = 0x1,
121  HypMode = 0x2,
122  // Secure code operating as if it wasn't (required by some Address
123  // Translate operations)
124  S1S2NsTran = 0x4,
125  // Address translation instructions (eg AT S1E0R_Xt) need to be handled
126  // in special ways during translation because they could need to act
127  // like a different EL than the current EL. The following flags are
128  // for these instructions
129  S1E0Tran = 0x8,
130  S1E1Tran = 0x10,
131  S1E2Tran = 0x20,
132  S1E3Tran = 0x40,
133  S12E0Tran = 0x80,
134  S12E1Tran = 0x100
135  };
136 
143 
144  protected:
145  TlbEntry* table; // the Page Table
146  int size; // TLB Size
147  bool isStage2; // Indicates this TLB is part of the second stage MMU
148  bool stage2Req; // Indicates whether a stage 2 lookup is also required
149  // Indicates whether a stage 2 lookup of the table descriptors is required.
150  // Certain address translation instructions will intercept the IPA but the
151  // table descriptors still need to be translated by the stage2.
153  uint64_t _attr; // Memory attributes for last accessed TLB entry
154  bool directToStage2; // Indicates whether all translation requests should
155  // be routed directly to the stage 2 TLB
156 
160 
162 
163  struct TlbStats : public Stats::Group
164  {
165  TlbStats(Stats::Group *parent);
166  // Access Stats
183 
190  } stats;
191 
194 
195  int rangeMRU; //On lookup, only move entries ahead when outside rangeMRU
196 
197  public:
198  TLB(const ArmTLBParams *p);
199  TLB(const Params *p, int _size, TableWalker *_walker);
200 
211  TlbEntry *lookup(Addr vpn, uint16_t asn, uint8_t vmid, bool hyp,
212  bool secure, bool functional,
213  bool ignore_asn, ExceptionLevel target_el,
214  bool in_host);
215 
216  virtual ~TLB();
217 
218  void takeOverFrom(BaseTLB *otlb) override;
219 
221  void init() override;
222 
224 
226 
227  void setMMU(Stage2MMU *m, RequestorID requestor_id);
228 
229  int getsize() const { return size; }
230 
231  void insert(Addr vaddr, TlbEntry &pte);
232 
233  Fault getTE(TlbEntry **te, const RequestPtr &req,
234  ThreadContext *tc, Mode mode,
235  Translation *translation, bool timing, bool functional,
236  bool is_secure, ArmTranslationType tranType);
237 
238  Fault getResultTe(TlbEntry **te, const RequestPtr &req,
239  ThreadContext *tc, Mode mode,
240  Translation *translation, bool timing,
241  bool functional, TlbEntry *mergeTe);
242 
245  ThreadContext *tc);
246  bool checkPAN(ThreadContext *tc, uint8_t ap, const RequestPtr &req,
247  Mode mode);
248 
249 
253  void flushAllSecurity(bool secure_lookup, ExceptionLevel target_el,
254  bool ignore_el = false, bool in_host = false);
255 
259  void flushAllNs(ExceptionLevel target_el, bool ignore_el = false);
260 
261 
265  void flushAll() override
266  {
267  flushAllSecurity(false, EL0, true, false);
268  flushAllSecurity(true, EL0, true, false);
269  }
270 
276  void flushMvaAsid(Addr mva, uint64_t asn, bool secure_lookup,
277  ExceptionLevel target_el, bool in_host = false);
278 
283  void flushAsid(uint64_t asn, bool secure_lookup,
284  ExceptionLevel target_el, bool in_host = false);
285 
290  void flushMva(Addr mva, bool secure_lookup, ExceptionLevel target_el,
291  bool in_host = false);
292 
299  void flushIpaVmid(Addr ipa, bool secure_lookup, ExceptionLevel target_el);
300 
301  Fault trickBoxCheck(const RequestPtr &req, Mode mode,
303 
304  Fault walkTrickBoxCheck(Addr pa, bool is_secure, Addr va, Addr sz,
305  bool is_exec, bool is_write,
307  LookupLevel lookup_level);
308 
309  void printTlb() const;
310 
311  void demapPage(Addr vaddr, uint64_t asn) override
312  {
313  // needed for x86 only
314  panic("demapPage() is not implemented.\n");
315  }
316 
325  bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr);
326 
332  Mode mode, ArmTranslationType tranType);
333  Fault
335  ThreadContext *tc, Mode mode) override
336  {
337  return translateFunctional(req, tc, mode, NormalTran);
338  }
339 
342  void
343  setAttr(uint64_t attr)
344  {
345  _attr = attr;
346  }
347 
348  uint64_t
349  getAttr() const
350  {
351  return _attr;
352  }
353 
355  TLB::ArmTranslationType tranType, Addr vaddr, bool long_desc_format);
357  Translation *translation, bool &delay, bool timing, bool functional,
358  Addr vaddr, ArmFault::TranMethod tranMethod);
359 
361  Translation *translation, bool &delay,
362  bool timing, ArmTranslationType tranType, bool functional = false);
364  Translation *translation, bool &delay, bool timing);
366  ArmTranslationType tranType);
367  Fault
369  ThreadContext *tc, Mode mode) override
370  {
371  return translateAtomic(req, tc, mode, NormalTran);
372  }
373  void translateTiming(
374  const RequestPtr &req, ThreadContext *tc,
375  Translation *translation, Mode mode,
376  ArmTranslationType tranType);
377  void
379  Translation *translation, Mode mode) override
380  {
381  translateTiming(req, tc, translation, mode, NormalTran);
382  }
384  Translation *translation, Mode mode, ArmTranslationType tranType,
385  bool callFromS2);
387  const RequestPtr &req,
388  ThreadContext *tc, Mode mode) const override;
389 
390  void drainResume() override;
391 
392  void regProbePoints() override;
393 
404  Port *getTableWalkerPort() override;
405 
406  // Caching misc register values here.
407  // Writing to misc registers needs to invalidate them.
408  // translateFunctional/translateSe/translateFs checks if they are
409  // invalid and call updateMiscReg if necessary.
410 protected:
411  CPSR cpsr;
412  bool aarch64;
414  SCTLR sctlr;
415  SCR scr;
416  bool isPriv;
417  bool isSecure;
418  bool isHyp;
419  TTBCR ttbcr;
420  uint16_t asid;
421  uint8_t vmid;
422  PRRR prrr;
423  NMRR nmrr;
424  HCR hcr;
425  uint32_t dacr;
429 
430  // Cached copies of system-level properties
431  bool haveLPAE;
434 
436 
437  void updateMiscReg(ThreadContext *tc,
438  ArmTranslationType tranType = NormalTran);
439 
440 public:
441  const Params *
442  params() const
443  {
444  return dynamic_cast<const Params *>(_params);
445  }
446  inline void invalidateMiscReg() { miscRegValid = false; }
447 
448 private:
456  void _flushMva(Addr mva, uint64_t asn, bool secure_lookup,
457  bool ignore_asn, ExceptionLevel target_el,
458  bool in_host);
459 
460  public: /* Testing */
463  Fault testWalk(Addr pa, Addr size, Addr va, bool is_secure, Mode mode,
465  LookupLevel lookup_level);
466 };
467 
468 template<typename T>
469 TLB *
470 getITBPtr(T *tc)
471 {
472  auto tlb = static_cast<TLB *>(tc->getITBPtr());
473  assert(tlb);
474  return tlb;
475 }
476 
477 template<typename T>
478 TLB *
479 getDTBPtr(T *tc)
480 {
481  auto tlb = static_cast<TLB *>(tc->getDTBPtr());
482  assert(tlb);
483  return tlb;
484 }
485 
486 } // namespace ArmISA
487 
488 #endif // __ARCH_ARM_TLB_HH__
ArmISA::TLB::flushIpaVmid
void flushIpaVmid(Addr ipa, bool secure_lookup, ExceptionLevel target_el)
Invalidate all entries in the stage 2 TLB that match the given ipa and the current VMID.
Definition: tlb.cc:379
ArmISA::TLB::translateTiming
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override
Definition: tlb.hh:378
ArmISA::TLB::TlbStats::accesses
Stats::Formula accesses
Definition: tlb.hh:189
ArmISA::TLB::flushAllSecurity
void flushAllSecurity(bool secure_lookup, ExceptionLevel target_el, bool ignore_el=false, bool in_host=false)
Reset the entire TLB.
Definition: tlb.cc:248
ArmISA::LookupLevel
LookupLevel
Definition: pagetable.hh:72
ArmISA::TLB::AlignWord
@ AlignWord
Definition: tlb.hh:108
ArmISA::TLB::TlbStats::instMisses
Stats::Scalar instMisses
Definition: tlb.hh:168
SimObject::Params
SimObjectParams Params
Definition: sim_object.hh:113
ArmISA::TLB::ttbcr
TTBCR ttbcr
Definition: tlb.hh:419
ArmISA::TLB::setTestInterface
void setTestInterface(SimObject *ti)
Definition: tlb.cc:1606
ArmISA::TLB::UserMode
@ UserMode
Definition: tlb.hh:115
ArmISA::TLB::TlbStats
Definition: tlb.hh:163
MipsISA::ti
Bitfield< 30 > ti
Definition: pra_constants.hh:176
ArmISA::TLB::isStage2
bool isStage2
Definition: tlb.hh:147
ArmISA::TLB::translateFs
Fault translateFs(const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing, ArmTranslationType tranType, bool functional=false)
Definition: tlb.cc:1081
ArmISA::TLB::lookup
TlbEntry * lookup(Addr vpn, uint16_t asn, uint8_t vmid, bool hyp, bool secure, bool functional, bool ignore_asn, ExceptionLevel target_el, bool in_host)
Lookup an entry in the TLB.
Definition: tlb.cc:159
ArmISA::TLB::translateSe
Fault translateSe(const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing)
Definition: tlb.cc:457
ArmISA::TLB::translateMmuOn
Fault translateMmuOn(ThreadContext *tc, const RequestPtr &req, Mode mode, Translation *translation, bool &delay, bool timing, bool functional, Addr vaddr, ArmFault::TranMethod tranMethod)
Definition: tlb.cc:1009
ArmISA::TLB::ArmTranslationType
ArmTranslationType
Definition: tlb.hh:118
ArmISA::TLB::params
const Params * params() const
Definition: tlb.hh:442
ArmISA::TLB::printTlb
void printTlb() const
Definition: tlb.cc:234
ArmISA::EL0
@ EL0
Definition: types.hh:622
ArmISA::TLB::finalizePhysical
Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, Mode mode) const override
Do post-translation physical address finalization.
Definition: tlb.cc:135
ArmISA::TLB::demapPage
void demapPage(Addr vaddr, uint64_t asn) override
Definition: tlb.hh:311
ArmISA::TLB::TlbStats::prefetchFaults
Stats::Scalar prefetchFaults
Definition: tlb.hh:180
ArmISA::TLB::TlbStats::flushTlbAsid
Stats::Scalar flushTlbAsid
Definition: tlb.hh:177
ArmISA::TLB::TlbStats::domainFaults
Stats::Scalar domainFaults
Definition: tlb.hh:181
pagetable.hh
ArmISA::TlbTestInterface::TlbTestInterface
TlbTestInterface()
Definition: tlb.hh:67
ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
ArmISA::TLB::size
int size
Definition: tlb.hh:146
ArmISA::TlbTestInterface
Definition: tlb.hh:64
ArmISA::TLB::TlbStats::flushTlb
Stats::Scalar flushTlb
Definition: tlb.hh:174
ArmISA::te
Bitfield< 30 > te
Definition: miscregs_types.hh:334
type
uint8_t type
Definition: inet.hh:421
tlb.hh
BaseTLB::Mode
Mode
Definition: tlb.hh:57
ArmISA::TLB::TlbStats::readAccesses
Stats::Formula readAccesses
Definition: tlb.hh:184
ArmISA::TLB::sctlr
SCTLR sctlr
Definition: tlb.hh:414
ArmISA::TLB::TlbStats::writeMisses
Stats::Scalar writeMisses
Definition: tlb.hh:172
ArmISA::TLB::HypMode
@ HypMode
Definition: tlb.hh:121
ArmISA::TLB::setAttr
void setAttr(uint64_t attr)
Accessor functions for memory attributes for last accessed TLB entry.
Definition: tlb.hh:343
ArmISA::TLB::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: tlb.cc:386
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:82
ArmISA::TLB::stats
ArmISA::TLB::TlbStats stats
ArmISA::TLB::AlignDoubleWord
@ AlignDoubleWord
Definition: tlb.hh:109
ArmISA::TLB::getAttr
uint64_t getAttr() const
Definition: tlb.hh:349
ArmISA::TlbTestInterface::walkCheck
virtual Fault walkCheck(Addr pa, Addr size, Addr va, bool is_secure, Addr is_priv, BaseTLB::Mode mode, TlbEntry::DomainType domain, LookupLevel lookup_level)=0
Check if a page table walker access should be forced to fail.
ArmISA::TLB::table
TlbEntry * table
Definition: tlb.hh:145
ArmISA::TLB::S1S2NsTran
@ S1S2NsTran
Definition: tlb.hh:124
ArmISA::TLB::TlbStats::flushTlbMva
Stats::Scalar flushTlbMva
Definition: tlb.hh:175
ArmISA::TLB::TlbStats::permsFaults
Stats::Scalar permsFaults
Definition: tlb.hh:182
ArmISA::TLB::nmrr
NMRR nmrr
Definition: tlb.hh:423
ArmISA::TLB::haveVirtualization
bool haveVirtualization
Definition: tlb.hh:432
ArmISA::Stage2MMU
Definition: stage2_mmu.hh:50
ArmISA::TLB::TlbStats::readMisses
Stats::Scalar readMisses
Definition: tlb.hh:170
ArmISA
Definition: ccregs.hh:41
ArmISA::TLB::AlignByte
@ AlignByte
Definition: tlb.hh:106
ArmISA::TLB::stage2DescReq
bool stage2DescReq
Definition: tlb.hh:152
request.hh
BaseTLB
Definition: tlb.hh:50
ArmISA::TLB::TlbStats::instAccesses
Stats::Formula instAccesses
Definition: tlb.hh:186
ArmISA::TLB::miscRegContext
ContextID miscRegContext
Definition: tlb.hh:427
ArmISA::TLB::stage2Req
bool stage2Req
Definition: tlb.hh:148
ArmISA::TLB::_flushMva
void _flushMva(Addr mva, uint64_t asn, bool secure_lookup, bool ignore_asn, ExceptionLevel target_el, bool in_host)
Remove any entries that match both a va and asn.
Definition: tlb.cc:356
pmu.hh
ArmISA::TLB::translateMmuOff
Fault translateMmuOff(ThreadContext *tc, const RequestPtr &req, Mode mode, TLB::ArmTranslationType tranType, Addr vaddr, bool long_desc_format)
Definition: tlb.cc:937
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
ArmISA::TLB::_attr
uint64_t _attr
Definition: tlb.hh:153
RequestorID
uint16_t RequestorID
Definition: request.hh:85
ArmISA::TLB::checkPermissions64
Fault checkPermissions64(TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc)
Definition: tlb.cc:675
ArmISA::TLB::S1CTran
@ S1CTran
Definition: tlb.hh:120
ArmISA::TLB::regProbePoints
void regProbePoints() override
Register probe points for this object.
Definition: tlb.cc:451
ArmISA::TLB::curTranType
ArmTranslationType curTranType
Definition: tlb.hh:428
ArmISA::TLB::S12E0Tran
@ S12E0Tran
Definition: tlb.hh:133
ArmISA::TLB::TlbStats::TlbStats
TlbStats(Stats::Group *parent)
Definition: tlb.cc:417
ArmISA::TLB::stage2Tlb
TLB * stage2Tlb
Definition: tlb.hh:158
ArmISA::TLB::AllowUnaligned
@ AllowUnaligned
Definition: tlb.hh:113
ArmISA::TLB::TlbStats::writeHits
Stats::Scalar writeHits
Definition: tlb.hh:171
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
ArmISA::TLB::~TLB
virtual ~TLB()
Definition: tlb.cc:97
AddrRange
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:68
ArmISA::TLB::translateFunctional
Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode) override
Definition: tlb.hh:334
ArmISA::TLB::S1E2Tran
@ S1E2Tran
Definition: tlb.hh:131
ArmISA::TLB::TlbStats::inserts
Stats::Scalar inserts
Definition: tlb.hh:173
ArmISA::TLB::test
TlbTestInterface * test
Definition: tlb.hh:161
ArmISA::TLB::aarch64EL
ExceptionLevel aarch64EL
Definition: tlb.hh:413
ArmISA::ExceptionLevel
ExceptionLevel
Definition: types.hh:621
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
ArmISA::TLB::TlbStats::hits
Stats::Formula hits
Definition: tlb.hh:187
MipsISA::vaddr
vaddr
Definition: pra_constants.hh:275
ArmISA::TLB::flushMva
void flushMva(Addr mva, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
Remove all entries that match the va regardless of asn.
Definition: tlb.cc:346
statistics.hh
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
ArmISA::TLB::AlignHalfWord
@ AlignHalfWord
Definition: tlb.hh:107
ArmISA::TLB::getsize
int getsize() const
Definition: tlb.hh:229
ArmISA::TLB::getTableWalker
TableWalker * getTableWalker()
Definition: tlb.hh:225
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
ArmISA::TLB::isSecure
bool isSecure
Definition: tlb.hh:417
ArmISA::TLB::S1E0Tran
@ S1E0Tran
Definition: tlb.hh:129
ArmISA::TLB::isHyp
bool isHyp
Definition: tlb.hh:418
ArmISA::getDTBPtr
TLB * getDTBPtr(T *tc)
Definition: tlb.hh:479
ArmISA::attr
attr
Definition: miscregs_types.hh:649
ArmISA::TLB::AlignmentMask
@ AlignmentMask
Definition: tlb.hh:104
BaseTLB::Translation
Definition: tlb.hh:59
ArmISA::TLB::checkPermissions
Fault checkPermissions(TlbEntry *te, const RequestPtr &req, Mode mode)
Definition: tlb.cc:497
ArmISA::TLB::ArmFlags
ArmFlags
Definition: tlb.hh:103
ArmISA::TLB::tranTypeEL
static ExceptionLevel tranTypeEL(CPSR cpsr, ArmTranslationType type)
Determine the EL to use for the purpose of a translation given a specific translation type.
Definition: tlb.cc:1434
ArmISA::TLB::rangeMRU
int rangeMRU
Definition: tlb.hh:195
ArmISA::TLB::TlbStats::flushedEntries
Stats::Scalar flushedEntries
Definition: tlb.hh:178
ArmISA::TLB::invalidateMiscReg
void invalidateMiscReg()
Definition: tlb.hh:446
ArmISA::TLB::vmid
uint8_t vmid
Definition: tlb.hh:421
ArmISA::TLB::flushAll
void flushAll() override
Reset the entire TLB.
Definition: tlb.hh:265
faults.hh
ArmISA::TLB::haveLargeAsid64
bool haveLargeAsid64
Definition: tlb.hh:433
ArmISA::TLB::checkPAN
bool checkPAN(ThreadContext *tc, uint8_t ap, const RequestPtr &req, Mode mode)
Definition: tlb.cc:917
ArmISA::TLB::testWalk
Fault testWalk(Addr pa, Addr size, Addr va, bool is_secure, Mode mode, TlbEntry::DomainType domain, LookupLevel lookup_level)
Definition: tlb.cc:1630
ArmISA::TLB::scr
SCR scr
Definition: tlb.hh:415
ArmISA::TlbTestInterface::~TlbTestInterface
virtual ~TlbTestInterface()
Definition: tlb.hh:68
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
ArmISA::TLB::tableWalker
TableWalker * tableWalker
Definition: tlb.hh:157
ArmISA::TLB::dacr
uint32_t dacr
Definition: tlb.hh:425
ArmISA::TLB::miscRegValid
bool miscRegValid
Definition: tlb.hh:426
ArmISA::TLB::flushAsid
void flushAsid(uint64_t asn, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
Remove any entries that match the asn.
Definition: tlb.cc:321
ArmISA::TLB::prrr
PRRR prrr
Definition: tlb.hh:422
ArmISA::TLB::trickBoxCheck
Fault trickBoxCheck(const RequestPtr &req, Mode mode, TlbEntry::DomainType domain)
utility.hh
ProbePoints::PMUUPtr
std::unique_ptr< PMU > PMUUPtr
Definition: pmu.hh:56
ArmISA::TLB::updateMiscReg
void updateMiscReg(ThreadContext *tc, ArmTranslationType tranType=NormalTran)
Definition: tlb.cc:1258
ArmISA::TLB::flushMvaAsid
void flushMvaAsid(Addr mva, uint64_t asn, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
Remove any entries that match both a va and asn.
Definition: tlb.cc:310
ArmISA::TLB::translateAtomic
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) override
Definition: tlb.hh:368
ArmISA::TLB::aarch64
bool aarch64
Definition: tlb.hh:412
ArmISA::TLB::isPriv
bool isPriv
Definition: tlb.hh:416
ArmISA::TLB
Definition: tlb.hh:100
ArmISA::TLB::stage2Mmu
Stage2MMU * stage2Mmu
Definition: tlb.hh:159
ArmISA::TLB::haveLPAE
bool haveLPAE
Definition: tlb.hh:431
ArmISA::TlbEntry::DomainType
DomainType
Definition: pagetable.hh:90
ArmISA::getITBPtr
TLB * getITBPtr(T *tc)
Definition: tlb.hh:470
ArmISA::TlbEntry
Definition: pagetable.hh:81
ArmISA::TLB::asid
uint16_t asid
Definition: tlb.hh:420
ArmISA::TLB::walkTrickBoxCheck
Fault walkTrickBoxCheck(Addr pa, bool is_secure, Addr va, Addr sz, bool is_exec, bool is_write, TlbEntry::DomainType domain, LookupLevel lookup_level)
ArmISA::TLB::S1E1Tran
@ S1E1Tran
Definition: tlb.hh:130
ArmISA::TLB::flushAllNs
void flushAllNs(ExceptionLevel target_el, bool ignore_el=false)
Remove all entries in the non secure world, depending on whether they were allocated in hyp mode or n...
Definition: tlb.cc:279
ArmISA::TLB::cpsr
CPSR cpsr
Definition: tlb.hh:411
ArmISA::TLB::init
void init() override
setup all the back pointers
Definition: tlb.cc:103
SimObject::_params
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
ArmISA::domain
Bitfield< 7, 4 > domain
Definition: miscregs_types.hh:418
ArmISA::TLB::ppRefills
ProbePoints::PMUUPtr ppRefills
PMU probe for TLB refills.
Definition: tlb.hh:193
ArmISA::TLB::takeOverFrom
void takeOverFrom(BaseTLB *otlb) override
Take over from an old tlb context.
Definition: tlb.cc:394
ArmISA::ArmFault::TranMethod
TranMethod
Definition: faults.hh:146
Stats::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3037
Stats::Group
Statistics container.
Definition: group.hh:83
ArmISA::TLB::TlbStats::readHits
Stats::Scalar readHits
Definition: tlb.hh:169
isa_traits.hh
ArmISA::TLB::directToStage2
bool directToStage2
Definition: tlb.hh:154
ArmISA::TableWalker
Definition: table_walker.hh:61
ArmISA::TLB::translateAtomic
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode, ArmTranslationType tranType)
Definition: tlb.cc:1163
ArmISA::TLB::getTableWalkerPort
Port * getTableWalkerPort() override
Get the table walker port.
Definition: tlb.cc:1252
ArmISA::TLB::testTranslation
Fault testTranslation(const RequestPtr &req, Mode mode, TlbEntry::DomainType domain)
Definition: tlb.cc:1618
ArmISA::pa
Bitfield< 39, 12 > pa
Definition: miscregs_types.hh:650
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
ArmISA::TLB::getTE
Fault getTE(TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, bool is_secure, ArmTranslationType tranType)
Definition: tlb.cc:1463
ArmISA::TLB::S1E3Tran
@ S1E3Tran
Definition: tlb.hh:132
ArmISA::TLB::getResultTe
Fault getResultTe(TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, TlbEntry *mergeTe)
Definition: tlb.cc:1533
ArmISA::TLB::setMMU
void setMMU(Stage2MMU *m, RequestorID requestor_id)
Definition: tlb.cc:110
ArmISA::TLB::TlbStats::instHits
Stats::Scalar instHits
Definition: tlb.hh:167
ArmISA::TLB::TLB
TLB(const ArmTLBParams *p)
Definition: tlb.cc:75
ArmISA::TLB::AlignOctWord
@ AlignOctWord
Definition: tlb.hh:111
ArmISA::TLB::TlbStats::alignFaults
Stats::Scalar alignFaults
Definition: tlb.hh:179
ArmISA::TLB::m5opRange
AddrRange m5opRange
Definition: tlb.hh:435
ArmISA::tlb
Bitfield< 59, 56 > tlb
Definition: miscregs_types.hh:88
ArmISA::TLB::S12E1Tran
@ S12E1Tran
Definition: tlb.hh:134
ArmISA::TLB::TlbStats::flushTlbMvaAsid
Stats::Scalar flushTlbMvaAsid
Definition: tlb.hh:176
ArmISA::TlbTestInterface::translationCheck
virtual Fault translationCheck(const RequestPtr &req, bool is_priv, BaseTLB::Mode mode, TlbEntry::DomainType domain)=0
Check if a TLB translation should be forced to fail.
ArmISA::TLB::translateFunctional
bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr)
Do a functional lookup on the TLB (for debugging) and don't modify any internal state.
Definition: tlb.cc:117
ArmISA::TLB::translateComplete
Fault translateComplete(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType, bool callFromS2)
Definition: tlb.cc:1222
ArmISA::TLB::translateTiming
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType)
Definition: tlb.cc:1205
ArmISA::TLB::TlbStats::writeAccesses
Stats::Formula writeAccesses
Definition: tlb.hh:185
ArmISA::va
Bitfield< 8 > va
Definition: miscregs_types.hh:272
ArmISA::m
Bitfield< 0 > m
Definition: miscregs_types.hh:389
ArmISA::TLB::NormalTran
@ NormalTran
Definition: tlb.hh:119
ArmISA::TLB::AlignQuadWord
@ AlignQuadWord
Definition: tlb.hh:110
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
ArmISA::TLB::hcr
HCR hcr
Definition: tlb.hh:424
ArmISA::TLB::TlbStats::misses
Stats::Formula misses
Definition: tlb.hh:188
ArmISA::TLB::insert
void insert(Addr vaddr, TlbEntry &pte)
Definition: tlb.cc:204
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:92

Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17