gem5  v20.1.0.0
table_walker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-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  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef __ARCH_ARM_TABLE_WALKER_HH__
39 #define __ARCH_ARM_TABLE_WALKER_HH__
40 
41 #include <list>
42 
43 #include "arch/arm/faults.hh"
44 #include "arch/arm/miscregs.hh"
45 #include "arch/arm/system.hh"
46 #include "arch/arm/tlb.hh"
47 #include "mem/request.hh"
48 #include "params/ArmTableWalker.hh"
49 #include "sim/clocked_object.hh"
50 #include "sim/eventq.hh"
51 
52 class ThreadContext;
53 
54 class DmaPort;
55 
56 namespace ArmISA {
57 class Translation;
58 class TLB;
59 class Stage2MMU;
60 
61 class TableWalker : public ClockedObject
62 {
63  public:
64  class WalkerState;
65 
67  public:
69 
72 
73  virtual Addr pfn() const = 0;
74  virtual TlbEntry::DomainType domain() const = 0;
75  virtual bool xn() const = 0;
76  virtual uint8_t ap() const = 0;
77  virtual bool global(WalkerState *currState) const = 0;
78  virtual uint8_t offsetBits() const = 0;
79  virtual bool secure(bool have_security, WalkerState *currState) const = 0;
80  virtual std::string dbgHeader() const = 0;
81  virtual uint64_t getRawData() const = 0;
82  virtual uint8_t texcb() const
83  {
84  panic("texcb() not implemented for this class\n");
85  }
86  virtual bool shareable() const
87  {
88  panic("shareable() not implemented for this class\n");
89  }
90  };
91 
92  class L1Descriptor : public DescriptorBase {
93  public:
95  enum EntryType {
100  };
101 
103  uint32_t data;
104 
107  bool _dirty;
108 
110  L1Descriptor() : data(0), _dirty(false)
111  {
112  lookupLevel = L1;
113  }
114 
115  virtual uint64_t getRawData() const
116  {
117  return (data);
118  }
119 
120  virtual std::string dbgHeader() const
121  {
122  return "Inserting Section Descriptor into TLB\n";
123  }
124 
125  virtual uint8_t offsetBits() const
126  {
127  return 20;
128  }
129 
130  EntryType type() const
131  {
132  return (EntryType)(data & 0x3);
133  }
134 
136  bool supersection() const
137  {
138  return bits(data, 18);
139  }
140 
142  Addr paddr() const
143  {
144  if (supersection())
145  panic("Super sections not implemented\n");
146  return mbits(data, 31, 20);
147  }
149  Addr paddr(Addr va) const
150  {
151  if (supersection())
152  panic("Super sections not implemented\n");
153  return mbits(data, 31, 20) | mbits(va, 19, 0);
154  }
155 
156 
158  Addr pfn() const
159  {
160  if (supersection())
161  panic("Super sections not implemented\n");
162  return bits(data, 31, 20);
163  }
164 
167  {
168  return !bits(data, 17);
169  }
170 
172  bool xn() const
173  {
174  return bits(data, 4);
175  }
176 
178  uint8_t ap() const
179  {
180  return (bits(data, 15) << 2) | bits(data, 11, 10);
181  }
182 
185  {
186  return static_cast<TlbEntry::DomainType>(bits(data, 8, 5));
187  }
188 
190  Addr l2Addr() const
191  {
192  return mbits(data, 31, 10);
193  }
194 
200  uint8_t texcb() const
201  {
202  return bits(data, 2) | bits(data, 3) << 1 | bits(data, 14, 12) << 2;
203  }
204 
206  bool shareable() const
207  {
208  return bits(data, 16);
209  }
210 
214  void setAp0()
215  {
216  data |= 1 << 10;
217  _dirty = true;
218  }
219 
221  bool dirty() const
222  {
223  return _dirty;
224  }
225 
230  bool secure(bool have_security, WalkerState *currState) const
231  {
232  if (have_security && currState->secureLookup) {
233  if (type() == PageTable)
234  return !bits(data, 3);
235  else
236  return !bits(data, 19);
237  }
238  return false;
239  }
240  };
241 
243  class L2Descriptor : public DescriptorBase {
244  public:
246  uint32_t data;
248 
251  bool _dirty;
252 
254  L2Descriptor() : data(0), l1Parent(nullptr), _dirty(false)
255  {
256  lookupLevel = L2;
257  }
258 
259  L2Descriptor(L1Descriptor &parent) : data(0), l1Parent(&parent),
260  _dirty(false)
261  {
262  lookupLevel = L2;
263  }
264 
265  virtual uint64_t getRawData() const
266  {
267  return (data);
268  }
269 
270  virtual std::string dbgHeader() const
271  {
272  return "Inserting L2 Descriptor into TLB\n";
273  }
274 
275  virtual TlbEntry::DomainType domain() const
276  {
277  return l1Parent->domain();
278  }
279 
280  bool secure(bool have_security, WalkerState *currState) const
281  {
282  return l1Parent->secure(have_security, currState);
283  }
284 
285  virtual uint8_t offsetBits() const
286  {
287  return large() ? 16 : 12;
288  }
289 
291  bool invalid() const
292  {
293  return bits(data, 1, 0) == 0;
294  }
295 
297  bool large() const
298  {
299  return bits(data, 1) == 0;
300  }
301 
303  bool xn() const
304  {
305  return large() ? bits(data, 15) : bits(data, 0);
306  }
307 
310  {
311  return !bits(data, 11);
312  }
313 
315  uint8_t ap() const
316  {
317  return bits(data, 5, 4) | (bits(data, 9) << 2);
318  }
319 
321  uint8_t texcb() const
322  {
323  return large() ?
324  (bits(data, 2) | (bits(data, 3) << 1) | (bits(data, 14, 12) << 2)) :
325  (bits(data, 2) | (bits(data, 3) << 1) | (bits(data, 8, 6) << 2));
326  }
327 
329  Addr pfn() const
330  {
331  return large() ? bits(data, 31, 16) : bits(data, 31, 12);
332  }
333 
335  Addr paddr(Addr va) const
336  {
337  if (large())
338  return mbits(data, 31, 16) | mbits(va, 15, 0);
339  else
340  return mbits(data, 31, 12) | mbits(va, 11, 0);
341  }
342 
344  bool shareable() const
345  {
346  return bits(data, 10);
347  }
348 
352  void setAp0()
353  {
354  data |= 1 << 4;
355  _dirty = true;
356  }
357 
359  bool dirty() const
360  {
361  return _dirty;
362  }
363 
364  };
365 
366  // Granule sizes for AArch64 long descriptors
367  enum GrainSize {
368  Grain4KB = 12,
369  Grain16KB = 14,
370  Grain64KB = 16,
372  };
373 
376  public:
378  enum EntryType {
383  };
384 
385  LongDescriptor() : data(0), _dirty(false) {}
386 
388  uint64_t data;
389 
392  bool _dirty;
393 
394  virtual uint64_t getRawData() const
395  {
396  return (data);
397  }
398 
399  virtual std::string dbgHeader() const
400  {
401  if (type() == LongDescriptor::Page) {
402  assert(lookupLevel == L3);
403  return "Inserting Page descriptor into TLB\n";
404  } else {
405  assert(lookupLevel < L3);
406  return "Inserting Block descriptor into TLB\n";
407  }
408  }
409 
414  bool secure(bool have_security, WalkerState *currState) const
415  {
416  assert(type() == Block || type() == Page);
417  return have_security && (currState->secureLookup && !bits(data, 5));
418  }
419 
421  bool aarch64;
422 
425 
427  EntryType type() const
428  {
429  switch (bits(data, 1, 0)) {
430  case 0x1:
431  // In AArch64 blocks are not allowed at L0 for the 4 KB granule
432  // and at L1 for 16/64 KB granules
433  if (grainSize > Grain4KB)
434  return lookupLevel == L2 ? Block : Invalid;
435  return lookupLevel == L0 || lookupLevel == L3 ? Invalid : Block;
436  case 0x3:
437  return lookupLevel == L3 ? Page : Table;
438  default:
439  return Invalid;
440  }
441  }
442 
444  uint8_t offsetBits() const
445  {
446  if (type() == Block) {
447  switch (grainSize) {
448  case Grain4KB:
449  return lookupLevel == L1 ? 30 /* 1 GB */
450  : 21 /* 2 MB */;
451  case Grain16KB:
452  return 25 /* 32 MB */;
453  case Grain64KB:
454  return 29 /* 512 MB */;
455  default:
456  panic("Invalid AArch64 VM granule size\n");
457  }
458  } else if (type() == Page) {
459  switch (grainSize) {
460  case Grain4KB:
461  case Grain16KB:
462  case Grain64KB:
463  return grainSize; /* enum -> uint okay */
464  default:
465  panic("Invalid AArch64 VM granule size\n");
466  }
467  } else {
468  panic("AArch64 page table entry must be block or page\n");
469  }
470  }
471 
473  Addr pfn() const
474  {
475  if (aarch64)
476  return bits(data, 47, offsetBits());
477  return bits(data, 39, offsetBits());
478  }
479 
481  Addr paddr(Addr va) const
482  {
483  int n = offsetBits();
484  if (aarch64)
485  return mbits(data, 47, n) | mbits(va, n - 1, 0);
486  return mbits(data, 39, n) | mbits(va, n - 1, 0);
487  }
488 
490  Addr paddr() const
491  {
492  if (aarch64)
493  return mbits(data, 47, offsetBits());
494  return mbits(data, 39, offsetBits());
495  }
496 
499  {
500  assert(type() == Table);
501  if (aarch64)
502  return mbits(data, 47, grainSize);
503  else
504  return mbits(data, 39, 12);
505  }
506 
509  {
510  assert(type() == Table);
511  Addr pa = 0;
512  if (aarch64) {
513  int stride = grainSize - 3;
514  int va_lo = stride * (3 - (lookupLevel + 1)) + grainSize;
515  int va_hi = va_lo + stride - 1;
516  pa = nextTableAddr() | (bits(va, va_hi, va_lo) << 3);
517  } else {
518  if (lookupLevel == L1)
519  pa = nextTableAddr() | (bits(va, 29, 21) << 3);
520  else // lookupLevel == L2
521  pa = nextTableAddr() | (bits(va, 20, 12) << 3);
522  }
523  return pa;
524  }
525 
527  bool xn() const
528  {
529  assert(type() == Block || type() == Page);
530  return bits(data, 54);
531  }
532 
534  bool pxn() const
535  {
536  assert(type() == Block || type() == Page);
537  return bits(data, 53);
538  }
539 
541  bool contiguousHint() const
542  {
543  assert(type() == Block || type() == Page);
544  return bits(data, 52);
545  }
546 
549  {
550  assert(currState && (type() == Block || type() == Page));
551  if (!currState->aarch64 && (currState->isSecure &&
552  !currState->secureLookup)) {
553  return false; // ARM ARM issue C B3.6.3
554  } else if (currState->aarch64) {
555  if (currState->el == EL2 || currState->el == EL3) {
556  return true; // By default translations are treated as global
557  // in AArch64 EL2 and EL3
558  } else if (currState->isSecure && !currState->secureLookup) {
559  return false;
560  }
561  }
562  return !bits(data, 11);
563  }
564 
566  bool af() const
567  {
568  assert(type() == Block || type() == Page);
569  return bits(data, 10);
570  }
571 
573  uint8_t sh() const
574  {
575  assert(type() == Block || type() == Page);
576  return bits(data, 9, 8);
577  }
578 
580  uint8_t ap() const
581  {
582  assert(type() == Block || type() == Page);
583  // Long descriptors only support the AP[2:1] scheme
584  return bits(data, 7, 6);
585  }
586 
588  bool rw() const
589  {
590  assert(type() == Block || type() == Page);
591  return !bits(data, 7);
592  }
593 
595  bool user() const
596  {
597  assert(type() == Block || type() == Page);
598  return bits(data, 6);
599  }
600 
604  static uint8_t ap(bool rw, bool user)
605  {
606  return ((!rw) << 2) | (user << 1);
607  }
608 
610  {
611  // Long-desc. format only supports Client domain
612  assert(type() == Block || type() == Page);
614  }
615 
617  uint8_t attrIndx() const
618  {
619  assert(type() == Block || type() == Page);
620  return bits(data, 4, 2);
621  }
622 
624  uint8_t memAttr() const
625  {
626  assert(type() == Block || type() == Page);
627  return bits(data, 5, 2);
628  }
629 
632  void setAf()
633  {
634  data |= 1 << 10;
635  _dirty = true;
636  }
637 
639  bool dirty() const
640  {
641  return _dirty;
642  }
643 
645  bool secureTable() const
646  {
647  assert(type() == Table);
648  return !bits(data, 63);
649  }
650 
652  uint8_t apTable() const
653  {
654  assert(type() == Table);
655  return bits(data, 62, 61);
656  }
657 
659  uint8_t rwTable() const
660  {
661  assert(type() == Table);
662  return !bits(data, 62);
663  }
664 
667  uint8_t userTable() const
668  {
669  assert(type() == Table);
670  return !bits(data, 61);
671  }
672 
674  bool xnTable() const
675  {
676  assert(type() == Table);
677  return bits(data, 60);
678  }
679 
681  bool pxnTable() const
682  {
683  assert(type() == Table);
684  return bits(data, 59);
685  }
686  };
687 
689  {
690  public:
693 
695  bool aarch64;
696 
699 
702 
705 
707  uint16_t asid;
708  uint8_t vmid;
709  bool isHyp;
710 
713 
716 
719 
722 
724  SCTLR sctlr;
725 
727  SCR scr;
728 
730  CPSR cpsr;
731 
733  union {
734  TTBCR ttbcr; // AArch32 translations
735  TCR tcr; // AArch64 translations
736  };
737 
739  HTCR htcr;
740 
742  HCR hcr;
743 
745  VTCR_t vtcr;
746 
748  bool isWrite;
749 
751  bool isFetch;
752 
754  bool isSecure;
755 
758 
762  bool rwTable;
763  bool userTable;
764  bool xnTable;
765  bool pxnTable;
766 
768  bool hpd;
769 
771  bool stage2Req;
772 
775 
777  bool timing;
778 
781 
784 
787 
791 
794 
797  bool delayed;
798 
800 
803 
805  unsigned levels;
806 
807  void doL1Descriptor();
808  void doL2Descriptor();
809 
810  void doLongDescriptor();
811 
812  WalkerState();
813 
814  std::string name() const { return tableWalker->name(); }
815  };
816 
817  protected:
818 
821 
825 
828 
831 
834 
836  const bool isStage2;
837 
840 
842  SCTLR sctlr;
843 
845 
847  bool pending;
848 
851  unsigned numSquashable;
852 
855  bool _haveLPAE;
857  uint8_t physAddrRange;
859 
861  struct TableWalkerStats : public Stats::Group {
872  Stats::Histogram pendingWalks; // essentially "L" of queueing theory
875  } stats;
876 
877  mutable unsigned pendingReqs;
879 
880  static const unsigned REQUESTED = 0;
881  static const unsigned COMPLETED = 1;
882 
883  public:
884  typedef ArmTableWalkerParams Params;
885  TableWalker(const Params *p);
886  virtual ~TableWalker();
887 
888  const Params *
889  params() const
890  {
891  return dynamic_cast<const Params *>(_params);
892  }
893 
894  void init() override;
895 
896  bool haveLPAE() const { return _haveLPAE; }
897  bool haveVirtualization() const { return _haveVirtualization; }
898  bool haveLargeAsid64() const { return _haveLargeAsid64; }
900  void completeDrain();
901  DrainState drain() override;
902  void drainResume() override;
903 
904  Port &getPort(const std::string &if_name,
905  PortID idx=InvalidPortID) override;
906 
907  Fault walk(const RequestPtr &req, ThreadContext *tc,
908  uint16_t asid, uint8_t _vmid,
909  bool _isHyp, TLB::Mode mode, TLB::Translation *_trans,
910  bool timing, bool functional, bool secure,
911  TLB::ArmTranslationType tranType, bool _stage2Req);
912 
913  void setTlb(TLB *_tlb) { tlb = _tlb; }
914  TLB* getTlb() { return tlb; }
915  void setMMU(Stage2MMU *m, RequestorID requestor_id);
916  void memAttrs(ThreadContext *tc, TlbEntry &te, SCTLR sctlr,
917  uint8_t texcb, bool s);
919  LongDescriptor &lDescriptor);
921  LongDescriptor &lDescriptor);
922 
923  static LookupLevel toLookupLevel(uint8_t lookup_level_as_int);
924 
925  private:
926 
927  void doL1Descriptor();
928  void doL1DescriptorWrapper();
930 
931  void doL2Descriptor();
932  void doL2DescriptorWrapper();
934 
935  void doLongDescriptor();
936 
945 
946  void doLongDescriptorWrapper(LookupLevel curr_lookup_level);
948 
949  bool fetchDescriptor(Addr descAddr, uint8_t *data, int numBytes,
950  Request::Flags flags, int queueIndex, Event *event,
951  void (TableWalker::*doDescriptor)());
952 
954 
955  void insertTableEntry(DescriptorBase &descriptor, bool longDescriptor);
956 
957  Fault processWalk();
959  static unsigned adjustTableSizeAArch64(unsigned tsz);
962  static bool checkAddrSizeFaultAArch64(Addr addr, int currPhysAddrRange);
964  void processWalkWrapper();
966 
967  void nextWalk(ThreadContext *tc);
968 
969  void pendingChange();
970 
971  static uint8_t pageSizeNtoStatBin(uint8_t N);
972 
974  LookupLevel lookup_level);
975 };
976 
977 } // namespace ArmISA
978 
979 #endif //__ARCH_ARM_TABLE_WALKER_HH__
980 
ArmISA::TableWalker::L1Descriptor::l2Addr
Addr l2Addr() const
Address of L2 descriptor if it exists.
Definition: table_walker.hh:190
ArmISA::TableWalker::WalkerState::pxnTable
bool pxnTable
Definition: table_walker.hh:765
ArmISA::TableWalker::TableWalkerStats::walkWaitTime
Stats::Histogram walkWaitTime
Definition: table_walker.hh:870
ArmISA::TableWalker::L1Descriptor::getRawData
virtual uint64_t getRawData() const
Definition: table_walker.hh:115
ArmISA::TableWalker::L2Descriptor::dbgHeader
virtual std::string dbgHeader() const
Definition: table_walker.hh:270
ArmISA::TableWalker::WalkerState::stage2Req
bool stage2Req
Flag indicating if a second stage of lookup is required.
Definition: table_walker.hh:771
ArmISA::TableWalker::WalkerState::mode
BaseTLB::Mode mode
Save mode for use in delayed response.
Definition: table_walker.hh:783
ArmISA::TableWalker::LongDescriptor::af
bool af() const
Returns true if the access flag (AF) is set.
Definition: table_walker.hh:566
ArmISA::TableWalker::WalkerState::el
ExceptionLevel el
Current exception level.
Definition: table_walker.hh:698
ArmISA::TableWalker::LongDescriptor::grainSize
GrainSize grainSize
Width of the granule size in bits.
Definition: table_walker.hh:424
ArmISA::TableWalker::WalkerState::scr
SCR scr
Cached copy of the scr as it existed when translation began.
Definition: table_walker.hh:727
ArmISA::TableWalker::walk
Fault walk(const 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 _stage2Req)
Definition: table_walker.cc:189
ArmISA::TableWalker::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: table_walker.cc:179
ArmISA::TableWalker::WalkerState::functional
bool functional
If the atomic mode should be functional.
Definition: table_walker.hh:780
ArmISA::LookupLevel
LookupLevel
Definition: pagetable.hh:72
ArmISA::TableWalker::TableWalkerStats::walksShortDescriptor
Stats::Scalar walksShortDescriptor
Definition: table_walker.hh:864
ArmISA::TableWalker::L1Descriptor::pfn
Addr pfn() const
Return the physical frame, bits shifted right.
Definition: table_walker.hh:158
ArmISA::TableWalker::L2Descriptor
Level 2 page table descriptor.
Definition: table_walker.hh:243
ArmISA::TableWalker::WalkerState::tcr
TCR tcr
Definition: table_walker.hh:735
ArmISA::TableWalker::memAttrsAArch64
void memAttrsAArch64(ThreadContext *tc, TlbEntry &te, LongDescriptor &lDescriptor)
Definition: table_walker.cc:1438
ArmISA::TableWalker::DescriptorBase::secure
virtual bool secure(bool have_security, WalkerState *currState) const =0
ArmISA::TableWalker::L1Descriptor::supersection
bool supersection() const
Is the page a Supersection (16MB)?
Definition: table_walker.hh:136
ArmISA::TableWalker::doL2Descriptor
void doL2Descriptor()
Definition: table_walker.cc:1825
ArmISA::EL2
@ EL2
Definition: types.hh:624
ArmISA::TableWalker::WalkerState::isHyp
bool isHyp
Definition: table_walker.hh:709
ArmISA::TableWalker::WalkerState::doL2Descriptor
void doL2Descriptor()
ArmISA::TableWalker::WalkerState::tranType
TLB::ArmTranslationType tranType
The translation type that has been requested.
Definition: table_walker.hh:786
ArmISA::TableWalker::WalkerState::asid
uint16_t asid
ASID that we're servicing the request under.
Definition: table_walker.hh:707
ArmISA::TableWalker::TableWalkerStats::TableWalkerStats
TableWalkerStats(Stats::Group *parent)
Definition: table_walker.cc:2282
ArmISA::TableWalker::DescriptorBase::global
virtual bool global(WalkerState *currState) const =0
data
const char data[]
Definition: circlebuf.test.cc:42
ArmISA::TableWalker::LongDescriptor::rwTable
uint8_t rwTable() const
R/W protection flag for subsequent levels of lookup.
Definition: table_walker.hh:659
ArmISA::TableWalker::doL0LongDescriptorWrapper
void doL0LongDescriptorWrapper()
Definition: table_walker.cc:1978
ArmISA::TableWalker::DescriptorBase::shareable
virtual bool shareable() const
Definition: table_walker.hh:86
ArmISA::TableWalker::testWalk
Fault testWalk(Addr pa, Addr size, TlbEntry::DomainType domain, LookupLevel lookup_level)
Definition: table_walker.cc:2253
ArmISA::TableWalker::L2Descriptor::offsetBits
virtual uint8_t offsetBits() const
Definition: table_walker.hh:285
ArmISA::TableWalker::processWalkLPAE
Fault processWalkLPAE()
Definition: table_walker.cc:578
ArmISA::TableWalker::L1Descriptor::_dirty
bool _dirty
This entry has been modified (access flag set) and needs to be written back to memory.
Definition: table_walker.hh:107
ArmISA::TLB::ArmTranslationType
ArmTranslationType
Definition: tlb.hh:118
ArmISA::TableWalker::_haveLPAE
bool _haveLPAE
Definition: table_walker.hh:855
ArmISA::TableWalker::WalkerState::req
RequestPtr req
Request that is currently being serviced.
Definition: table_walker.hh:704
InvalidPortID
const PortID InvalidPortID
Definition: types.hh:238
ArmISA::TableWalker::LongDescriptor::LongDescriptor
LongDescriptor()
Definition: table_walker.hh:385
ArmISA::TableWalker::L1Descriptor::shareable
bool shareable() const
If the section is shareable.
Definition: table_walker.hh:206
ArmISA::TableWalker::sctlr
SCTLR sctlr
Cached copy of the sctlr as it existed when translation began.
Definition: table_walker.hh:842
ArmISA::TableWalker::DescriptorBase::lookupLevel
LookupLevel lookupLevel
Current lookup level for this descriptor.
Definition: table_walker.hh:71
ArmISA::TableWalker::WalkerState::userTable
bool userTable
Definition: table_walker.hh:763
ArmISA::TableWalker::stage2Mmu
Stage2MMU * stage2Mmu
The MMU to forward second stage look upts to.
Definition: table_walker.hh:827
ArmISA::TableWalker::DescriptorBase::dbgHeader
virtual std::string dbgHeader() const =0
ArmISA::TableWalker::haveLPAE
bool haveLPAE() const
Definition: table_walker.hh:896
Flags< FlagsType >
ArmISA::TableWalker::isStage2
const bool isStage2
Indicates whether this table walker is part of the stage 2 mmu.
Definition: table_walker.hh:836
ArmISA::TableWalker::LongDescriptor::nextDescAddr
Addr nextDescAddr(Addr va) const
Return the address of the next descriptor.
Definition: table_walker.hh:508
ArmISA::TableWalker::L2Descriptor::secure
bool secure(bool have_security, WalkerState *currState) const
Definition: table_walker.hh:280
ArmISA::TableWalker::doLongDescriptorWrapper
void doLongDescriptorWrapper(LookupLevel curr_lookup_level)
Definition: table_walker.cc:2002
ArmISA::TableWalker::LongDescriptor::pfn
Addr pfn() const
Return the physical frame, bits shifted right.
Definition: table_walker.hh:473
ArmISA::TableWalker::doL2LongDescEvent
EventFunctionWrapper doL2LongDescEvent
Definition: table_walker.hh:942
ArmISA::TableWalker::numSquashable
unsigned numSquashable
The number of walks belonging to squashed instructions that can be removed from the pendingQueue per ...
Definition: table_walker.hh:851
ArmISA::TableWalker::WalkerState::physAddrRange
int physAddrRange
Current physical address range in bits.
Definition: table_walker.hh:701
ArmISA::TableWalker::WalkerState::tc
ThreadContext * tc
Thread context that we're doing the walk for.
Definition: table_walker.hh:692
ArmISA::TableWalker::haveLargeAsid64
bool haveLargeAsid64() const
Definition: table_walker.hh:898
ArmISA::TableWalker::L2Descriptor::L2Descriptor
L2Descriptor(L1Descriptor &parent)
Definition: table_walker.hh:259
ArmISA::TableWalker::LongDescriptor::apTable
uint8_t apTable() const
Two bit access protection flags for subsequent levels of lookup.
Definition: table_walker.hh:652
ArmISA::te
Bitfield< 30 > te
Definition: miscregs_types.hh:334
ArmISA::TableWalker::params
const Params * params() const
Definition: table_walker.hh:889
BaseTLB::Mode
Mode
Definition: tlb.hh:57
ArmISA::TableWalker::DescriptorBase::xn
virtual bool xn() const =0
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
ArmISA::TableWalker::WalkerState::vmid
uint8_t vmid
Definition: table_walker.hh:708
ArmISA::TableWalker::WalkerState::levels
unsigned levels
Page entries walked during service (for stats)
Definition: table_walker.hh:805
ArmISA::TableWalker::_haveVirtualization
bool _haveVirtualization
Definition: table_walker.hh:856
ArmISA::TableWalker::L1Descriptor::EntryType
EntryType
Type of page table entry ARM DDI 0406B: B3-8.
Definition: table_walker.hh:95
ArmISA::TableWalker::processWalk
Fault processWalk()
Definition: table_walker.cc:469
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
ArmISA::TableWalker::doProcessEvent
EventFunctionWrapper doProcessEvent
Definition: table_walker.hh:965
ArmISA::TableWalker::ReservedGrain
@ ReservedGrain
Definition: table_walker.hh:371
ArmISA::TableWalker::WalkerState
Definition: table_walker.hh:688
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:82
ArmISA::TableWalker::L2Descriptor::dirty
bool dirty() const
This entry needs to be written back to memory.
Definition: table_walker.hh:359
ArmISA::TableWalker::WalkerState::startTime
Tick startTime
Timestamp for calculating elapsed time in service (for stats)
Definition: table_walker.hh:802
ArmISA::TableWalker::LongDescriptor::Table
@ Table
Definition: table_walker.hh:380
ArmISA::TableWalker::WalkerState::hcr
HCR hcr
Cached copy of the htcr as it existed when translation began.
Definition: table_walker.hh:742
ArmISA::TableWalker::memAttrs
void memAttrs(ThreadContext *tc, TlbEntry &te, SCTLR sctlr, uint8_t texcb, bool s)
Definition: table_walker.cc:1105
ArmISA::TableWalker::WalkerState::name
std::string name() const
Definition: table_walker.hh:814
ArmISA::TableWalker::pageSizeNtoStatBin
static uint8_t pageSizeNtoStatBin(uint8_t N)
Definition: table_walker.cc:2262
ArmISA::TableWalker::TableWalkerStats::walksLongDescriptor
Stats::Scalar walksLongDescriptor
Definition: table_walker.hh:865
tlb.hh
ArmISA::TableWalker::LongDescriptor::getRawData
virtual uint64_t getRawData() const
Definition: table_walker.hh:394
ArmISA::EL3
@ EL3
Definition: types.hh:625
ArmISA::TableWalker::L1Descriptor::type
EntryType type() const
Definition: table_walker.hh:130
ArmISA::TableWalker::LongDescriptor::pxnTable
bool pxnTable() const
Is privileged execution allowed on subsequent lookup levels?
Definition: table_walker.hh:681
ArmISA::TableWalker::doL2DescriptorWrapper
void doL2DescriptorWrapper()
Definition: table_walker.cc:1937
ArmISA::TableWalker::L1Descriptor
Definition: table_walker.hh:92
ArmISA::TableWalker::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: table_walker.cc:108
ArmISA::TableWalker::L1Descriptor::domain
TlbEntry::DomainType domain() const
Domain Client/Manager: ARM DDI 0406B: B3-31.
Definition: table_walker.hh:184
mbits
T mbits(T val, int first, int last)
Mask off the given bits in place like bits() but without shifting.
Definition: bitfield.hh:104
ArmISA::TableWalker::LongDescriptor::type
EntryType type() const
Return the descriptor type.
Definition: table_walker.hh:427
system.hh
ArmISA::TableWalker::doL0LongDescEvent
EventFunctionWrapper doL0LongDescEvent
Definition: table_walker.hh:938
ArmISA::TableWalker::REQUESTED
static const unsigned REQUESTED
Definition: table_walker.hh:880
ArmISA::ArmFault::FaultSource
FaultSource
Generic fault source enums used to index into {short/long/aarch64}DescFaultSources[] to get the actua...
Definition: faults.hh:91
ArmISA::Stage2MMU
Definition: stage2_mmu.hh:50
ArmISA::TableWalker::L1Descriptor::ap
uint8_t ap() const
Three bit access protection flags.
Definition: table_walker.hh:178
ArmISA::TableWalker::WalkerState::doLongDescriptor
void doLongDescriptor()
ArmISA::TableWalker::DescriptorBase::offsetBits
virtual uint8_t offsetBits() const =0
ArmISA::TableWalker::LongDescriptor::userTable
uint8_t userTable() const
User/privileged mode protection flag for subsequent levels of lookup.
Definition: table_walker.hh:667
Stats::Vector
A vector of scalar stats.
Definition: statistics.hh:2575
ArmISA::TableWalker::pendingChangeTick
Tick pendingChangeTick
Definition: table_walker.hh:878
ArmISA::TableWalker::L2Descriptor::paddr
Addr paddr(Addr va) const
Return complete physical address given a VA.
Definition: table_walker.hh:335
ArmISA::TableWalker::WalkerState::tableWalker
TableWalker * tableWalker
Definition: table_walker.hh:799
ArmISA::TableWalker::WalkerState::isWrite
bool isWrite
If the access is a write.
Definition: table_walker.hh:748
ArmISA
Definition: ccregs.hh:41
ArmISA::TableWalker::LongDescriptor::ap
uint8_t ap() const
2-bit access protection flags
Definition: table_walker.hh:580
ArmISA::TableWalker::WalkerState::isSecure
bool isSecure
If the access comes from the secure state.
Definition: table_walker.hh:754
ArmISA::TableWalker::nextWalk
void nextWalk(ThreadContext *tc)
Definition: table_walker.cc:2058
ArmISA::TableWalker::L2Descriptor::invalid
bool invalid() const
Is the entry invalid.
Definition: table_walker.hh:291
request.hh
ArmISA::TableWalker::WalkerState::l1Desc
L1Descriptor l1Desc
Short-format descriptors.
Definition: table_walker.hh:789
ArmISA::TableWalker::L1Descriptor::data
uint32_t data
The raw bits of the entry.
Definition: table_walker.hh:103
ArmISA::TlbEntry::DomainType::Client
@ Client
ArmISA::L0
@ L0
Definition: pagetable.hh:73
ArmISA::TableWalker::WalkerState::timing
bool timing
If the mode is timing or atomic.
Definition: table_walker.hh:777
ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:231
ArmISA::TableWalker::TableWalkerStats::pageSizes
Stats::Vector pageSizes
Definition: table_walker.hh:873
ArmISA::TableWalker::WalkerState::longDesc
LongDescriptor longDesc
Long-format descriptor (LPAE and AArch64)
Definition: table_walker.hh:793
EventFunctionWrapper
Definition: eventq.hh:1101
ArmISA::TableWalker::WalkerState::secureLookup
bool secureLookup
Helper variables used to implement hierarchical access permissions when the long-desc.
Definition: table_walker.hh:761
Stats::Histogram
A simple histogram stat.
Definition: statistics.hh:2654
ArmISA::TableWalker::LongDescriptor::contiguousHint
bool contiguousHint() const
Contiguous hint bit.
Definition: table_walker.hh:541
ArmISA::TableWalker::DescriptorBase::pfn
virtual Addr pfn() const =0
ArmISA::TableWalker::WalkerState::cpsr
CPSR cpsr
Cached copy of the cpsr as it existed when translation began.
Definition: table_walker.hh:730
ArmISA::TableWalker::toLookupLevel
static LookupLevel toLookupLevel(uint8_t lookup_level_as_int)
Definition: table_walker.cc:2220
ArmISA::TableWalker::WalkerState::stage2Tran
TLB::Translation * stage2Tran
A pointer to the stage 2 translation that's in progress.
Definition: table_walker.hh:774
ArmISA::TableWalker::LongDescriptor::global
bool global(WalkerState *currState) const
Is the translation global (no asid used)?
Definition: table_walker.hh:548
ArmISA::TableWalker::L1Descriptor::Section
@ Section
Definition: table_walker.hh:98
ArmISA::TableWalker::processWalkAArch64
Fault processWalkAArch64()
Definition: table_walker.cc:767
ArmISA::TableWalker::LongDescriptor::Block
@ Block
Definition: table_walker.hh:381
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
ArmISA::n
Bitfield< 31 > n
Definition: miscregs_types.hh:450
ArmISA::TableWalker::LongDescriptor::rw
bool rw() const
Read/write access protection flag.
Definition: table_walker.hh:588
ArmISA::TableWalker::L1Descriptor::L1Descriptor
L1Descriptor()
Default ctor.
Definition: table_walker.hh:110
RequestorID
uint16_t RequestorID
Definition: request.hh:85
ArmISA::TableWalker::requestorId
RequestorID requestorId
Requestor id assigned by the MMU.
Definition: table_walker.hh:833
ArmISA::TableWalker::L2Descriptor::domain
virtual TlbEntry::DomainType domain() const
Definition: table_walker.hh:275
ArmISA::TableWalker::L1Descriptor::dirty
bool dirty() const
This entry needs to be written back to memory.
Definition: table_walker.hh:221
ArmISA::TableWalker::L2Descriptor::pfn
Addr pfn() const
Return the physical frame, bits shifted right.
Definition: table_walker.hh:329
ArmISA::TableWalker::doL3LongDescriptorWrapper
void doL3LongDescriptorWrapper()
Definition: table_walker.cc:1996
ArmISA::TableWalker::L1Descriptor::setAp0
void setAp0()
Set access flag that this entry has been touched.
Definition: table_walker.hh:214
ArmISA::TableWalker::L2Descriptor::ap
uint8_t ap() const
Three bit access protection flags.
Definition: table_walker.hh:315
ArmISA::TableWalker::LongDescriptor::data
uint64_t data
The raw bits of the entry.
Definition: table_walker.hh:388
ArmISA::TableWalker::L2Descriptor::_dirty
bool _dirty
This entry has been modified (access flag set) and needs to be written back to memory.
Definition: table_walker.hh:251
ArmISA::TableWalker::L1Descriptor::paddr
Addr paddr() const
Return the physcal address of the entry, bits in position.
Definition: table_walker.hh:142
ArmISA::TableWalker::WalkerState::aarch64
bool aarch64
If the access is performed in AArch64 state.
Definition: table_walker.hh:695
ArmISA::TableWalker::L2Descriptor::texcb
uint8_t texcb() const
Memory region attributes: ARM DDI 0406B: B3-32.
Definition: table_walker.hh:321
ArmISA::TableWalker::LongDescriptor::attrIndx
uint8_t attrIndx() const
Attribute index.
Definition: table_walker.hh:617
ArmISA::TableWalker::WalkerState::doL1Descriptor
void doL1Descriptor()
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
ArmISA::TableWalker::fetchDescriptor
bool fetchDescriptor(Addr descAddr, uint8_t *data, int numBytes, Request::Flags flags, int queueIndex, Event *event, void(TableWalker::*doDescriptor)())
Definition: table_walker.cc:2067
Event
Definition: eventq.hh:246
ArmISA::TableWalker::DescriptorBase::getRawData
virtual uint64_t getRawData() const =0
ArmISA::TableWalker::_haveLargeAsid64
bool _haveLargeAsid64
Definition: table_walker.hh:858
ArmISA::TableWalker::TableWalkerStats::walks
Stats::Scalar walks
Definition: table_walker.hh:863
ArmISA::L1
@ L1
Definition: pagetable.hh:74
ArmISA::ExceptionLevel
ExceptionLevel
Definition: types.hh:621
ArmISA::TableWalker::L1Descriptor::Reserved
@ Reserved
Definition: table_walker.hh:99
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
ArmISA::TableWalker::WalkerState::xnTable
bool xnTable
Definition: table_walker.hh:764
MipsISA::event
Bitfield< 10, 5 > event
Definition: pra_constants.hh:297
ArmISA::TableWalker::getTlb
TLB * getTlb()
Definition: table_walker.hh:914
ArmISA::TableWalker::stats
ArmISA::TableWalker::TableWalkerStats stats
ArmISA::TableWalker::L1Descriptor::secure
bool secure(bool have_security, WalkerState *currState) const
Returns true if this entry targets the secure physical address map.
Definition: table_walker.hh:230
ArmISA::TableWalker::L1Descriptor::global
bool global(WalkerState *currState) const
Is the translation global (no asid used)?
Definition: table_walker.hh:166
ArmISA::TableWalker::haveSecurity
bool haveSecurity
Cached copies of system-level properties.
Definition: table_walker.hh:854
ArmISA::TableWalker::LongDescriptor::domain
TlbEntry::DomainType domain() const
Definition: table_walker.hh:609
ArmISA::TableWalker::LongDescriptor::dbgHeader
virtual std::string dbgHeader() const
Definition: table_walker.hh:399
ArmISA::TableWalker::L2Descriptor::large
bool large() const
What is the size of the mapping?
Definition: table_walker.hh:297
ArmISA::TableWalker::L2Descriptor::setAp0
void setAp0()
Set access flag that this entry has been touched.
Definition: table_walker.hh:352
ArmISA::TableWalker::stateQueues
std::list< WalkerState * > stateQueues[MAX_LOOKUP_LEVELS]
Queues of requests for all the different lookup levels.
Definition: table_walker.hh:820
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
ArmISA::TableWalker::LongDescriptor::secureTable
bool secureTable() const
Whether the subsequent levels of lookup are secure.
Definition: table_walker.hh:645
ArmISA::TableWalker::Grain64KB
@ Grain64KB
Definition: table_walker.hh:370
ArmISA::TableWalker::L1Descriptor::Ignore
@ Ignore
Definition: table_walker.hh:96
ArmISA::TableWalker::Grain16KB
@ Grain16KB
Definition: table_walker.hh:369
ArmISA::TableWalker::LongDescriptor::paddr
Addr paddr(Addr va) const
Return the complete physical address given a VA.
Definition: table_walker.hh:481
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
ArmISA::TableWalker::physAddrRange
uint8_t physAddrRange
Definition: table_walker.hh:857
ArmISA::TableWalker::WalkerState::rwTable
bool rwTable
Definition: table_walker.hh:762
ArmISA::TableWalker::DescriptorBase
Definition: table_walker.hh:66
ArmISA::TableWalker::LongDescriptor::memAttr
uint8_t memAttr() const
Memory attributes, only used by stage 2 translations.
Definition: table_walker.hh:624
ArmISA::TableWalker::LongDescriptor::secure
bool secure(bool have_security, WalkerState *currState) const
Returns true if this entry targets the secure physical address map.
Definition: table_walker.hh:414
ArmISA::TableWalker::pendingChange
void pendingChange()
Definition: table_walker.cc:2237
ArmISA::TableWalker::Params
ArmTableWalkerParams Params
Definition: table_walker.hh:884
Block
Definition: global.h:77
BaseTLB::Translation
Definition: tlb.hh:59
ArmISA::TableWalker::L1Descriptor::texcb
uint8_t texcb() const
Memory region attributes: ARM DDI 0406B: B3-32.
Definition: table_walker.hh:200
ArmISA::TableWalker::L2Descriptor::shareable
bool shareable() const
If the section is shareable.
Definition: table_walker.hh:344
ArmISA::TableWalker::TableWalker
TableWalker(const Params *p)
Definition: table_walker.cc:56
ArmISA::TableWalker::WalkerState::vtcr
VTCR_t vtcr
Cached copy of the vtcr as it existed when translation began.
Definition: table_walker.hh:745
ArmISA::TableWalker::haveVirtualization
bool haveVirtualization() const
Definition: table_walker.hh:897
ArmISA::TableWalker::checkAddrSizeFaultAArch64
static bool checkAddrSizeFaultAArch64(Addr addr, int currPhysAddrRange)
Returns true if the address exceeds the range permitted by the system-wide setting or by the TCR_ELx ...
Definition: table_walker.cc:760
ArmISA::TableWalker::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: table_walker.cc:116
ArmISA::TableWalker::doL2LongDescriptorWrapper
void doL2LongDescriptorWrapper()
Definition: table_walker.cc:1990
ArmISA::TableWalker::LongDescriptor::aarch64
bool aarch64
True if the current lookup is performed in AArch64 state.
Definition: table_walker.hh:421
ArmISA::TableWalker::WalkerState::delayed
bool delayed
Whether the response is delayed in timing mode due to additional lookups.
Definition: table_walker.hh:797
ArmISA::TableWalker::doL3LongDescEvent
EventFunctionWrapper doL3LongDescEvent
Definition: table_walker.hh:944
ArmISA::L2
@ L2
Definition: pagetable.hh:75
ArmISA::TableWalker::port
DmaPort * port
Port shared by the two table walkers.
Definition: table_walker.hh:830
ArmISA::TableWalker::LongDescriptor::ap
static uint8_t ap(bool rw, bool user)
Return the AP bits as compatible with the AP[2:0] format.
Definition: table_walker.hh:604
ArmISA::TableWalker::LongDescriptor::Page
@ Page
Definition: table_walker.hh:382
ArmISA::TableWalker::L2Descriptor::getRawData
virtual uint64_t getRawData() const
Definition: table_walker.hh:265
ArmISA::TableWalker::L2Descriptor::data
uint32_t data
The raw bits of the entry.
Definition: table_walker.hh:246
ArmISA::TableWalker::TableWalkerStats
Statistics.
Definition: table_walker.hh:861
faults.hh
ArmISA::TableWalker::DescriptorBase::ap
virtual uint8_t ap() const =0
ArmISA::TableWalker::LongDescriptor::user
bool user() const
User/privileged level access protection flag.
Definition: table_walker.hh:595
ArmISA::TableWalker::LongDescEventByLevel
Event * LongDescEventByLevel[4]
Definition: table_walker.hh:947
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
ArmISA::TableWalker::TableWalkerStats::walkServiceTime
Stats::Histogram walkServiceTime
Definition: table_walker.hh:871
ArmISA::TableWalker::LongDescriptor::setAf
void setAf()
Set access flag that this entry has been touched.
Definition: table_walker.hh:632
ArmISA::TableWalker::L2Descriptor::l1Parent
L1Descriptor * l1Parent
Definition: table_walker.hh:247
ArmISA::TableWalker::TableWalkerStats::walksLongTerminatedAtLevel
Stats::Vector walksLongTerminatedAtLevel
Definition: table_walker.hh:867
ArmISA::TableWalker::WalkerState::isFetch
bool isFetch
If the access is a fetch (for execution, and no-exec) must be checked?
Definition: table_walker.hh:751
ArmISA::TableWalker::TableWalkerStats::walksShortTerminatedAtLevel
Stats::Vector walksShortTerminatedAtLevel
Definition: table_walker.hh:866
ArmISA::TableWalker::generateLongDescFault
Fault generateLongDescFault(ArmFault::FaultSource src)
Definition: table_walker.cc:1643
ArmISA::TableWalker::LongDescriptor::offsetBits
uint8_t offsetBits() const
Return the bit width of the page/block offset.
Definition: table_walker.hh:444
ArmISA::TableWalker::memAttrsLPAE
void memAttrsLPAE(ThreadContext *tc, TlbEntry &te, LongDescriptor &lDescriptor)
Definition: table_walker.cc:1312
ArmISA::TableWalker::WalkerState::htcr
HTCR htcr
Cached copy of the htcr as it existed when translation began.
Definition: table_walker.hh:739
ArmISA::asid
asid
Definition: miscregs_types.hh:611
ArmISA::TableWalker::completeDrain
void completeDrain()
Checks if all state is cleared and if so, completes drain.
Definition: table_walker.cc:145
ArmISA::TLB
Definition: tlb.hh:100
ArmISA::TableWalker::doL1LongDescEvent
EventFunctionWrapper doL1LongDescEvent
Definition: table_walker.hh:940
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
ArmISA::TableWalker::WalkerState::hpd
bool hpd
Hierarchical access permission disable.
Definition: table_walker.hh:768
ArmISA::TableWalker::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: table_walker.cc:158
miscregs.hh
ArmISA::TableWalker::WalkerState::vaddr_tainted
Addr vaddr_tainted
The virtual address that is being translated.
Definition: table_walker.hh:721
ArmISA::TableWalker::WalkerState::vaddr
Addr vaddr
The virtual address that is being translated with tagging removed.
Definition: table_walker.hh:718
ArmISA::TableWalker::setMMU
void setMMU(Stage2MMU *m, RequestorID requestor_id)
Definition: table_walker.cc:100
ArmISA::TableWalker::L1Descriptor::xn
bool xn() const
Is the translation not allow execution?
Definition: table_walker.hh:172
ArmISA::TableWalker::doL1DescriptorWrapper
void doL1DescriptorWrapper()
Definition: table_walker.cc:1881
ArmISA::TlbEntry::DomainType
DomainType
Definition: pagetable.hh:90
ArmISA::TlbEntry
Definition: pagetable.hh:81
ArmISA::TableWalker::pendingReqs
unsigned pendingReqs
Definition: table_walker.hh:877
Stats::Vector2d
A 2-Dimensional vecto of scalar stats.
Definition: statistics.hh:2603
ArmISA::TableWalker::LongDescriptor::dirty
bool dirty() const
This entry needs to be written back to memory.
Definition: table_walker.hh:639
ArmISA::TableWalker::tlb
TLB * tlb
TLB that is initiating these table walks.
Definition: table_walker.hh:839
ArmISA::TableWalker::LongDescriptor::sh
uint8_t sh() const
2-bit shareability field
Definition: table_walker.hh:573
ArmISA::TableWalker::LongDescriptor::paddr
Addr paddr() const
Return the physical address of the entry.
Definition: table_walker.hh:490
ArmISA::TableWalker::LongDescriptor::_dirty
bool _dirty
This entry has been modified (access flag set) and needs to be written back to memory.
Definition: table_walker.hh:392
ArmISA::TableWalker::TableWalkerStats::requestOrigin
Stats::Vector2d requestOrigin
Definition: table_walker.hh:874
ArmISA::TableWalker::Grain4KB
@ Grain4KB
Definition: table_walker.hh:368
ArmISA::TableWalker::WalkerState::isUncacheable
bool isUncacheable
True if table walks are uncacheable (for table descriptors)
Definition: table_walker.hh:757
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::TableWalker::DescriptorBase::DescriptorBase
DescriptorBase()
Definition: table_walker.hh:68
ArmISA::TableWalker::pendingQueue
std::list< WalkerState * > pendingQueue
Queue of requests that have passed are waiting because the walker is currently busy.
Definition: table_walker.hh:824
clocked_object.hh
Stats::Group
Statistics container.
Definition: group.hh:83
ArmISA::TableWalker::DescriptorBase::domain
virtual TlbEntry::DomainType domain() const =0
addr
ip6_addr_t addr
Definition: inet.hh:423
ArmISA::TableWalker::LongDescriptor::Invalid
@ Invalid
Definition: table_walker.hh:379
ArmISA::TableWalker::LongDescriptor::xn
bool xn() const
Is execution allowed on this mapping?
Definition: table_walker.hh:527
ArmISA::TableWalker::adjustTableSizeAArch64
static unsigned adjustTableSizeAArch64(unsigned tsz)
Definition: table_walker.cc:750
ArmISA::stride
Bitfield< 21, 20 > stride
Definition: miscregs_types.hh:441
ArmISA::MAX_LOOKUP_LEVELS
@ MAX_LOOKUP_LEVELS
Definition: pagetable.hh:77
ArmISA::TableWalker::LongDescriptor::nextTableAddr
Addr nextTableAddr() const
Return the address of the next page table.
Definition: table_walker.hh:498
ArmISA::TableWalker::WalkerState::sctlr
SCTLR sctlr
Cached copy of the sctlr as it existed when translation began.
Definition: table_walker.hh:724
ArmISA::TableWalker::COMPLETED
static const unsigned COMPLETED
Definition: table_walker.hh:881
ArmISA::TableWalker
Definition: table_walker.hh:61
ArmISA::TableWalker::doL1LongDescriptorWrapper
void doL1LongDescriptorWrapper()
Definition: table_walker.cc:1984
ArmISA::TableWalker::LongDescriptor::xnTable
bool xnTable() const
Is execution allowed on subsequent lookup levels?
Definition: table_walker.hh:674
ArmISA::TableWalker::doL1DescEvent
EventFunctionWrapper doL1DescEvent
Definition: table_walker.hh:929
ArmISA::TableWalker::L1Descriptor::dbgHeader
virtual std::string dbgHeader() const
Definition: table_walker.hh:120
ArmISA::TableWalker::WalkerState::WalkerState
WalkerState()
Definition: table_walker.cc:128
ArmISA::TableWalker::LongDescriptor::pxn
bool pxn() const
Is privileged execution allowed on this mapping? (LPAE only)
Definition: table_walker.hh:534
ArmISA::TableWalker::doL2DescEvent
EventFunctionWrapper doL2DescEvent
Definition: table_walker.hh:933
ArmISA::pa
Bitfield< 39, 12 > pa
Definition: miscregs_types.hh:650
ArmISA::TableWalker::L2Descriptor::global
bool global(WalkerState *currState) const
Is the translation global (no asid used)?
Definition: table_walker.hh:309
ArmISA::TableWalker::currState
WalkerState * currState
Definition: table_walker.hh:844
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
ArmISA::TableWalker::~TableWalker
virtual ~TableWalker()
Definition: table_walker.cc:94
std::list
STL list class.
Definition: stl.hh:51
ArmISA::TableWalker::doLongDescriptor
void doLongDescriptor()
Definition: table_walker.cc:1663
ArmISA::TableWalker::processWalkWrapper
void processWalkWrapper()
Definition: table_walker.cc:378
ArmISA::TableWalker::L2Descriptor::xn
bool xn() const
Is execution allowed on this mapping?
Definition: table_walker.hh:303
ArmISA::TableWalker::LongDescriptor
Long-descriptor format (LPAE)
Definition: table_walker.hh:375
ArmISA::s
Bitfield< 4 > s
Definition: miscregs_types.hh:556
ArmISA::TableWalker::WalkerState::transState
TLB::Translation * transState
Translation state for delayed requests.
Definition: table_walker.hh:712
ArmISA::TableWalker::setTlb
void setTlb(TLB *_tlb)
Definition: table_walker.hh:913
ArmISA::TableWalker::WalkerState::fault
Fault fault
The fault that we are going to return.
Definition: table_walker.hh:715
ArmISA::TableWalker::L1Descriptor::paddr
Addr paddr(Addr va) const
Return the physcal address of the entry, bits in position.
Definition: table_walker.hh:149
ArmISA::TableWalker::WalkerState::ttbcr
TTBCR ttbcr
Definition: table_walker.hh:734
ArmISA::TableWalker::TableWalkerStats::squashedAfter
Stats::Scalar squashedAfter
Definition: table_walker.hh:869
ArmISA::TableWalker::WalkerState::l2Desc
L2Descriptor l2Desc
Definition: table_walker.hh:790
DmaPort
Definition: dma_device.hh:55
ArmISA::TableWalker::TableWalkerStats::squashedBefore
Stats::Scalar squashedBefore
Definition: table_walker.hh:868
ArmISA::TableWalker::DescriptorBase::texcb
virtual uint8_t texcb() const
Definition: table_walker.hh:82
ArmISA::TableWalker::L2Descriptor::L2Descriptor
L2Descriptor()
Default ctor.
Definition: table_walker.hh:254
ArmISA::TableWalker::insertTableEntry
void insertTableEntry(DescriptorBase &descriptor, bool longDescriptor)
Definition: table_walker.cc:2139
ArmISA::TableWalker::TableWalkerStats::pendingWalks
Stats::Histogram pendingWalks
Definition: table_walker.hh:872
ArmISA::va
Bitfield< 8 > va
Definition: miscregs_types.hh:272
ArmISA::L3
@ L3
Definition: pagetable.hh:76
ArmISA::m
Bitfield< 0 > m
Definition: miscregs_types.hh:389
ArmISA::TableWalker::pending
bool pending
If a timing translation is currently in progress.
Definition: table_walker.hh:847
ArmISA::TableWalker::LongDescriptor::EntryType
EntryType
Descriptor type.
Definition: table_walker.hh:378
ArmISA::TableWalker::doL1Descriptor
void doL1Descriptor()
Definition: table_walker.cc:1538
ArmISA::TableWalker::L1Descriptor::offsetBits
virtual uint8_t offsetBits() const
Definition: table_walker.hh:125
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
ArmISA::TableWalker::GrainSize
GrainSize
Definition: table_walker.hh:367
bits
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:75
ArmISA::TableWalker::L1Descriptor::PageTable
@ PageTable
Definition: table_walker.hh:97
eventq.hh

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