gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
isa.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, 2012-2020 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) 2009 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  * Authors: Gabe Black
41  */
42 
43 #ifndef __ARCH_ARM_ISA_HH__
44 #define __ARCH_ARM_ISA_HH__
45 
46 #include "arch/arm/isa_device.hh"
47 #include "arch/arm/miscregs.hh"
48 #include "arch/arm/registers.hh"
49 #include "arch/arm/system.hh"
50 #include "arch/arm/tlb.hh"
51 #include "arch/arm/types.hh"
52 #include "arch/generic/isa.hh"
53 #include "arch/generic/traits.hh"
54 #include "debug/Checkpoint.hh"
55 #include "enums/VecRegRenameMode.hh"
56 #include "sim/sim_object.hh"
57 #include "enums/DecoderFlavour.hh"
58 
59 struct ArmISAParams;
60 struct DummyArmISADeviceParams;
61 class ThreadContext;
62 class Checkpoint;
63 class EventManager;
64 
65 namespace ArmISA
66 {
67  class ISA : public BaseISA
68  {
69  protected:
70  // Parent system
72 
73  // Micro Architecture
74  const Enums::DecoderFlavour _decoderFlavour;
75  const Enums::VecRegRenameMode _vecRegRenameMode;
76 
79 
80  // PMU belonging to this ISA
82 
83  // Generic timer interface belonging to this ISA
84  std::unique_ptr<BaseISADevice> timer;
85 
86  // GICv3 CPU interface belonging to this ISA
87  std::unique_ptr<BaseISADevice> gicv3CpuInterface;
88 
89  // Cached copies of system-level properties
92  bool haveLPAE;
94  bool haveCrypto;
97  uint8_t physAddrRange;
98  bool haveSVE;
99  bool haveLSE;
100  bool havePAN;
101 
103  unsigned sveVL;
104 
110 
112 
115  uint32_t lower; // Lower half mapped to this register
116  uint32_t upper; // Upper half mapped to this register
117  uint64_t _reset; // value taken on reset (i.e. initialization)
118  uint64_t _res0; // reserved
119  uint64_t _res1; // reserved
120  uint64_t _raz; // read as zero (fixed at 0)
121  uint64_t _rao; // read as one (fixed at 1)
122  public:
124  lower(0), upper(0),
125  _reset(0), _res0(0), _res1(0), _raz(0), _rao(0) {}
126  uint64_t reset() const { return _reset; }
127  uint64_t res0() const { return _res0; }
128  uint64_t res1() const { return _res1; }
129  uint64_t raz() const { return _raz; }
130  uint64_t rao() const { return _rao; }
131  // raz/rao implies writes ignored
132  uint64_t wi() const { return _raz | _rao; }
133  };
134 
137 
140  std::bitset<NUM_MISCREG_INFOS> &info;
142  public:
143  chain mapsTo(uint32_t l, uint32_t u = 0) const {
144  entry.lower = l;
145  entry.upper = u;
146  return *this;
147  }
148  chain res0(uint64_t mask) const {
149  entry._res0 = mask;
150  return *this;
151  }
152  chain res1(uint64_t mask) const {
153  entry._res1 = mask;
154  return *this;
155  }
156  chain raz(uint64_t mask) const {
157  entry._raz = mask;
158  return *this;
159  }
160  chain rao(uint64_t mask) const {
161  entry._rao = mask;
162  return *this;
163  }
164  chain implemented(bool v = true) const {
165  info[MISCREG_IMPLEMENTED] = v;
166  return *this;
167  }
168  chain unimplemented() const {
169  return implemented(false);
170  }
171  chain unverifiable(bool v = true) const {
172  info[MISCREG_UNVERIFIABLE] = v;
173  return *this;
174  }
175  chain warnNotFail(bool v = true) const {
176  info[MISCREG_WARN_NOT_FAIL] = v;
177  return *this;
178  }
179  chain mutex(bool v = true) const {
180  info[MISCREG_MUTEX] = v;
181  return *this;
182  }
183  chain banked(bool v = true) const {
184  info[MISCREG_BANKED] = v;
185  return *this;
186  }
187  chain banked64(bool v = true) const {
188  info[MISCREG_BANKED64] = v;
189  return *this;
190  }
191  chain bankedChild(bool v = true) const {
192  info[MISCREG_BANKED_CHILD] = v;
193  return *this;
194  }
195  chain userNonSecureRead(bool v = true) const {
196  info[MISCREG_USR_NS_RD] = v;
197  return *this;
198  }
199  chain userNonSecureWrite(bool v = true) const {
200  info[MISCREG_USR_NS_WR] = v;
201  return *this;
202  }
203  chain userSecureRead(bool v = true) const {
204  info[MISCREG_USR_S_RD] = v;
205  return *this;
206  }
207  chain userSecureWrite(bool v = true) const {
208  info[MISCREG_USR_S_WR] = v;
209  return *this;
210  }
211  chain user(bool v = true) const {
212  userNonSecureRead(v);
213  userNonSecureWrite(v);
214  userSecureRead(v);
215  userSecureWrite(v);
216  return *this;
217  }
218  chain privNonSecureRead(bool v = true) const {
219  info[MISCREG_PRI_NS_RD] = v;
220  return *this;
221  }
222  chain privNonSecureWrite(bool v = true) const {
223  info[MISCREG_PRI_NS_WR] = v;
224  return *this;
225  }
226  chain privNonSecure(bool v = true) const {
227  privNonSecureRead(v);
228  privNonSecureWrite(v);
229  return *this;
230  }
231  chain privSecureRead(bool v = true) const {
232  info[MISCREG_PRI_S_RD] = v;
233  return *this;
234  }
235  chain privSecureWrite(bool v = true) const {
236  info[MISCREG_PRI_S_WR] = v;
237  return *this;
238  }
239  chain privSecure(bool v = true) const {
240  privSecureRead(v);
241  privSecureWrite(v);
242  return *this;
243  }
244  chain priv(bool v = true) const {
245  privSecure(v);
246  privNonSecure(v);
247  return *this;
248  }
249  chain privRead(bool v = true) const {
250  privSecureRead(v);
251  privNonSecureRead(v);
252  return *this;
253  }
254  chain hypE2HRead(bool v = true) const {
255  info[MISCREG_HYP_E2H_RD] = v;
256  return *this;
257  }
258  chain hypE2HWrite(bool v = true) const {
259  info[MISCREG_HYP_E2H_WR] = v;
260  return *this;
261  }
262  chain hypE2H(bool v = true) const {
263  hypE2HRead(v);
264  hypE2HWrite(v);
265  return *this;
266  }
267  chain hypRead(bool v = true) const {
268  hypE2HRead(v);
269  info[MISCREG_HYP_RD] = v;
270  return *this;
271  }
272  chain hypWrite(bool v = true) const {
273  hypE2HWrite(v);
274  info[MISCREG_HYP_WR] = v;
275  return *this;
276  }
277  chain hyp(bool v = true) const {
278  hypRead(v);
279  hypWrite(v);
280  return *this;
281  }
282  chain monE2HRead(bool v = true) const {
283  info[MISCREG_MON_E2H_RD] = v;
284  return *this;
285  }
286  chain monE2HWrite(bool v = true) const {
287  info[MISCREG_MON_E2H_WR] = v;
288  return *this;
289  }
290  chain monE2H(bool v = true) const {
291  monE2HRead(v);
292  monE2HWrite(v);
293  return *this;
294  }
295  chain monSecureRead(bool v = true) const {
296  monE2HRead(v);
297  info[MISCREG_MON_NS0_RD] = v;
298  return *this;
299  }
300  chain monSecureWrite(bool v = true) const {
301  monE2HWrite(v);
302  info[MISCREG_MON_NS0_WR] = v;
303  return *this;
304  }
305  chain monNonSecureRead(bool v = true) const {
306  monE2HRead(v);
307  info[MISCREG_MON_NS1_RD] = v;
308  return *this;
309  }
310  chain monNonSecureWrite(bool v = true) const {
311  monE2HWrite(v);
312  info[MISCREG_MON_NS1_WR] = v;
313  return *this;
314  }
315  chain mon(bool v = true) const {
316  monSecureRead(v);
317  monSecureWrite(v);
318  monNonSecureRead(v);
319  monNonSecureWrite(v);
320  return *this;
321  }
322  chain monSecure(bool v = true) const {
323  monSecureRead(v);
324  monSecureWrite(v);
325  return *this;
326  }
327  chain monNonSecure(bool v = true) const {
328  monNonSecureRead(v);
329  monNonSecureWrite(v);
330  return *this;
331  }
332  chain allPrivileges(bool v = true) const {
333  userNonSecureRead(v);
334  userNonSecureWrite(v);
335  userSecureRead(v);
336  userSecureWrite(v);
337  privNonSecureRead(v);
338  privNonSecureWrite(v);
339  privSecureRead(v);
340  privSecureWrite(v);
341  hypRead(v);
342  hypWrite(v);
343  monSecureRead(v);
344  monSecureWrite(v);
345  monNonSecureRead(v);
346  monNonSecureWrite(v);
347  return *this;
348  }
349  chain nonSecure(bool v = true) const {
350  userNonSecureRead(v);
351  userNonSecureWrite(v);
352  privNonSecureRead(v);
353  privNonSecureWrite(v);
354  hypRead(v);
355  hypWrite(v);
356  monNonSecureRead(v);
357  monNonSecureWrite(v);
358  return *this;
359  }
360  chain secure(bool v = true) const {
361  userSecureRead(v);
362  userSecureWrite(v);
363  privSecureRead(v);
364  privSecureWrite(v);
365  monSecureRead(v);
366  monSecureWrite(v);
367  return *this;
368  }
369  chain reads(bool v) const {
370  userNonSecureRead(v);
371  userSecureRead(v);
372  privNonSecureRead(v);
373  privSecureRead(v);
374  hypRead(v);
375  monSecureRead(v);
376  monNonSecureRead(v);
377  return *this;
378  }
379  chain writes(bool v) const {
380  userNonSecureWrite(v);
381  userSecureWrite(v);
382  privNonSecureWrite(v);
383  privSecureWrite(v);
384  hypWrite(v);
385  monSecureWrite(v);
386  monNonSecureWrite(v);
387  return *this;
388  }
389  chain exceptUserMode() const {
390  user(0);
391  return *this;
392  }
393  chain highest(ArmSystem *const sys) const;
395  std::bitset<NUM_MISCREG_INFOS> &i)
396  : entry(e),
397  info(i)
398  {
399  // force unimplemented registers to be thusly declared
400  implemented(1);
401  }
402  };
403 
405  return MiscRegLUTEntryInitializer(lookUpMiscReg[reg],
406  miscRegInfo[reg]);
407  }
408 
410 
413 
414  void
415  updateRegMap(CPSR cpsr)
416  {
417  if (cpsr.width == 0) {
418  intRegMap = IntReg64Map;
419  } else {
420  switch (cpsr.mode) {
421  case MODE_USER:
422  case MODE_SYSTEM:
423  intRegMap = IntRegUsrMap;
424  break;
425  case MODE_FIQ:
426  intRegMap = IntRegFiqMap;
427  break;
428  case MODE_IRQ:
429  intRegMap = IntRegIrqMap;
430  break;
431  case MODE_SVC:
432  intRegMap = IntRegSvcMap;
433  break;
434  case MODE_MON:
435  intRegMap = IntRegMonMap;
436  break;
437  case MODE_ABORT:
438  intRegMap = IntRegAbtMap;
439  break;
440  case MODE_HYP:
441  intRegMap = IntRegHypMap;
442  break;
443  case MODE_UNDEFINED:
444  intRegMap = IntRegUndMap;
445  break;
446  default:
447  panic("Unrecognized mode setting in CPSR.\n");
448  }
449  }
450  }
451 
454 
455 
456  private:
457  inline void assert32(ThreadContext *tc) {
458  CPSR cpsr M5_VAR_USED = readMiscReg(MISCREG_CPSR, tc);
459  assert(cpsr.width);
460  }
461 
462  inline void assert64(ThreadContext *tc) {
463  CPSR cpsr M5_VAR_USED = readMiscReg(MISCREG_CPSR, tc);
464  assert(!cpsr.width);
465  }
466 
467  public:
468  void clear();
469 
470  protected:
471  void clear32(const ArmISAParams *p, const SCTLR &sctlr_rst);
472  void clear64(const ArmISAParams *p);
473  void initID32(const ArmISAParams *p);
474  void initID64(const ArmISAParams *p);
475 
476  public:
477  RegVal readMiscRegNoEffect(int misc_reg) const;
478  RegVal readMiscReg(int misc_reg, ThreadContext *tc);
479  void setMiscRegNoEffect(int misc_reg, RegVal val);
480  void setMiscReg(int misc_reg, RegVal val, ThreadContext *tc);
481 
482  RegId
483  flattenRegId(const RegId& regId) const
484  {
485  switch (regId.classValue()) {
486  case IntRegClass:
487  return RegId(IntRegClass, flattenIntIndex(regId.index()));
488  case FloatRegClass:
489  return RegId(FloatRegClass, flattenFloatIndex(regId.index()));
490  case VecRegClass:
491  return RegId(VecRegClass, flattenVecIndex(regId.index()));
492  case VecElemClass:
493  return RegId(VecElemClass, flattenVecElemIndex(regId.index()),
494  regId.elemIndex());
495  case VecPredRegClass:
496  return RegId(VecPredRegClass,
497  flattenVecPredIndex(regId.index()));
498  case CCRegClass:
499  return RegId(CCRegClass, flattenCCIndex(regId.index()));
500  case MiscRegClass:
501  return RegId(MiscRegClass, flattenMiscIndex(regId.index()));
502  }
503  return RegId();
504  }
505 
506  int
507  flattenIntIndex(int reg) const
508  {
509  assert(reg >= 0);
510  if (reg < NUM_ARCH_INTREGS) {
511  return intRegMap[reg];
512  } else if (reg < NUM_INTREGS) {
513  return reg;
514  } else if (reg == INTREG_SPX) {
515  CPSR cpsr = miscRegs[MISCREG_CPSR];
517  (OperatingMode) (uint8_t) cpsr.mode);
518  if (!cpsr.sp && el != EL0)
519  return INTREG_SP0;
520  switch (el) {
521  case EL3:
522  return INTREG_SP3;
523  case EL2:
524  return INTREG_SP2;
525  case EL1:
526  return INTREG_SP1;
527  case EL0:
528  return INTREG_SP0;
529  default:
530  panic("Invalid exception level");
531  return 0; // Never happens.
532  }
533  } else {
534  return flattenIntRegModeIndex(reg);
535  }
536  }
537 
538  int
540  {
541  assert(reg >= 0);
542  return reg;
543  }
544 
545  int
546  flattenVecIndex(int reg) const
547  {
548  assert(reg >= 0);
549  return reg;
550  }
551 
552  int
554  {
555  assert(reg >= 0);
556  return reg;
557  }
558 
559  int
561  {
562  assert(reg >= 0);
563  return reg;
564  }
565 
566  int
567  flattenCCIndex(int reg) const
568  {
569  assert(reg >= 0);
570  return reg;
571  }
572 
573  int
575  {
576  assert(reg >= 0);
577  int flat_idx = reg;
578 
579  if (reg == MISCREG_SPSR) {
580  CPSR cpsr = miscRegs[MISCREG_CPSR];
581  switch (cpsr.mode) {
582  case MODE_EL0T:
583  warn("User mode does not have SPSR\n");
584  flat_idx = MISCREG_SPSR;
585  break;
586  case MODE_EL1T:
587  case MODE_EL1H:
588  flat_idx = MISCREG_SPSR_EL1;
589  break;
590  case MODE_EL2T:
591  case MODE_EL2H:
592  flat_idx = MISCREG_SPSR_EL2;
593  break;
594  case MODE_EL3T:
595  case MODE_EL3H:
596  flat_idx = MISCREG_SPSR_EL3;
597  break;
598  case MODE_USER:
599  warn("User mode does not have SPSR\n");
600  flat_idx = MISCREG_SPSR;
601  break;
602  case MODE_FIQ:
603  flat_idx = MISCREG_SPSR_FIQ;
604  break;
605  case MODE_IRQ:
606  flat_idx = MISCREG_SPSR_IRQ;
607  break;
608  case MODE_SVC:
609  flat_idx = MISCREG_SPSR_SVC;
610  break;
611  case MODE_MON:
612  flat_idx = MISCREG_SPSR_MON;
613  break;
614  case MODE_ABORT:
615  flat_idx = MISCREG_SPSR_ABT;
616  break;
617  case MODE_HYP:
618  flat_idx = MISCREG_SPSR_HYP;
619  break;
620  case MODE_UNDEFINED:
621  flat_idx = MISCREG_SPSR_UND;
622  break;
623  default:
624  warn("Trying to access SPSR in an invalid mode: %d\n",
625  cpsr.mode);
626  flat_idx = MISCREG_SPSR;
627  break;
628  }
629  } else if (miscRegInfo[reg][MISCREG_MUTEX]) {
630  // Mutually exclusive CP15 register
631  switch (reg) {
632  case MISCREG_PRRR_MAIR0:
635  {
636  TTBCR ttbcr = readMiscRegNoEffect(MISCREG_TTBCR);
637  // If the muxed reg has been flattened, work out the
638  // offset and apply it to the unmuxed reg
639  int idxOffset = reg - MISCREG_PRRR_MAIR0;
640  if (ttbcr.eae)
641  flat_idx = flattenMiscIndex(MISCREG_MAIR0 +
642  idxOffset);
643  else
644  flat_idx = flattenMiscIndex(MISCREG_PRRR +
645  idxOffset);
646  }
647  break;
648  case MISCREG_NMRR_MAIR1:
651  {
652  TTBCR ttbcr = readMiscRegNoEffect(MISCREG_TTBCR);
653  // If the muxed reg has been flattened, work out the
654  // offset and apply it to the unmuxed reg
655  int idxOffset = reg - MISCREG_NMRR_MAIR1;
656  if (ttbcr.eae)
657  flat_idx = flattenMiscIndex(MISCREG_MAIR1 +
658  idxOffset);
659  else
660  flat_idx = flattenMiscIndex(MISCREG_NMRR +
661  idxOffset);
662  }
663  break;
665  {
666  PMSELR pmselr = miscRegs[MISCREG_PMSELR];
667  if (pmselr.sel == 31)
669  else
671  }
672  break;
673  default:
674  panic("Unrecognized misc. register.\n");
675  break;
676  }
677  } else {
678  if (miscRegInfo[reg][MISCREG_BANKED]) {
679  bool secureReg = haveSecurity && !highestELIs64 &&
680  inSecureState(miscRegs[MISCREG_SCR],
681  miscRegs[MISCREG_CPSR]);
682  flat_idx += secureReg ? 2 : 1;
683  } else {
684  flat_idx = snsBankedIndex64((MiscRegIndex)reg,
685  !inSecureState(miscRegs[MISCREG_SCR],
686  miscRegs[MISCREG_CPSR]));
687  }
688  }
689  return flat_idx;
690  }
691 
692  int
694  {
695  int reg_as_int = static_cast<int>(reg);
696  if (miscRegInfo[reg][MISCREG_BANKED64]) {
697  reg_as_int += (haveSecurity && !ns) ? 2 : 1;
698  }
699  return reg_as_int;
700  }
701 
702  std::pair<int,int> getMiscIndices(int misc_reg) const
703  {
704  // Note: indexes of AArch64 registers are left unchanged
705  int flat_idx = flattenMiscIndex(misc_reg);
706 
707  if (lookUpMiscReg[flat_idx].lower == 0) {
708  return std::make_pair(flat_idx, 0);
709  }
710 
711  // do additional S/NS flattenings if mapped to NS while in S
712  bool S = haveSecurity && !highestELIs64 &&
713  inSecureState(miscRegs[MISCREG_SCR],
714  miscRegs[MISCREG_CPSR]);
715  int lower = lookUpMiscReg[flat_idx].lower;
716  int upper = lookUpMiscReg[flat_idx].upper;
717  // upper == 0, which is CPSR, is not MISCREG_BANKED_CHILD (no-op)
718  lower += S && miscRegInfo[lower][MISCREG_BANKED_CHILD];
719  upper += S && miscRegInfo[upper][MISCREG_BANKED_CHILD];
720  return std::make_pair(lower, upper);
721  }
722 
723  unsigned getCurSveVecLenInBits(ThreadContext *tc) const;
724 
725  unsigned getCurSveVecLenInBitsAtReset() const { return sveVL * 128; }
726 
727  static void zeroSveVecRegUpperPart(VecRegContainer &vc,
728  unsigned eCount);
729 
730  void
732  {
733  DPRINTF(Checkpoint, "Serializing Arm Misc Registers\n");
735  }
736 
737  void
739  {
740  DPRINTF(Checkpoint, "Unserializing Arm Misc Registers\n");
742  CPSR tmp_cpsr = miscRegs[MISCREG_CPSR];
743  updateRegMap(tmp_cpsr);
744  }
745 
746  void startup(ThreadContext *tc);
747 
748  Enums::DecoderFlavour decoderFlavour() const { return _decoderFlavour; }
749 
751  bool haveGICv3CpuIfc() const
752  {
753  // haveGICv3CPUInterface is initialized at startup time, hence
754  // trying to read its value before the startup stage will lead
755  // to an error
756  assert(afterStartup);
757  return haveGICv3CPUInterface;
758  }
759 
760  Enums::VecRegRenameMode
762  {
763  return _vecRegRenameMode;
764  }
765 
767  using BaseISA::startup;
768 
769  typedef ArmISAParams Params;
770 
771  const Params *params() const;
772 
773  ISA(Params *p);
774  };
775 }
776 
777 template<>
779 {
780  static Enums::VecRegRenameMode
781  init(const ArmISA::ISA* isa)
782  {
783  return isa->vecRegRenameMode();
784  }
785 
786  static Enums::VecRegRenameMode
788  {
789  if (pc.aarch64()) {
790  return Enums::Full;
791  } else {
792  return Enums::Elem;
793  }
794  }
795 
796  static bool
797  equalsInit(const ArmISA::ISA* isa1, const ArmISA::ISA* isa2)
798  {
799  return init(isa1) == init(isa2);
800  }
801 };
802 
803 #endif
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:167
#define DPRINTF(x,...)
Definition: trace.hh:229
const IntRegMap IntRegSvcMap
Definition: intregs.hh:353
chain secure(bool v=true) const
Definition: isa.hh:360
bool haveLPAE
Definition: isa.hh:92
std::bitset< NUM_MISCREG_INFOS > & info
Definition: isa.hh:140
MiscRegIndex
Definition: miscregs.hh:57
unsigned sveVL
SVE vector length in quadwords.
Definition: isa.hh:103
bitset< NUM_MISCREG_INFOS > miscRegInfo[NUM_MISCREGS]
Definition: miscregs.cc:2888
BaseISADevice & getGenericTimer(ThreadContext *tc)
Definition: isa.cc:2108
Bitfield< 5, 3 > reg
Definition: types.hh:89
Bitfield< 28 > v
bool haveGICv3CPUInterface
Definition: isa.hh:96
IntRegIndex
Definition: intregs.hh:53
ArmSystem * system
Definition: isa.hh:71
chain allPrivileges(bool v=true) const
Definition: isa.hh:332
Floating-point register.
Definition: reg_class.hh:58
const MiscRegLUTEntryInitializer InitReg(uint32_t reg)
Definition: isa.hh:404
Bitfield< 7 > i
chain monNonSecureRead(bool v=true) const
Definition: isa.hh:305
STL pair class.
Definition: stl.hh:61
void clear32(const ArmISAParams *p, const SCTLR &sctlr_rst)
Definition: isa.cc:213
chain userSecureRead(bool v=true) const
Definition: isa.hh:203
Vector Register Abstraction This generic class is the model in a particularization of MVC...
Definition: vec_reg.hh:160
struct MiscRegLUTEntry & entry
Definition: isa.hh:139
Control (misc) register.
Definition: reg_class.hh:65
chain hypE2HWrite(bool v=true) const
Definition: isa.hh:258
const IntRegMap IntReg64Map
Definition: intregs.hh:306
RegVal readMiscRegNoEffect(int misc_reg) const
Definition: isa.cc:437
Enums::VecRegRenameMode vecRegRenameMode() const
Definition: isa.hh:761
void unserialize(CheckpointIn &cp)
Unserialize an object.
Definition: isa.hh:738
chain userNonSecureRead(bool v=true) const
Definition: isa.hh:195
static Enums::VecRegRenameMode mode(const ArmISA::PCState &pc)
Definition: isa.hh:787
chain res0(uint64_t mask) const
Definition: isa.hh:148
uint64_t rao() const
Definition: isa.hh:130
OperatingMode
Definition: types.hh:592
Base class for devices that use the MiscReg interfaces.
Definition: isa_device.hh:60
chain privSecure(bool v=true) const
Definition: isa.hh:239
int flattenIntIndex(int reg) const
Definition: isa.hh:507
bool haveSecurity
Definition: isa.hh:91
uint64_t RegVal
Definition: types.hh:168
RegId flattenRegId(const RegId &regId) const
Definition: isa.hh:483
void serialize(CheckpointOut &cp) const
Serialize an object.
Definition: isa.hh:731
MiscRegLUTEntryInitializer(struct MiscRegLUTEntry &e, std::bitset< NUM_MISCREG_INFOS > &i)
Definition: isa.hh:394
Dummy device that prints a warning when it is accessed.
Definition: isa_device.hh:96
Definition: ccregs.hh:42
MiscReg metadata.
Definition: isa.hh:114
uint8_t physAddrRange
Definition: isa.hh:97
static std::vector< struct MiscRegLUTEntry > lookUpMiscReg
Metadata table accessible via the value of the register.
Definition: isa.hh:136
Definition: cprintf.cc:42
const MiscRegLUTEntryInitializer & chain
Definition: isa.hh:141
chain hypRead(bool v=true) const
Definition: isa.hh:267
void clear64(const ArmISAParams *p)
Definition: isa.cc:265
const int NumMiscRegs
Definition: registers.hh:87
bool haveGICv3CpuIfc() const
Getter for haveGICv3CPUInterface.
Definition: isa.hh:751
const IntRegMap IntRegHypMap
Definition: intregs.hh:335
ThreadContext is the external interface to all thread state for anything outside of the CPU...
unsigned getCurSveVecLenInBits(ThreadContext *tc) const
Definition: isa.cc:2136
chain privSecureRead(bool v=true) const
Definition: isa.hh:231
STL vector class.
Definition: stl.hh:40
bool havePAN
Definition: isa.hh:100
Bitfield< 63 > val
Definition: misc.hh:771
ExceptionLevel
Definition: types.hh:585
chain banked64(bool v=true) const
Definition: isa.hh:187
void setMiscRegNoEffect(int misc_reg, RegVal val)
Definition: isa.cc:768
int flattenCCIndex(int reg) const
Definition: isa.hh:567
chain monE2H(bool v=true) const
Definition: isa.hh:290
int flattenMiscIndex(int reg) const
Definition: isa.hh:574
ISA(Params *p)
Definition: isa.cc:64
const RegIndex & elemIndex() const
Elem accessor.
Definition: reg_class.hh:204
const IntRegMap IntRegFiqMap
Definition: intregs.hh:443
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: sim_object.cc:76
Bitfield< 0 > ns
chain banked(bool v=true) const
Definition: isa.hh:183
Vector Register Native Elem lane.
Definition: reg_class.hh:62
chain hypWrite(bool v=true) const
Definition: isa.hh:272
chain user(bool v=true) const
Definition: isa.hh:211
Bitfield< 3, 2 > el
Bitfield< 4 > pc
int flattenVecIndex(int reg) const
Definition: isa.hh:546
int snsBankedIndex64(MiscRegIndex reg, bool ns) const
Definition: isa.hh:693
void initializeMiscRegMetadata()
Definition: miscregs.cc:2891
Bitfield< 22 > u
bool impdefAsNop
If true, accesses to IMPLEMENTATION DEFINED registers are treated as NOP hence not causing UNDEFINED ...
Definition: isa.hh:109
unsigned getCurSveVecLenInBitsAtReset() const
Definition: isa.hh:725
const Enums::VecRegRenameMode _vecRegRenameMode
Definition: isa.hh:75
RegVal miscRegs[NumMiscRegs]
Definition: isa.hh:411
void initID64(const ArmISAParams *p)
Definition: isa.cc:350
chain bankedChild(bool v=true) const
Definition: isa.hh:191
Condition-code register.
Definition: reg_class.hh:64
chain monNonSecure(bool v=true) const
Definition: isa.hh:327
static ExceptionLevel opModeToEL(OperatingMode mode)
Definition: types.hh:690
chain mutex(bool v=true) const
Definition: isa.hh:179
bool haveVirtualization
Definition: isa.hh:93
#define SERIALIZE_ARRAY(member, size)
Definition: serialize.hh:658
std::pair< int, int > getMiscIndices(int misc_reg) const
Definition: isa.hh:702
BaseISADevice & getGICv3CPUInterface(ThreadContext *tc)
Definition: isa.cc:2129
chain privNonSecureRead(bool v=true) const
Definition: isa.hh:218
uint64_t res0() const
Definition: isa.hh:127
const IntRegMap IntRegUndMap
Definition: intregs.hh:407
chain hyp(bool v=true) const
Definition: isa.hh:277
int flattenFloatIndex(int reg) const
Definition: isa.hh:539
chain unverifiable(bool v=true) const
Definition: isa.hh:171
chain monNonSecureWrite(bool v=true) const
Definition: isa.hh:310
bool haveCrypto
Definition: isa.hh:94
const IntRegMap IntRegAbtMap
Definition: intregs.hh:389
std::unique_ptr< BaseISADevice > timer
Definition: isa.hh:84
std::unique_ptr< BaseISADevice > gicv3CpuInterface
Definition: isa.hh:87
bool highestELIs64
Definition: isa.hh:90
chain priv(bool v=true) const
Definition: isa.hh:244
static int flattenIntRegModeIndex(int reg)
Definition: intregs.hh:471
bool haveLSE
Definition: isa.hh:99
void initID32(const ArmISAParams *p)
Definition: isa.cc:314
uint64_t raz() const
Definition: isa.hh:129
const IntRegIndex * intRegMap
Definition: isa.hh:412
#define UNSERIALIZE_ARRAY(member, size)
Definition: serialize.hh:661
chain privNonSecure(bool v=true) const
Definition: isa.hh:226
chain implemented(bool v=true) const
Definition: isa.hh:164
Bitfield< 9 > e
chain userNonSecureWrite(bool v=true) const
Definition: isa.hh:199
void assert32(ThreadContext *tc)
Definition: isa.hh:457
const Params * params() const
Definition: isa.cc:120
chain privRead(bool v=true) const
Definition: isa.hh:249
DummyISADevice dummyDevice
Dummy device for to handle non-existing ISA devices.
Definition: isa.hh:78
const IntRegMap IntRegUsrMap
Definition: intregs.hh:317
void clear()
Definition: isa.cc:126
bool haveLargeAsid64
Definition: isa.hh:95
Enums::DecoderFlavour decoderFlavour() const
Definition: isa.hh:748
chain nonSecure(bool v=true) const
Definition: isa.hh:349
const IntRegMap IntRegMonMap
Definition: intregs.hh:371
chain rao(uint64_t mask) const
Definition: isa.hh:160
std::ostream CheckpointOut
Definition: serialize.hh:68
bool afterStartup
Definition: isa.hh:111
GenericISA::SimplePCState< MachInst > PCState
Definition: types.hh:43
chain res1(uint64_t mask) const
Definition: isa.hh:152
chain monSecure(bool v=true) const
Definition: isa.hh:322
const RegClass & classValue() const
Class accessor.
Definition: reg_class.hh:206
void setMiscReg(int misc_reg, RegVal val, ThreadContext *tc)
Definition: isa.cc:790
int flattenVecElemIndex(int reg) const
Definition: isa.hh:553
bool haveSVE
Definition: isa.hh:98
chain monSecureWrite(bool v=true) const
Definition: isa.hh:300
Helper structure to get the vector register mode for a given ISA.
Definition: traits.hh:54
const RegIndex & index() const
Index accessors.
Definition: reg_class.hh:179
const Enums::DecoderFlavour _decoderFlavour
Definition: isa.hh:74
chain privSecureWrite(bool v=true) const
Definition: isa.hh:235
uint64_t wi() const
Definition: isa.hh:132
BaseISADevice * pmu
Definition: isa.hh:81
chain raz(uint64_t mask) const
Definition: isa.hh:156
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:79
Integer register.
Definition: reg_class.hh:57
void assert64(ThreadContext *tc)
Definition: isa.hh:462
Bitfield< 3, 0 > mask
Definition: types.hh:64
Definition: isa.hh:35
chain monE2HWrite(bool v=true) const
Definition: isa.hh:286
Vector Register.
Definition: reg_class.hh:60
#define warn(...)
Definition: logging.hh:212
chain hypE2H(bool v=true) const
Definition: isa.hh:262
ArmISAParams Params
Definition: isa.hh:769
int flattenVecPredIndex(int reg) const
Definition: isa.hh:560
static Enums::VecRegRenameMode init(const ArmISA::ISA *isa)
Definition: isa.hh:781
chain warnNotFail(bool v=true) const
Definition: isa.hh:175
RegVal readMiscReg(int misc_reg, ThreadContext *tc)
Definition: isa.cc:461
bool inSecureState(ThreadContext *tc)
Definition: utility.cc:195
static const int NumArgumentRegs M5_VAR_USED
Definition: process.cc:84
chain monSecureRead(bool v=true) const
Definition: isa.hh:295
chain privNonSecureWrite(bool v=true) const
Definition: isa.hh:222
Bitfield< 0 > p
chain userSecureWrite(bool v=true) const
Definition: isa.hh:207
const IntRegMap IntRegIrqMap
Definition: intregs.hh:425
void updateRegMap(CPSR cpsr)
Definition: isa.hh:415
chain hypE2HRead(bool v=true) const
Definition: isa.hh:254
Bitfield< 5 > l
static void zeroSveVecRegUpperPart(VecRegContainer &vc, unsigned eCount)
Definition: isa.cc:2180
chain mapsTo(uint32_t l, uint32_t u=0) const
Definition: isa.hh:143
uint64_t res1() const
Definition: isa.hh:128
chain monE2HRead(bool v=true) const
Definition: isa.hh:282
chain mon(bool v=true) const
Definition: isa.hh:315
uint64_t reset() const
Definition: isa.hh:126
chain writes(bool v) const
Definition: isa.hh:379
static bool equalsInit(const ArmISA::ISA *isa1, const ArmISA::ISA *isa2)
Definition: isa.hh:797
virtual void startup()
startup() is the final initialization call before simulation.
Definition: sim_object.cc:99

Generated on Fri Feb 28 2020 16:26:56 for gem5 by doxygen 1.8.13