gem5  v22.1.0.0
misc.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, 2012-2013, 2017-2018, 2021 Arm Limited
3  * Copyright (c) 2013 Advanced Micro Devices, Inc.
4  * All rights reserved
5  *
6  * The license below extends only to copyright in the software and shall
7  * not be construed as granting a license to any other intellectual
8  * property including but not limited to intellectual property relating
9  * to a hardware implementation of the functionality of the software
10  * licensed hereunder. You may use the software subject to the license
11  * terms below provided that you ensure that this notice is replicated
12  * unmodified and in its entirety in all distributions of the software,
13  * modified or unmodified, in source code or in binary form.
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions are
17  * met: redistributions of source code must retain the above copyright
18  * notice, this list of conditions and the following disclaimer;
19  * redistributions in binary form must reproduce the above copyright
20  * notice, this list of conditions and the following disclaimer in the
21  * documentation and/or other materials provided with the distribution;
22  * neither the name of the copyright holders nor the names of its
23  * contributors may be used to endorse or promote products derived from
24  * this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 #include "arch/arm/insts/misc.hh"
40 #include "arch/arm/tlbi_op.hh"
41 
42 #include "cpu/reg_class.hh"
43 
44 namespace gem5
45 {
46 
47 using namespace ArmISA;
48 
49 std::string
51 {
52  std::stringstream ss;
53  printMnemonic(ss);
54  printIntReg(ss, dest);
55  ss << ", ";
56  bool foundPsr = false;
57  for (unsigned i = 0; i < numSrcRegs(); i++) {
58  const RegId& reg = srcRegIdx(i);
59  if (!reg.is(MiscRegClass)) {
60  continue;
61  }
62  if (reg.index() == MISCREG_CPSR) {
63  ss << "cpsr";
64  foundPsr = true;
65  break;
66  }
67  if (reg.index() == MISCREG_SPSR) {
68  ss << "spsr";
69  foundPsr = true;
70  break;
71  }
72  }
73  if (!foundPsr) {
74  ss << "????";
75  }
76  return ss.str();
77 }
78 
79 void
80 MsrBase::printMsrBase(std::ostream &os) const
81 {
82  printMnemonic(os);
83  bool apsr = false;
84  bool foundPsr = false;
85  for (unsigned i = 0; i < numDestRegs(); i++) {
86  const RegId& reg = destRegIdx(i);
87  if (!reg.is(MiscRegClass)) {
88  continue;
89  }
90  if (reg.index() == MISCREG_CPSR) {
91  os << "cpsr_";
92  foundPsr = true;
93  break;
94  }
95  if (reg.index() == MISCREG_SPSR) {
96  if (bits(byteMask, 1, 0)) {
97  os << "spsr_";
98  } else {
99  os << "apsr_";
100  apsr = true;
101  }
102  foundPsr = true;
103  break;
104  }
105  }
106  if (!foundPsr) {
107  os << "????";
108  return;
109  }
110  if (bits(byteMask, 3)) {
111  if (apsr) {
112  os << "nzcvq";
113  } else {
114  os << "f";
115  }
116  }
117  if (bits(byteMask, 2)) {
118  if (apsr) {
119  os << "g";
120  } else {
121  os << "s";
122  }
123  }
124  if (bits(byteMask, 1)) {
125  os << "x";
126  }
127  if (bits(byteMask, 0)) {
128  os << "c";
129  }
130 }
131 
132 std::string
134 {
135  std::stringstream ss;
136  printMsrBase(ss);
137  ccprintf(ss, ", #%#x", imm);
138  return ss.str();
139 }
140 
141 std::string
143 {
144  std::stringstream ss;
145  printMsrBase(ss);
146  ss << ", ";
147  printIntReg(ss, op1);
148  return ss.str();
149 }
150 
151 std::string
153 {
154  std::stringstream ss;
155  printMnemonic(ss);
156  printIntReg(ss, dest);
157  ss << ", ";
158  printIntReg(ss, dest2);
159  ss << ", ";
160  printMiscReg(ss, op1);
161  return ss.str();
162 }
163 
164 std::string
166 {
167  std::stringstream ss;
168  printMnemonic(ss);
169  printMiscReg(ss, dest);
170  ss << ", ";
171  printIntReg(ss, op1);
172  ss << ", ";
173  printIntReg(ss, op2);
174  return ss.str();
175 }
176 
177 std::string
179 {
180  std::stringstream ss;
181  printMnemonic(ss);
182  ccprintf(ss, "#%d", imm);
183  return ss.str();
184 }
185 
186 std::string
188 {
189  std::stringstream ss;
190  printMnemonic(ss);
191  printIntReg(ss, dest);
192  ccprintf(ss, ", #%d", imm);
193  return ss.str();
194 }
195 
196 std::string
198 {
199  std::stringstream ss;
200  printMnemonic(ss);
201  printIntReg(ss, dest);
202  ss << ", ";
203  printIntReg(ss, op1);
204  return ss.str();
205 }
206 
207 std::string
209 {
210  std::stringstream ss;
211  printMnemonic(ss);
212  printIntReg(ss, dest);
213  return ss.str();
214 }
215 
216 std::string
218  Addr pc, const loader::SymbolTable *symtab) const
219 {
220  std::stringstream ss;
221  printMnemonic(ss);
222  printIntReg(ss, dest);
223  ss << ", ";
224  printIntReg(ss, op1);
225  ss << ", ";
226  printIntReg(ss, op2);
227  ccprintf(ss, ", #%d", imm);
228  return ss.str();
229 }
230 
231 std::string
233  Addr pc, const loader::SymbolTable *symtab) const
234 {
235  std::stringstream ss;
236  printMnemonic(ss);
237  printIntReg(ss, dest);
238  ss << ", ";
239  printIntReg(ss, op1);
240  ss << ", ";
241  printIntReg(ss, op2);
242  ss << ", ";
243  printIntReg(ss, op3);
244  return ss.str();
245 }
246 
247 std::string
249  Addr pc, const loader::SymbolTable *symtab) const
250 {
251  std::stringstream ss;
252  printMnemonic(ss);
253  printIntReg(ss, dest);
254  ss << ", ";
255  printIntReg(ss, op1);
256  ss << ", ";
257  printIntReg(ss, op2);
258  return ss.str();
259 }
260 
261 std::string
263  Addr pc, const loader::SymbolTable *symtab) const
264 {
265  std::stringstream ss;
266  printMnemonic(ss);
267  printIntReg(ss, dest);
268  ss << ", ";
269  printIntReg(ss, op1);
270  ccprintf(ss, ", #%d", imm);
271  return ss.str();
272 }
273 
274 std::string
276  Addr pc, const loader::SymbolTable *symtab) const
277 {
278  std::stringstream ss;
279  printMnemonic(ss);
280  printMiscReg(ss, dest);
281  ss << ", ";
282  printIntReg(ss, op1);
283  return ss.str();
284 }
285 
286 std::string
288  Addr pc, const loader::SymbolTable *symtab) const
289 {
290  std::stringstream ss;
291  printMnemonic(ss);
292  printIntReg(ss, dest);
293  ss << ", ";
294  printMiscReg(ss, op1);
295  return ss.str();
296 }
297 
298 std::string
300  Addr pc, const loader::SymbolTable *symtab) const
301 {
302  std::stringstream ss;
303  printMnemonic(ss);
304  printIntReg(ss, dest);
305  ccprintf(ss, ", #%d, #%d", imm1, imm2);
306  return ss.str();
307 }
308 
309 std::string
311  Addr pc, const loader::SymbolTable *symtab) const
312 {
313  std::stringstream ss;
314  printMnemonic(ss);
315  printIntReg(ss, dest);
316  ss << ", ";
317  printIntReg(ss, op1);
318  ccprintf(ss, ", #%d, #%d", imm1, imm2);
319  return ss.str();
320 }
321 
322 std::string
324  Addr pc, const loader::SymbolTable *symtab) const
325 {
326  std::stringstream ss;
327  printMnemonic(ss);
328  printIntReg(ss, dest);
329  ccprintf(ss, ", #%d, ", imm);
330  printIntReg(ss, op1);
331  return ss.str();
332 }
333 
334 std::string
336  Addr pc, const loader::SymbolTable *symtab) const
337 {
338  std::stringstream ss;
339  printMnemonic(ss);
340  printIntReg(ss, dest);
341  ccprintf(ss, ", #%d, ", imm);
342  printShiftOperand(ss, op1, true, shiftAmt, int_reg::Zero, shiftType);
343  printIntReg(ss, op1);
344  return ss.str();
345 }
346 
347 std::string
349  Addr pc, const loader::SymbolTable *symtab) const
350 {
351  return csprintf("%-10s (inst %#08x)", "unknown", encoding());
352 }
353 
354 McrMrcMiscInst::McrMrcMiscInst(const char *_mnemonic, ExtMachInst _machInst,
355  uint64_t _iss, MiscRegIndex _miscReg)
356  : ArmStaticInst(_mnemonic, _machInst, No_OpClass)
357 {
358  flags[IsNonSpeculative] = true;
359  iss = _iss;
360  miscReg = _miscReg;
361 }
362 
363 Fault
365 {
366  return mcrMrc15Trap(miscReg, machInst, xc->tcBase(), iss);
367 }
368 
369 std::string
371  Addr pc, const loader::SymbolTable *symtab) const
372 {
373  return csprintf("%-10s (pipe flush)", mnemonic);
374 }
375 
377  ExtMachInst _machInst, uint64_t _iss,
378  MiscRegIndex _miscReg)
379  : McrMrcMiscInst(_mnemonic, _machInst, _iss, _miscReg)
380 {}
381 
382 Fault
384 {
385  Fault fault = mcrMrc15Trap(miscReg, machInst, xc->tcBase(), iss);
386  if (fault != NoFault) {
387  return fault;
388  } else {
389  return std::make_shared<UndefinedInstruction>(machInst, false,
390  mnemonic);
391  }
392 }
393 
394 std::string
396  Addr pc, const loader::SymbolTable *symtab) const
397 {
398  return csprintf("%-10s (implementation defined)", mnemonic);
399 }
400 
401 void
403 {
404  ThreadContext* tc = xc->tcBase();
405  auto isa = static_cast<ArmISA::ISA *>(tc->getIsaPtr());
406  auto release = isa->getRelease();
407 
408  switch (dest_idx) {
409  case MISCREG_TLBIALL: // TLBI all entries, EL0&1,
410  {
411  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
412 
413  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
414  TLBIALL tlbiOp(EL1, secure);
415  tlbiOp(tc);
416  return;
417  }
418  // TLB Invalidate All, Inner Shareable
419  case MISCREG_TLBIALLIS:
420  {
421  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
422 
423  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
424  TLBIALL tlbiOp(EL1, secure);
425  tlbiOp.broadcast(tc);
426  return;
427  }
428  // Instruction TLB Invalidate All
429  case MISCREG_ITLBIALL:
430  {
431  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
432 
433  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
434  ITLBIALL tlbiOp(EL1, secure);
435  tlbiOp(tc);
436  return;
437  }
438  // Data TLB Invalidate All
439  case MISCREG_DTLBIALL:
440  {
441  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
442 
443  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
444  DTLBIALL tlbiOp(EL1, secure);
445  tlbiOp(tc);
446  return;
447  }
448  // TLB Invalidate by VA
449  case MISCREG_TLBIMVA:
450  {
451  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
452 
453  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
454  TLBIMVA tlbiOp(EL1,
455  secure,
456  mbits(value, 31, 12),
457  bits(value, 7, 0),
458  false);
459 
460  tlbiOp(tc);
461  return;
462  }
463  // TLB Invalidate by VA, Last Level
464  case MISCREG_TLBIMVAL:
465  {
466  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
467 
468  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
469  TLBIMVA tlbiOp(EL1,
470  secure,
471  mbits(value, 31, 12),
472  bits(value, 7, 0),
473  true);
474 
475  tlbiOp(tc);
476  return;
477  }
478  // TLB Invalidate by VA, Inner Shareable
479  case MISCREG_TLBIMVAIS:
480  {
481  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
482 
483  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
484  TLBIMVA tlbiOp(EL1,
485  secure,
486  mbits(value, 31, 12),
487  bits(value, 7, 0),
488  false);
489 
490  tlbiOp.broadcast(tc);
491  return;
492  }
493  // TLB Invalidate by VA, Last Level, Inner Shareable
494  case MISCREG_TLBIMVALIS:
495  {
496  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
497 
498  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
499  TLBIMVA tlbiOp(EL1,
500  secure,
501  mbits(value, 31, 12),
502  bits(value, 7, 0),
503  true);
504 
505  tlbiOp.broadcast(tc);
506  return;
507  }
508  // TLB Invalidate by ASID match
509  case MISCREG_TLBIASID:
510  {
511  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
512 
513  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
514  TLBIASID tlbiOp(EL1,
515  secure,
516  bits(value, 7, 0));
517 
518  tlbiOp(tc);
519  return;
520  }
521  // TLB Invalidate by ASID match, Inner Shareable
522  case MISCREG_TLBIASIDIS:
523  {
524  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
525 
526  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
527  TLBIASID tlbiOp(EL1,
528  secure,
529  bits(value, 7, 0));
530 
531  tlbiOp.broadcast(tc);
532  return;
533  }
534  // TLB Invalidate by VA, All ASID
535  case MISCREG_TLBIMVAA:
536  {
537  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
538 
539  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
540  TLBIMVAA tlbiOp(EL1, secure,
541  mbits(value, 31, 12), false);
542 
543  tlbiOp(tc);
544  return;
545  }
546  // TLB Invalidate by VA, Last Level, All ASID
547  case MISCREG_TLBIMVAAL:
548  {
549  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
550 
551  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
552  TLBIMVAA tlbiOp(EL1, secure,
553  mbits(value, 31, 12), true);
554 
555  tlbiOp(tc);
556  return;
557  }
558  // TLB Invalidate by VA, All ASID, Inner Shareable
559  case MISCREG_TLBIMVAAIS:
560  {
561  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
562 
563  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
564  TLBIMVAA tlbiOp(EL1, secure,
565  mbits(value, 31, 12), false);
566 
567  tlbiOp.broadcast(tc);
568  return;
569  }
570  // TLB Invalidate by VA, All ASID, Last Level, Inner Shareable
571  case MISCREG_TLBIMVAALIS:
572  {
573  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
574 
575  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
576  TLBIMVAA tlbiOp(EL1, secure,
577  mbits(value, 31, 12), true);
578 
579  tlbiOp.broadcast(tc);
580  return;
581  }
582  // TLB Invalidate by VA, Hyp mode
583  case MISCREG_TLBIMVAH:
584  {
585  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
586 
587  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
588  TLBIMVAA tlbiOp(EL2, secure,
589  mbits(value, 31, 12), false);
590 
591  tlbiOp(tc);
592  return;
593  }
594  // TLB Invalidate by VA, Last Level, Hyp mode
595  case MISCREG_TLBIMVALH:
596  {
597  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
598 
599  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
600  TLBIMVAA tlbiOp(EL2, secure,
601  mbits(value, 31, 12), true);
602 
603  tlbiOp(tc);
604  return;
605  }
606  // TLB Invalidate by VA, Hyp mode, Inner Shareable
607  case MISCREG_TLBIMVAHIS:
608  {
609  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
610 
611  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
612  TLBIMVAA tlbiOp(EL2, secure,
613  mbits(value, 31, 12), false);
614 
615  tlbiOp.broadcast(tc);
616  return;
617  }
618  // TLB Invalidate by VA, Hyp mode, Last Level, Inner Shareable
619  case MISCREG_TLBIMVALHIS:
620  {
621  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
622 
623  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
624  TLBIMVAA tlbiOp(EL2, secure,
625  mbits(value, 31, 12), true);
626 
627  tlbiOp.broadcast(tc);
628  return;
629  }
630  // TLB Invalidate by Intermediate Physical Address, Stage 2
631  case MISCREG_TLBIIPAS2:
632  {
633  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
634 
635  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
636  TLBIIPA tlbiOp(EL1,
637  secure,
638  static_cast<Addr>(bits(value, 35, 0)) << 12,
639  false);
640 
641  tlbiOp(tc);
642  return;
643  }
644  // TLB Invalidate by Intermediate Physical Address, Stage 2,
645  // Last Level
646  case MISCREG_TLBIIPAS2L:
647  {
648  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
649 
650  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
651  TLBIIPA tlbiOp(EL1,
652  secure,
653  static_cast<Addr>(bits(value, 35, 0)) << 12,
654  true);
655 
656  tlbiOp(tc);
657  return;
658  }
659  // TLB Invalidate by Intermediate Physical Address, Stage 2,
660  // Inner Shareable
661  case MISCREG_TLBIIPAS2IS:
662  {
663  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
664 
665  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
666  TLBIIPA tlbiOp(EL1,
667  secure,
668  static_cast<Addr>(bits(value, 35, 0)) << 12,
669  false);
670 
671  tlbiOp.broadcast(tc);
672  return;
673  }
674  // TLB Invalidate by Intermediate Physical Address, Stage 2,
675  // Last Level, Inner Shareable
677  {
678  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
679 
680  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
681  TLBIIPA tlbiOp(EL1,
682  secure,
683  static_cast<Addr>(bits(value, 35, 0)) << 12,
684  true);
685 
686  tlbiOp.broadcast(tc);
687  return;
688  }
689  // Instruction TLB Invalidate by VA
690  case MISCREG_ITLBIMVA:
691  {
692  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
693 
694  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
695  ITLBIMVA tlbiOp(EL1,
696  secure,
697  mbits(value, 31, 12),
698  bits(value, 7, 0));
699 
700  tlbiOp(tc);
701  return;
702  }
703  // Data TLB Invalidate by VA
704  case MISCREG_DTLBIMVA:
705  {
706  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
707 
708  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
709  DTLBIMVA tlbiOp(EL1,
710  secure,
711  mbits(value, 31, 12),
712  bits(value, 7, 0));
713 
714  tlbiOp(tc);
715  return;
716  }
717  // Instruction TLB Invalidate by ASID match
718  case MISCREG_ITLBIASID:
719  {
720  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
721 
722  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
723  ITLBIASID tlbiOp(EL1,
724  secure,
725  bits(value, 7, 0));
726 
727  tlbiOp(tc);
728  return;
729  }
730  // Data TLB Invalidate by ASID match
731  case MISCREG_DTLBIASID:
732  {
733  SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
734 
735  bool secure = release->has(ArmExtension::SECURITY) && !scr.ns;
736  DTLBIASID tlbiOp(EL1,
737  secure,
738  bits(value, 7, 0));
739 
740  tlbiOp(tc);
741  return;
742  }
743  // TLB Invalidate All, Non-Secure Non-Hyp
744  case MISCREG_TLBIALLNSNH:
745  {
746  TLBIALLN tlbiOp(EL1);
747  tlbiOp(tc);
748  return;
749  }
750  // TLB Invalidate All, Non-Secure Non-Hyp, Inner Shareable
752  {
753  TLBIALLN tlbiOp(EL1);
754  tlbiOp.broadcast(tc);
755  return;
756  }
757  // TLB Invalidate All, Hyp mode
758  case MISCREG_TLBIALLH:
759  {
760  TLBIALLN tlbiOp(EL2);
761  tlbiOp(tc);
762  return;
763  }
764  // TLB Invalidate All, Hyp mode, Inner Shareable
765  case MISCREG_TLBIALLHIS:
766  {
767  TLBIALLN tlbiOp(EL2);
768  tlbiOp.broadcast(tc);
769  return;
770  }
771  default:
772  panic("Unrecognized TLBIOp\n");
773  }
774 }
775 
776 } // namespace gem5
Data TLB Invalidate All.
Definition: tlbi_op.hh:156
Data TLB Invalidate by ASID match.
Definition: tlbi_op.hh:262
Data TLB Invalidate by VA.
Definition: tlbi_op.hh:357
const ArmRelease * getRelease() const
Definition: isa.hh:193
Instruction TLB Invalidate All.
Definition: tlbi_op.hh:141
Instruction TLB Invalidate by ASID match.
Definition: tlbi_op.hh:247
Instruction TLB Invalidate by VA.
Definition: tlbi_op.hh:341
TLB Invalidate All, Non-Secure.
Definition: tlbi_op.hh:277
TLB Invalidate All.
Definition: tlbi_op.hh:109
TLB Invalidate by ASID match.
Definition: tlbi_op.hh:229
TLB Invalidate by Intermediate Physical Address.
Definition: tlbi_op.hh:373
TLB Invalidate by VA, All ASID.
Definition: tlbi_op.hh:302
TLB Invalidate by VA.
Definition: tlbi_op.hh:321
void broadcast(ThreadContext *tc)
Broadcast the TLB Invalidate operation to all TLBs in the Arm system.
Definition: tlbi_op.hh:73
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
Definition: exec_context.hh:72
virtual ThreadContext * tcBase() const =0
Returns a pointer to the ThreadContext.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:178
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:395
McrMrcImplDefined(const char *_mnemonic, ArmISA::ExtMachInst _machInst, uint64_t _iss, ArmISA::MiscRegIndex _miscReg)
Definition: misc.cc:376
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Definition: misc.cc:383
Certain mrc/mcr instructions act as nops or flush the pipe based on what register the instruction is ...
Definition: misc.hh:407
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Definition: misc.cc:364
McrMrcMiscInst(const char *_mnemonic, ArmISA::ExtMachInst _machInst, uint64_t _iss, ArmISA::MiscRegIndex _miscReg)
Definition: misc.cc:354
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:370
ArmISA::MiscRegIndex miscReg
Definition: misc.hh:410
uint64_t iss
Definition: misc.hh:409
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:165
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:275
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:152
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:50
void printMsrBase(std::ostream &os) const
Definition: misc.cc:80
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:133
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:142
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:91
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:299
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:187
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:323
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:335
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:287
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:208
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:310
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:262
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:197
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:217
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:248
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:232
const char * mnemonic
Base mnemonic (e.g., "add").
Definition: static_inst.hh:259
std::bitset< Num_Flags > flags
Flag values for this instruction.
Definition: static_inst.hh:103
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual BaseISA * getIsaPtr() const =0
void performTlbi(ExecContext *xc, ArmISA::MiscRegIndex dest_idx, RegVal value) const
Definition: misc.cc:402
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition: misc.cc:348
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:76
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
Definition: bitfield.hh:103
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:178
constexpr RegId Zero
Definition: int.hh:228
Fault mcrMrc15Trap(const MiscRegIndex misc_reg, ExtMachInst mach_inst, ThreadContext *tc, uint32_t imm)
Definition: utility.cc:497
Bitfield< 7, 0 > imm
Definition: types.hh:132
Bitfield< 7 > i
Definition: misc_types.hh:67
MiscRegIndex
Definition: misc.hh:64
@ MISCREG_TLBIMVALIS
Definition: misc.hh:330
@ MISCREG_TLBIMVAALIS
Definition: misc.hh:331
@ MISCREG_TLBIMVAAL
Definition: misc.hh:343
@ MISCREG_TLBIIPAS2
Definition: misc.hh:350
@ MISCREG_TLBIIPAS2L
Definition: misc.hh:351
@ MISCREG_SCR_EL3
Definition: misc.hh:598
@ MISCREG_TLBIALLHIS
Definition: misc.hh:346
@ MISCREG_TLBIIPAS2LIS
Definition: misc.hh:345
@ MISCREG_TLBIASIDIS
Definition: misc.hh:328
@ MISCREG_DTLBIMVA
Definition: misc.hh:336
@ MISCREG_TLBIMVALH
Definition: misc.hh:355
@ MISCREG_TLBIMVA
Definition: misc.hh:339
@ MISCREG_TLBIMVAL
Definition: misc.hh:342
@ MISCREG_ITLBIALL
Definition: misc.hh:332
@ MISCREG_TLBIALLNSNH
Definition: misc.hh:354
@ MISCREG_CPSR
Definition: misc.hh:65
@ MISCREG_TLBIIPAS2IS
Definition: misc.hh:344
@ MISCREG_TLBIMVAAIS
Definition: misc.hh:329
@ MISCREG_TLBIMVAHIS
Definition: misc.hh:347
@ MISCREG_DTLBIALL
Definition: misc.hh:335
@ MISCREG_TLBIALLIS
Definition: misc.hh:326
@ MISCREG_TLBIASID
Definition: misc.hh:340
@ MISCREG_ITLBIMVA
Definition: misc.hh:333
@ MISCREG_TLBIALLNSNHIS
Definition: misc.hh:348
@ MISCREG_TLBIMVALHIS
Definition: misc.hh:349
@ MISCREG_ITLBIASID
Definition: misc.hh:334
@ MISCREG_TLBIMVAIS
Definition: misc.hh:327
@ MISCREG_TLBIALLH
Definition: misc.hh:352
@ MISCREG_TLBIMVAH
Definition: misc.hh:353
@ MISCREG_DTLBIASID
Definition: misc.hh:337
@ MISCREG_TLBIALL
Definition: misc.hh:338
@ MISCREG_TLBIMVAA
Definition: misc.hh:341
@ MISCREG_SPSR
Definition: misc.hh:66
Bitfield< 27, 25 > encoding
Definition: types.hh:90
Bitfield< 21 > ss
Definition: misc_types.hh:60
Bitfield< 4 > pc
Bitfield< 5, 3 > reg
Definition: types.hh:92
Bitfield< 17 > os
Definition: misc.hh:810
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::shared_ptr< FaultBase > Fault
Definition: types.hh:248
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
uint64_t RegVal
Definition: types.hh:173
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:161
constexpr decltype(nullptr) NoFault
Definition: types.hh:253
@ MiscRegClass
Control (misc) register.
Definition: reg_class.hh:68
void ccprintf(cp::Print &print)
Definition: cprintf.hh:130
The file contains the definition of a set of TLB Invalidate Instructions.

Generated on Wed Dec 21 2022 10:22:25 for gem5 by doxygen 1.9.1