gem5 v24.0.0.0
Loading...
Searching...
No Matches
misc64.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2013,2017-2024 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
39#include "arch/arm/isa.hh"
40
41#include "arch/arm/tlbi_op.hh"
42
43namespace gem5
44{
45
46using namespace ArmISA;
47
48std::string
50{
51 std::stringstream ss;
52 printMnemonic(ss, "", false);
53 ccprintf(ss, "#0x%x", imm);
54 return ss.str();
55}
56
57std::string
59{
60 std::stringstream ss;
61 printMnemonic(ss, "", false);
63 return ss.str();
64}
65
66std::string
68{
69 std::stringstream ss;
70 printMnemonic(ss, "", false);
72 ccprintf(ss, "#0x%x", imm1);
73 ss << ", ";
74 ccprintf(ss, "#0x%x", imm2);
75 return ss.str();
76}
77
78std::string
80 Addr pc, const loader::SymbolTable *symtab) const
81{
82 std::stringstream ss;
83 printMnemonic(ss, "", false);
85 ss << ", ";
87 ccprintf(ss, ", #%d, #%d", imm1, imm2);
88 return ss.str();
89}
90
91std::string
93 Addr pc, const loader::SymbolTable *symtab) const
94{
95 std::stringstream ss;
96 printMnemonic(ss, "", false);
98 ss << ", ";
100 ss << ", ";
102 ccprintf(ss, ", #%d", imm);
103 return ss.str();
104}
105
106std::string
108 Addr pc, const loader::SymbolTable *symtab) const
109{
110 return csprintf("%-10s (inst %#08x)", "unknown", encoding());
111}
112
113uint32_t
114MiscRegOp64::_iss(const MiscRegNum64 &misc_reg, RegIndex int_index) const
115{
116 return _miscRead |
117 (misc_reg.crm << 1) |
118 (int_index << 5) |
119 (misc_reg.crn << 10) |
120 (misc_reg.op1 << 14) |
121 (misc_reg.op2 << 17) |
122 (misc_reg.op0 << 20);
123}
124
125Fault
127{
128 return generateTrap(el, ExceptionClass::TRAPPED_MSR_MRS_64, iss());
129}
130
131Fault
133 uint32_t iss) const
134{
135 switch (el) {
136 case EL1:
137 return std::make_shared<SupervisorTrap>(getEMI(), iss, ec);
138 case EL2:
139 return std::make_shared<HypervisorTrap>(getEMI(), iss, ec);
140 case EL3:
141 return std::make_shared<SecureMonitorTrap>(getEMI(), iss, ec);
142 default:
143 panic("Invalid EL: %d\n", el);
144 }
145}
146
147RegVal
149{
150 switch (dest) {
151 case MISCREG_SPSEL:
152 return imm & 0x1;
153 case MISCREG_PAN:
154 return (imm & 0x1) << 22;
155 case MISCREG_UAO:
156 return (imm & 0x1) << 23;
157 default:
158 panic("Not a valid PSTATE field register\n");
159 }
160}
161
162std::string
164 Addr pc, const loader::SymbolTable *symtab) const
165{
166 std::stringstream ss;
169 ss << ", ";
170 ccprintf(ss, "#0x%x", imm);
171 return ss.str();
172}
173
174std::string
176 Addr pc, const loader::SymbolTable *symtab) const
177{
178 std::stringstream ss;
181 ss << ", ";
183 return ss.str();
184}
185
186uint32_t
188{
189 const auto misc_reg = encodeAArch64SysReg(dest);
190 assert(misc_reg.has_value());
191 return _iss(misc_reg.value(), op1);
192}
193
194std::string
196 Addr pc, const loader::SymbolTable *symtab) const
197{
198 std::stringstream ss;
201 ss << ", ";
203 return ss.str();
204}
205
206uint32_t
208{
209 const auto misc_reg = encodeAArch64SysReg(op1);
210 assert(misc_reg.has_value());
211 return _iss(misc_reg.value(), dest);
212}
213
214Fault
216 trace::InstRecord *traceData) const
217{
218 auto tc = xc->tcBase();
219 const CPSR cpsr = tc->readMiscReg(MISCREG_CPSR);
220
222 MISCREG_IMPDEF_UNIMPL, cpsr, tc, *this);
223}
224
225std::string
227 Addr pc, const loader::SymbolTable *symtab) const
228{
229 return csprintf("%-10s (implementation defined)", fullMnemonic.c_str());
230}
231
232uint32_t
234{
235 return _iss(miscReg, intReg);
236}
237
238std::string
240 Addr pc, const loader::SymbolTable *symtab) const
241{
242 std::stringstream ss;
245 return ss.str();
246}
247
248void
250 bool secure, TranslationRegime regime, bool shareable)
251{
252 TLBIALLEL tlbi_op(regime, secure);
253 if (shareable) {
254 tlbi_op.broadcast(tc);
255 } else {
256 tlbi_op(tc);
257 }
258}
259
260void
262 bool secure, TranslationRegime regime, bool shareable, bool stage2)
263{
264 TLBIVMALL tlbi_op(regime, secure, stage2);
265 if (shareable) {
266 tlbi_op.broadcast(tc);
267 } else {
268 tlbi_op(tc);
269 }
270}
271
272void
274 bool secure, TranslationRegime regime, bool shareable, bool last_level)
275{
276 if (MMU::hasUnprivRegime(regime)) {
277 // The asid will only be used when e2h == 1
278 bool asid_16bits = ArmSystem::haveLargeAsid64(tc);
279 auto asid = asid_16bits ? bits(value, 63, 48) :
280 bits(value, 55, 48);
281
282 TLBIMVA tlbi_op(regime, secure, static_cast<Addr>(bits(value, 43, 0)) << 12,
283 asid, last_level);
284 if (shareable) {
285 tlbi_op.broadcast(tc);
286 } else {
287 tlbi_op(tc);
288 }
289 } else {
290 TLBIMVAA tlbi_op(regime, secure, static_cast<Addr>(bits(value, 43, 0)) << 12, last_level);
291 if (shareable) {
292 tlbi_op.broadcast(tc);
293 } else {
294 tlbi_op(tc);
295 }
296 }
297}
298
299void
301 bool secure, TranslationRegime regime, bool shareable, bool last_level)
302{
303 TLBIMVAA tlbi_op(regime, secure, static_cast<Addr>(bits(value, 43, 0)) << 12, last_level);
304 if (shareable) {
305 tlbi_op.broadcast(tc);
306 } else {
307 tlbi_op(tc);
308 }
309}
310
311void
313 bool secure, TranslationRegime regime, bool shareable)
314{
315 bool asid_16bits = ArmSystem::haveLargeAsid64(tc);
316 auto asid = asid_16bits ? bits(value, 63, 48) :
317 bits(value, 55, 48);
318
319 TLBIASID tlbi_op(regime, secure, asid);
320 if (shareable) {
321 tlbi_op.broadcast(tc);
322 } else {
323 tlbi_op(tc);
324 }
325}
326
327void
329 bool secure, TranslationRegime regime, bool shareable, bool last_level)
330{
331 if (EL2Enabled(tc)) {
332 auto isa = static_cast<ArmISA::ISA *>(tc->getIsaPtr());
333 auto release = isa->getRelease();
334
335 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
336 bool secure = release->has(ArmExtension::SECURITY) &&
337 !scr.ns && !bits(value, 63);
338
339 const int top_bit = ArmSystem::physAddrRange(tc) == 52 ?
340 39 : 35;
341 TLBIIPA tlbi_op(TranslationRegime::EL10, secure,
342 static_cast<Addr>(bits(value, top_bit, 0)) << 12,
343 last_level);
344
345 if (shareable) {
346 tlbi_op.broadcast(tc);
347 } else {
348 tlbi_op(tc);
349 }
350 }
351}
352
353void
355 bool secure, TranslationRegime regime, bool shareable, bool last_level)
356{
357 TLBIRMVAA tlbi_op(regime, secure, value, last_level);
358 if (shareable) {
359 tlbi_op.broadcast(tc);
360 } else {
361 tlbi_op(tc);
362 }
363}
364
365void
367 bool secure, TranslationRegime regime, bool shareable, bool last_level)
368{
369 if (MMU::hasUnprivRegime(regime)) {
370 // The asid will only be used when e2h == 1
371 bool asid_16bits = ArmSystem::haveLargeAsid64(tc);
372 auto asid = asid_16bits ? bits(value, 63, 48) :
373 bits(value, 55, 48);
374
375 TLBIRMVA tlbi_op(regime, secure, value, asid, last_level);
376 if (shareable) {
377 tlbi_op.broadcast(tc);
378 } else {
379 tlbi_op(tc);
380 }
381 } else {
382 tlbiRvaa(tc, value, secure, regime, shareable, last_level);
383 }
384}
385
386void
388 bool secure, TranslationRegime regime, bool shareable, bool last_level)
389{
390 if (EL2Enabled(tc)) {
391 auto isa = static_cast<ArmISA::ISA *>(tc->getIsaPtr());
392 auto release = isa->getRelease();
393 SCR scr = tc->readMiscReg(MISCREG_SCR_EL3);
394 bool secure = release->has(ArmExtension::SECURITY) &&
395 !scr.ns && !bits(value, 63);
396
397 TLBIRIPA tlbi_op(TranslationRegime::EL10, secure, value, last_level);
398
399 if (shareable) {
400 tlbi_op.broadcast(tc);
401 } else {
402 tlbi_op(tc);
403 }
404 }
405}
406
407std::unordered_map<MiscRegIndex, TlbiOp64::TlbiFunc> TlbiOp64::tlbiOps = {
408 { MISCREG_TLBI_ALLE3, [](ThreadContext *tc, RegVal value)
409 {
410 TlbiOp64::tlbiAll(tc, value,
411 true, // secure
412 TranslationRegime::EL3, // regime
413 false); // shareable
414 }
415 },
416
417 { MISCREG_TLBI_ALLE3IS, [](ThreadContext *tc, RegVal value)
418 {
419 TlbiOp64::tlbiAll(tc, value,
420 true, // secure
421 TranslationRegime::EL3, // regime
422 true); // shareable
423 }
424 },
425
426 { MISCREG_TLBI_ALLE3OS, [](ThreadContext *tc, RegVal value)
427 {
428 TlbiOp64::tlbiAll(tc, value,
429 true, // secure
430 TranslationRegime::EL3, // regime
431 true); // shareable
432 }
433 },
434
435 { MISCREG_TLBI_ALLE2, [](ThreadContext *tc, RegVal value)
436 {
437 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
438 TranslationRegime::EL20 : TranslationRegime::EL2;
439
440 TlbiOp64::tlbiAll(tc, value,
441 isSecureAtEL(tc, EL2), // secure
442 regime, // regime
443 false); // shareable
444 }
445 },
446
447 { MISCREG_TLBI_ALLE2IS, [](ThreadContext *tc, RegVal value)
448 {
449 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
450 TranslationRegime::EL20 : TranslationRegime::EL2;
451
452 TlbiOp64::tlbiAll(tc, value,
453 isSecureAtEL(tc, EL2), // secure
454 regime, // regime
455 true); // shareable
456 }
457 },
458
459 { MISCREG_TLBI_ALLE2OS, [](ThreadContext *tc, RegVal value)
460 {
461 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
462 TranslationRegime::EL20 : TranslationRegime::EL2;
463
464 TlbiOp64::tlbiAll(tc, value,
465 isSecureAtEL(tc, EL2), // secure
466 regime, // regime
467 true); // shareable
468 }
469 },
470
471 { MISCREG_TLBI_ALLE1, [](ThreadContext *tc, RegVal value)
472 {
473 TlbiOp64::tlbiAll(tc, value,
474 isSecureAtEL(tc, EL1), // secure
475 TranslationRegime::EL10, // regime
476 false); // shareable
477 }
478 },
479
480 { MISCREG_TLBI_ALLE1IS, [](ThreadContext *tc, RegVal value)
481 {
482 TlbiOp64::tlbiAll(tc, value,
483 isSecureAtEL(tc, EL1), // secure
484 TranslationRegime::EL10, // regime
485 true); // shareable
486 }
487 },
488
489 { MISCREG_TLBI_ALLE1OS, [](ThreadContext *tc, RegVal value)
490 {
491 TlbiOp64::tlbiAll(tc, value,
492 isSecureAtEL(tc, EL1), // secure
493 TranslationRegime::EL10, // regime
494 true); // shareable
495 }
496 },
497
498 { MISCREG_TLBI_VMALLE1, [](ThreadContext *tc, RegVal value)
499 {
500 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
501 TranslationRegime::EL20 : TranslationRegime::EL10;
502
503 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
504 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
505 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
506 hcr.fb && !hcr.tge;
507
508 TlbiOp64::tlbiVmall(tc, value,
509 isSecureAtEL(tc, translationEl(regime)), // secure
510 regime, // regime
511 shareable); // shareable
512 }
513 },
514
515 { MISCREG_TLBI_VMALLE1IS, [](ThreadContext *tc, RegVal value)
516 {
517 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
518 TranslationRegime::EL20 : TranslationRegime::EL10;
519
520 TlbiOp64::tlbiVmall(tc, value,
521 isSecureAtEL(tc, translationEl(regime)), // secure
522 regime, // regime
523 true); // shareable
524 }
525 },
526
527 { MISCREG_TLBI_VMALLE1OS, [](ThreadContext *tc, RegVal value)
528 {
529 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
530 TranslationRegime::EL20 : TranslationRegime::EL10;
531
532 TlbiOp64::tlbiVmall(tc, value,
533 isSecureAtEL(tc, translationEl(regime)), // secure
534 regime, // regime
535 true); // shareable
536 }
537 },
538
539 { MISCREG_TLBI_VMALLS12E1, [](ThreadContext *tc, RegVal value)
540 {
541 TlbiOp64::tlbiVmall(tc, value,
542 isSecureAtEL(tc, EL1), // secure
543 TranslationRegime::EL10, // regime
544 false, // shareable
545 true); // stage2
546 }
547 },
548
549 { MISCREG_TLBI_VMALLS12E1IS, [](ThreadContext *tc, RegVal value)
550 {
551 TlbiOp64::tlbiVmall(tc, value,
552 isSecureAtEL(tc, EL1), // secure
553 TranslationRegime::EL10, // regime
554 true, // shareable
555 true); // stage2
556 }
557 },
558
559 { MISCREG_TLBI_VMALLS12E1OS, [](ThreadContext *tc, RegVal value)
560 {
561 TlbiOp64::tlbiVmall(tc, value,
562 isSecureAtEL(tc, EL1), // secure
563 TranslationRegime::EL10, // regime
564 true, // shareable
565 true); // stage2
566 }
567 },
568
569 { MISCREG_TLBI_VAE3, [](ThreadContext *tc, RegVal value)
570 {
571 TlbiOp64::tlbiVa(tc, value,
572 true, // secure
573 TranslationRegime::EL3, // regime
574 false, // shareable
575 false); // last level only
576 }
577 },
578
579 { MISCREG_TLBI_VAE3IS, [](ThreadContext *tc, RegVal value)
580 {
581 TlbiOp64::tlbiVa(tc, value,
582 true, // secure
583 TranslationRegime::EL3, // regime
584 true, // shareable
585 false); // last level only
586 }
587 },
588
589 { MISCREG_TLBI_VAE3OS, [](ThreadContext *tc, RegVal value)
590 {
591 TlbiOp64::tlbiVa(tc, value,
592 true, // secure
593 TranslationRegime::EL3, // regime
594 true, // shareable
595 false); // last level only
596 }
597 },
598
599 { MISCREG_TLBI_VALE3, [](ThreadContext *tc, RegVal value)
600 {
601 TlbiOp64::tlbiVa(tc, value,
602 true, // secure
603 TranslationRegime::EL3, // regime
604 false, // shareable
605 true); // last level only
606 }
607 },
608
609 { MISCREG_TLBI_VALE3IS, [](ThreadContext *tc, RegVal value)
610 {
611 TlbiOp64::tlbiVa(tc, value,
612 true, // secure
613 TranslationRegime::EL3, // regime
614 true, // shareable
615 true); // last level only
616 }
617 },
618
619 { MISCREG_TLBI_VALE3OS, [](ThreadContext *tc, RegVal value)
620 {
621 TlbiOp64::tlbiVa(tc, value,
622 true, // secure
623 TranslationRegime::EL3, // regime
624 true, // shareable
625 true); // last level only
626 }
627 },
628
629 { MISCREG_TLBI_VAE2, [](ThreadContext *tc, RegVal value)
630 {
631 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
632 TranslationRegime::EL20 : TranslationRegime::EL2;
633
634 TlbiOp64::tlbiVa(tc, value,
635 isSecureAtEL(tc, EL2), // secure
636 regime, // regime
637 false, // shareable
638 false); // last level only
639 }
640 },
641
642 { MISCREG_TLBI_VAE2IS, [](ThreadContext *tc, RegVal value)
643 {
644 TlbiOp64::tlbiVa(tc, value,
645 isSecureAtEL(tc, EL2), // secure
646 TranslationRegime::EL2, // regime
647 true, // shareable
648 false); // last level only
649 }
650 },
651
652 { MISCREG_TLBI_VAE2OS, [](ThreadContext *tc, RegVal value)
653 {
654 TlbiOp64::tlbiVa(tc, value,
655 isSecureAtEL(tc,EL2), // secure
656 TranslationRegime::EL2, // regime
657 true, // shareable
658 false); // last level only
659 }
660 },
661
662 { MISCREG_TLBI_VALE2, [](ThreadContext *tc, RegVal value)
663 {
664 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
665 TranslationRegime::EL20 : TranslationRegime::EL2;
666
667 TlbiOp64::tlbiVa(tc, value,
668 isSecureAtEL(tc, EL2), // secure
669 regime, // regime
670 false, // shareable
671 true); // last level only
672 }
673 },
674
675 { MISCREG_TLBI_VALE2IS, [](ThreadContext *tc, RegVal value)
676 {
677 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
678 TranslationRegime::EL20 : TranslationRegime::EL2;
679
680 TlbiOp64::tlbiVa(tc, value,
681 isSecureAtEL(tc, EL2), // secure
682 regime, // regime
683 true, // shareable
684 true); // last level only
685 }
686 },
687
688 { MISCREG_TLBI_VALE2OS, [](ThreadContext *tc, RegVal value)
689 {
690 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
691 TranslationRegime::EL20 : TranslationRegime::EL2;
692
693 TlbiOp64::tlbiVa(tc, value,
694 isSecureAtEL(tc, EL2), // secure
695 regime, // regime
696 true, // shareable
697 true); // last level only
698 }
699 },
700
701 { MISCREG_TLBI_VAE1, [](ThreadContext *tc, RegVal value)
702 {
703 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
704 TranslationRegime::EL20 : TranslationRegime::EL10;
705
706 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
707 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
708 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
709 hcr.fb && !hcr.tge;
710
711 TlbiOp64::tlbiVa(tc, value,
712 isSecureAtEL(tc, translationEl(regime)), // secure
713 regime, // regime
714 shareable, // shareable
715 false); // last level only
716 }
717 },
718
719 { MISCREG_TLBI_VAE1IS, [](ThreadContext *tc, RegVal value)
720 {
721 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
722 TranslationRegime::EL20 : TranslationRegime::EL10;
723
724 TlbiOp64::tlbiVa(tc, value,
725 isSecureAtEL(tc, translationEl(regime)), // secure
726 regime, // regime
727 true, // shareable
728 false); // last level only
729 }
730 },
731
732 { MISCREG_TLBI_VAE1OS, [](ThreadContext *tc, RegVal value)
733 {
734 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
735 TranslationRegime::EL20 : TranslationRegime::EL10;
736
737 TlbiOp64::tlbiVa(tc, value,
738 isSecureAtEL(tc, translationEl(regime)), // secure
739 regime, // regime
740 true, // shareable
741 false); // last level only
742 }
743 },
744
745 { MISCREG_TLBI_VALE1, [](ThreadContext *tc, RegVal value)
746 {
747 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
748 TranslationRegime::EL20 : TranslationRegime::EL10;
749
750 TlbiOp64::tlbiVa(tc, value,
751 isSecureAtEL(tc, translationEl(regime)), // secure
752 regime, // regime
753 false, // shareable
754 true); // last level only
755 }
756 },
757
758 { MISCREG_TLBI_VALE1IS, [](ThreadContext *tc, RegVal value)
759 {
760 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
761 TranslationRegime::EL20 : TranslationRegime::EL10;
762
763 TlbiOp64::tlbiVa(tc, value,
764 isSecureAtEL(tc, translationEl(regime)), // secure
765 regime, // regime
766 true, // shareable
767 true); // last level only
768 }
769 },
770
771 { MISCREG_TLBI_VALE1OS, [](ThreadContext *tc, RegVal value)
772 {
773 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
774 TranslationRegime::EL20 : TranslationRegime::EL10;
775
776 TlbiOp64::tlbiVa(tc, value,
777 isSecureAtEL(tc, translationEl(regime)), // secure
778 regime, // regime
779 true, // shareable
780 true); // last level only
781 }
782 },
783
784 { MISCREG_TLBI_ASIDE1, [](ThreadContext *tc, RegVal value)
785 {
786 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
787 TranslationRegime::EL20 : TranslationRegime::EL10;
788
789 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
790 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
791 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
792 hcr.fb && !hcr.tge;
793
794 TlbiOp64::tlbiAsid(tc, value,
795 isSecureAtEL(tc, translationEl(regime)), // secure
796 regime, // regime
797 shareable); // shareable
798 }
799 },
800
801 { MISCREG_TLBI_ASIDE1IS, [](ThreadContext *tc, RegVal value)
802 {
803 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
804 TranslationRegime::EL20 : TranslationRegime::EL10;
805
806 TlbiOp64::tlbiAsid(tc, value,
807 isSecureAtEL(tc, translationEl(regime)), // secure
808 regime, // regime
809 true); // shareable
810 }
811 },
812
813 { MISCREG_TLBI_ASIDE1OS, [](ThreadContext *tc, RegVal value)
814 {
815 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
816 TranslationRegime::EL20 : TranslationRegime::EL10;
817
818 TlbiOp64::tlbiAsid(tc, value,
819 isSecureAtEL(tc, translationEl(regime)), // secure
820 regime, // regime
821 true); // shareable
822 }
823 },
824
825 { MISCREG_TLBI_VAAE1, [](ThreadContext *tc, RegVal value)
826 {
827 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
828 TranslationRegime::EL20 : TranslationRegime::EL10;
829
830 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
831 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
832 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
833 hcr.fb && !hcr.tge;
834
835 TlbiOp64::tlbiVaa(tc, value,
836 isSecureAtEL(tc, translationEl(regime)), // secure
837 regime, // regime
838 shareable, // shareable
839 false); // last level
840 }
841 },
842
843 { MISCREG_TLBI_VAAE1IS, [](ThreadContext *tc, RegVal value)
844 {
845 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
846 TranslationRegime::EL20 : TranslationRegime::EL10;
847
848 TlbiOp64::tlbiVaa(tc, value,
849 isSecureAtEL(tc, translationEl(regime)), // secure
850 regime, // regime
851 true, // shareable
852 false); // last level
853 }
854 },
855
856 { MISCREG_TLBI_VAAE1OS, [](ThreadContext *tc, RegVal value)
857 {
858 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
859 TranslationRegime::EL20 : TranslationRegime::EL10;
860
861 TlbiOp64::tlbiVaa(tc, value,
862 isSecureAtEL(tc, translationEl(regime)), // secure
863 regime, // regime
864 true, // shareable
865 false); // last level
866 }
867 },
868
869 { MISCREG_TLBI_VAALE1, [](ThreadContext *tc, RegVal value)
870 {
871 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
872 TranslationRegime::EL20 : TranslationRegime::EL10;
873
874 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
875 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
876 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
877 hcr.fb && !hcr.tge;
878
879 TlbiOp64::tlbiVaa(tc, value,
880 isSecureAtEL(tc, translationEl(regime)), // secure
881 regime, // regime
882 shareable, // shareable
883 true); // last level
884 }
885 },
886
887 { MISCREG_TLBI_VAALE1IS, [](ThreadContext *tc, RegVal value)
888 {
889 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
890 TranslationRegime::EL20 : TranslationRegime::EL10;
891
892 TlbiOp64::tlbiVaa(tc, value,
893 isSecureAtEL(tc, translationEl(regime)), // secure
894 regime, // regime
895 true, // shareable
896 true); // last level
897 }
898 },
899
900 { MISCREG_TLBI_VAALE1OS, [](ThreadContext *tc, RegVal value)
901 {
902 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
903 TranslationRegime::EL20 : TranslationRegime::EL10;
904
905 TlbiOp64::tlbiVaa(tc, value,
906 isSecureAtEL(tc, translationEl(regime)), // secure
907 regime, // regime
908 true, // shareable
909 true); // last level
910 }
911 },
912
913 { MISCREG_TLBI_IPAS2E1, [](ThreadContext *tc, RegVal value)
914 {
915 TlbiOp64::tlbiIpaS2(tc, value,
916 isSecureAtEL(tc, EL1), // secure
917 TranslationRegime::EL10, // regime
918 false, // shareable
919 false); // last level
920 }
921 },
922
923 { MISCREG_TLBI_IPAS2E1IS, [](ThreadContext *tc, RegVal value)
924 {
925 TlbiOp64::tlbiIpaS2(tc, value,
926 isSecureAtEL(tc, EL1), // secure
927 TranslationRegime::EL10, // regime
928 true, // shareable
929 false); // last level
930 }
931 },
932
933 { MISCREG_TLBI_IPAS2E1OS, [](ThreadContext *tc, RegVal value)
934 {
935 TlbiOp64::tlbiIpaS2(tc, value,
936 isSecureAtEL(tc, EL1), // secure
937 TranslationRegime::EL10, // regime
938 true, // shareable
939 false); // last level
940 }
941 },
942
943 { MISCREG_TLBI_IPAS2LE1, [](ThreadContext *tc, RegVal value)
944 {
945 TlbiOp64::tlbiIpaS2(tc, value,
946 isSecureAtEL(tc, EL1), // secure
947 TranslationRegime::EL10, // regime
948 false, // shareable
949 true); // last level
950 }
951 },
952
953 { MISCREG_TLBI_IPAS2LE1IS, [](ThreadContext *tc, RegVal value)
954 {
955 TlbiOp64::tlbiIpaS2(tc, value,
956 isSecureAtEL(tc, EL1), // secure
957 TranslationRegime::EL10, // regime
958 true, // shareable
959 true); // last level
960 }
961 },
962
963 { MISCREG_TLBI_IPAS2LE1OS, [](ThreadContext *tc, RegVal value)
964 {
965 TlbiOp64::tlbiIpaS2(tc, value,
966 isSecureAtEL(tc, EL1), // secure
967 TranslationRegime::EL10, // regime
968 true, // shareable
969 true); // last level
970 }
971 },
972
973 { MISCREG_TLBI_RVAE1, [](ThreadContext *tc, RegVal value)
974 {
975 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
976 TranslationRegime::EL20 : TranslationRegime::EL10;
977
978 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
979 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
980 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
981 hcr.fb && !hcr.tge;
982
983 tlbiRva(tc, value,
984 isSecureAtEL(tc, translationEl(regime)), // secure
985 regime, // regime
986 shareable, // shareable
987 false); // last level only
988 }
989 },
990
991 { MISCREG_TLBI_RVAE1IS, [](ThreadContext *tc, RegVal value)
992 {
993 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
994 TranslationRegime::EL20 : TranslationRegime::EL10;
995
996 tlbiRva(tc, value,
997 isSecureAtEL(tc, translationEl(regime)), // secure
998 regime, // regime
999 true, // shareable
1000 false); // last level only
1001 }
1002 },
1003
1004 { MISCREG_TLBI_RVAE1OS, [](ThreadContext *tc, RegVal value)
1005 {
1006 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1007 TranslationRegime::EL20 : TranslationRegime::EL10;
1008
1009 tlbiRva(tc, value,
1010 isSecureAtEL(tc, translationEl(regime)), // secure
1011 regime, // regime
1012 true, // shareable
1013 false); // last level only
1014 }
1015 },
1016
1017 { MISCREG_TLBI_RVAAE1, [](ThreadContext *tc, RegVal value)
1018 {
1019 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1020 TranslationRegime::EL20 : TranslationRegime::EL10;
1021
1022 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
1023 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
1024 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
1025 hcr.fb && !hcr.tge;
1026
1027 TlbiOp64::tlbiRvaa(tc, value,
1028 isSecureAtEL(tc, translationEl(regime)), // secure
1029 regime, // regime
1030 shareable, // shareable
1031 false); // last level only
1032 }
1033 },
1034
1035 { MISCREG_TLBI_RVAAE1IS, [](ThreadContext *tc, RegVal value)
1036 {
1037 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1038 TranslationRegime::EL20 : TranslationRegime::EL10;
1039
1040 TlbiOp64::tlbiRvaa(tc, value,
1041 isSecureAtEL(tc, translationEl(regime)), // secure
1042 regime, // regime
1043 true, // shareable
1044 false); // last level only
1045 }
1046 },
1047
1048 { MISCREG_TLBI_RVAAE1OS, [](ThreadContext *tc, RegVal value)
1049 {
1050 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1051 TranslationRegime::EL20 : TranslationRegime::EL10;
1052
1053 TlbiOp64::tlbiRvaa(tc, value,
1054 isSecureAtEL(tc, translationEl(regime)), // secure
1055 regime, // regime
1056 true, // shareable
1057 false); // last level only
1058 }
1059 },
1060
1061 { MISCREG_TLBI_RVALE1, [](ThreadContext *tc, RegVal value)
1062 {
1063 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1064 TranslationRegime::EL20 : TranslationRegime::EL10;
1065
1066 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
1067 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
1068 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
1069 hcr.fb && !hcr.tge;
1070
1071 tlbiRva(tc, value,
1072 isSecureAtEL(tc, translationEl(regime)), // secure
1073 regime, // regime
1074 shareable, // shareable
1075 true); // last level only
1076 }
1077 },
1078
1079 { MISCREG_TLBI_RVALE1IS, [](ThreadContext *tc, RegVal value)
1080 {
1081 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1082 TranslationRegime::EL20 : TranslationRegime::EL10;
1083
1084 tlbiRva(tc, value,
1085 isSecureAtEL(tc, translationEl(regime)), // secure
1086 regime, // regime
1087 true, // shareable
1088 true); // last level only
1089 }
1090 },
1091
1092 { MISCREG_TLBI_RVALE1OS, [](ThreadContext *tc, RegVal value)
1093 {
1094 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1095 TranslationRegime::EL20 : TranslationRegime::EL10;
1096
1097 tlbiRva(tc, value,
1098 isSecureAtEL(tc, translationEl(regime)), // secure
1099 regime, // regime
1100 true, // shareable
1101 true); // last level only
1102 }
1103 },
1104
1105 { MISCREG_TLBI_RVAALE1, [](ThreadContext *tc, RegVal value)
1106 {
1107 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1108 TranslationRegime::EL20 : TranslationRegime::EL10;
1109
1110 // Check for Force Broadcast. Ignored if HCR_EL2.TGE == 1
1111 HCR hcr = tc->readMiscReg(MISCREG_HCR_EL2);
1112 bool shareable = currEL(tc) == EL1 && EL2Enabled(tc) &&
1113 hcr.fb && !hcr.tge;
1114
1115 TlbiOp64::tlbiRvaa(tc, value,
1116 isSecureAtEL(tc, translationEl(regime)), // secure
1117 regime, // regime
1118 shareable, // shareable
1119 true); // last level only
1120 }
1121 },
1122
1123 { MISCREG_TLBI_RVAALE1IS, [](ThreadContext *tc, RegVal value)
1124 {
1125 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1126 TranslationRegime::EL20 : TranslationRegime::EL10;
1127
1128 TlbiOp64::tlbiRvaa(tc, value,
1129 isSecureAtEL(tc, translationEl(regime)), // secure
1130 regime, // regime
1131 true, // shareable
1132 true); // last level only
1133 }
1134 },
1135
1136 { MISCREG_TLBI_RVAALE1OS, [](ThreadContext *tc, RegVal value)
1137 {
1138 const TranslationRegime regime = ELIsInHost(tc, EL0) ?
1139 TranslationRegime::EL20 : TranslationRegime::EL10;
1140
1141 TlbiOp64::tlbiRvaa(tc, value,
1142 isSecureAtEL(tc, translationEl(regime)), // secure
1143 regime, // regime
1144 true, // shareable
1145 true); // last level only
1146 }
1147 },
1148
1149 { MISCREG_TLBI_RIPAS2E1, [](ThreadContext *tc, RegVal value)
1150 {
1151 TlbiOp64::tlbiRipaS2(tc, value,
1152 isSecureAtEL(tc, EL1), // secure
1153 TranslationRegime::EL10, // regime
1154 false, // shareable
1155 false); // last level only
1156 }
1157 },
1158
1159 { MISCREG_TLBI_RIPAS2E1IS, [](ThreadContext *tc, RegVal value)
1160 {
1161 TlbiOp64::tlbiRipaS2(tc, value,
1162 isSecureAtEL(tc, EL1), // secure
1163 TranslationRegime::EL10, // regime
1164 true, // shareable
1165 false); // last level only
1166 }
1167 },
1168
1169 { MISCREG_TLBI_RIPAS2E1OS, [](ThreadContext *tc, RegVal value)
1170 {
1171 TlbiOp64::tlbiRipaS2(tc, value,
1172 isSecureAtEL(tc, EL1), // secure
1173 TranslationRegime::EL10, // regime
1174 true, // shareable
1175 false); // last level only
1176 }
1177 },
1178
1179 { MISCREG_TLBI_RIPAS2LE1, [](ThreadContext *tc, RegVal value)
1180 {
1181 TlbiOp64::tlbiRipaS2(tc, value,
1182 isSecureAtEL(tc, EL1), // secure
1183 TranslationRegime::EL10, // regime
1184 false, // shareable
1185 true); // last level only
1186 }
1187 },
1188
1189 { MISCREG_TLBI_RIPAS2LE1IS, [](ThreadContext *tc, RegVal value)
1190 {
1191 TlbiOp64::tlbiRipaS2(tc, value,
1192 isSecureAtEL(tc, EL1), // secure
1193 TranslationRegime::EL10, // regime
1194 true, // shareable
1195 true); // last level only
1196 }
1197 },
1198
1199 { MISCREG_TLBI_RIPAS2LE1OS, [](ThreadContext *tc, RegVal value)
1200 {
1201 TlbiOp64::tlbiRipaS2(tc, value,
1202 isSecureAtEL(tc, EL1), // secure
1203 TranslationRegime::EL10, // regime
1204 true, // shareable
1205 true); // last level only
1206 }
1207 },
1208
1209 { MISCREG_TLBI_RVAE2, [](ThreadContext *tc, RegVal value)
1210 {
1211 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
1212 TranslationRegime::EL20 : TranslationRegime::EL2;
1213
1214 tlbiRva(tc, value,
1215 isSecureAtEL(tc, EL2), // secure
1216 regime, // regime
1217 false, // shareable
1218 false); // last level only
1219 }
1220 },
1221
1222 { MISCREG_TLBI_RVAE2IS, [](ThreadContext *tc, RegVal value)
1223 {
1224 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
1225 TranslationRegime::EL20 : TranslationRegime::EL2;
1226
1227 tlbiRva(tc, value,
1228 isSecureAtEL(tc, EL2), // secure
1229 regime, // regime
1230 true, // shareable
1231 false); // last level only
1232 }
1233 },
1234
1235 { MISCREG_TLBI_RVAE2OS, [](ThreadContext *tc, RegVal value)
1236 {
1237 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
1238 TranslationRegime::EL20 : TranslationRegime::EL2;
1239
1240 tlbiRva(tc, value,
1241 isSecureAtEL(tc, EL2), // secure
1242 regime, // regime
1243 true, // shareable
1244 false); // last level only
1245 }
1246 },
1247
1248 { MISCREG_TLBI_RVALE2, [](ThreadContext *tc, RegVal value)
1249 {
1250 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
1251 TranslationRegime::EL20 : TranslationRegime::EL2;
1252
1253 tlbiRva(tc, value,
1254 isSecureAtEL(tc, EL2), // secure
1255 regime, // regime
1256 false, // shareable
1257 true); // last level only
1258 }
1259 },
1260
1261 { MISCREG_TLBI_RVALE2IS, [](ThreadContext *tc, RegVal value)
1262 {
1263 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
1264 TranslationRegime::EL20 : TranslationRegime::EL2;
1265
1266 tlbiRva(tc, value,
1267 isSecureAtEL(tc, EL2), // secure
1268 regime, // regime
1269 true, // shareable
1270 true); // last level only
1271 }
1272 },
1273
1274 { MISCREG_TLBI_RVALE2OS, [](ThreadContext *tc, RegVal value)
1275 {
1276 const TranslationRegime regime = ELIsInHost(tc, EL2) ?
1277 TranslationRegime::EL20 : TranslationRegime::EL2;
1278
1279 tlbiRva(tc, value,
1280 isSecureAtEL(tc, EL2), // secure
1281 regime, // regime
1282 true, // shareable
1283 true); // last level only
1284 }
1285 },
1286
1287 { MISCREG_TLBI_RVAE3, [](ThreadContext *tc, RegVal value)
1288 {
1289 tlbiRva(tc, value,
1290 isSecureAtEL(tc, EL3), // secure
1291 TranslationRegime::EL3, // regime
1292 false, // shareable
1293 false); // last level only
1294 }
1295 },
1296
1297 { MISCREG_TLBI_RVAE3IS, [](ThreadContext *tc, RegVal value)
1298 {
1299 tlbiRva(tc, value,
1300 isSecureAtEL(tc, EL3), // secure
1301 TranslationRegime::EL3, // regime
1302 true, // shareable
1303 false); // last level only
1304 }
1305 },
1306
1307 { MISCREG_TLBI_RVAE3OS, [](ThreadContext *tc, RegVal value)
1308 {
1309 tlbiRva(tc, value,
1310 isSecureAtEL(tc, EL3), // secure
1311 TranslationRegime::EL3, // regime
1312 true, // shareable
1313 false); // last level only
1314 }
1315 },
1316
1317 { MISCREG_TLBI_RVALE3, [](ThreadContext *tc, RegVal value)
1318 {
1319 tlbiRva(tc, value,
1320 isSecureAtEL(tc, EL3), // secure
1321 TranslationRegime::EL3, // regime
1322 false, // shareable
1323 true); // last level only
1324 }
1325 },
1326
1327 { MISCREG_TLBI_RVALE3IS, [](ThreadContext *tc, RegVal value)
1328 {
1329 tlbiRva(tc, value,
1330 isSecureAtEL(tc, EL3), // secure
1331 TranslationRegime::EL3, // regime
1332 true, // shareable
1333 true); // last level only
1334 }
1335 },
1336
1337 { MISCREG_TLBI_RVALE3OS, [](ThreadContext *tc, RegVal value)
1338 {
1339 tlbiRva(tc, value,
1340 isSecureAtEL(tc, EL3), // secure
1341 TranslationRegime::EL3, // regime
1342 true, // shareable
1343 true); // last level only
1344 }
1345 },
1346};
1347
1348void
1350{
1351 ThreadContext* tc = xc->tcBase();
1352
1353 if (auto it = tlbiOps.find(dest_idx); it != tlbiOps.end()) {
1354 it->second(tc, value);
1355 } else {
1356 panic("Invalid TLBI\n");
1357 }
1358}
1359
1360} // namespace gem5
void printMiscReg(std::ostream &os, RegIndex reg_idx) const
void printMnemonic(std::ostream &os, const std::string &suffix="", bool withPred=true, bool withCond64=false, ConditionCode cond64=COND_UC) const
void printIntReg(std::ostream &os, RegIndex reg_idx, uint8_t opWidth=0) const
Print a register name for disassembly given the unique dependence tag number (FP or int).
uint64_t getEMI() const override
MachInst encoding() const
Returns the real encoding of the instruction: the machInst field is in fact always 64 bit wide and co...
const ArmRelease * getRelease() const
Definition isa.hh:193
static bool hasUnprivRegime(TranslationRegime regime)
Definition mmu.cc:726
Implementaton of AArch64 TLBI ALLE(1,2,3)(IS) instructions.
Definition tlbi_op.hh:166
TLB Invalidate by ASID match.
Definition tlbi_op.hh:223
TLB Invalidate by Intermediate Physical Address.
Definition tlbi_op.hh:416
TLB Invalidate by VA, All ASID.
Definition tlbi_op.hh:291
TLB Invalidate by VA.
Definition tlbi_op.hh:311
void broadcast(ThreadContext *tc)
Broadcast the TLB Invalidate operation to all TLBs in the Arm system.
Definition tlbi_op.hh:73
TLB Range Invalidate by VA, All ASIDs.
Definition tlbi_op.hh:476
TLB Range Invalidate by VA, All ASIDs.
Definition tlbi_op.hh:463
TLB Range Invalidate by VA.
Definition tlbi_op.hh:450
Implementaton of AArch64 TLBI VMALLE1(IS)/VMALLS112E1(IS) instructions.
Definition tlbi_op.hh:194
uint8_t physAddrRange() const
Returns the supported physical address range in bits.
Definition system.hh:220
bool haveLargeAsid64() const
Returns true if ASID is 16 bits in AArch64 (ARMv8)
Definition system.hh:206
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
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 misc64.cc:49
uint64_t imm
Definition misc64.hh:50
RegVal miscRegImm() const
Returns the "register view" of the immediate field.
Definition misc64.cc:148
ArmISA::MiscRegIndex dest
Definition misc64.hh:184
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:163
const ArmISA::MiscRegNum64 miscReg
Definition misc64.hh:247
const std::string fullMnemonic
Definition misc64.hh:246
uint32_t iss() const override
Definition misc64.cc:233
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:226
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Definition misc64.cc:215
const RegIndex intReg
Definition misc64.hh:248
uint32_t _iss(const ArmISA::MiscRegNum64 &misc_reg, RegIndex int_index) const
Definition misc64.cc:114
Fault generateTrap(ArmISA::ExceptionLevel el) const
Definition misc64.cc:126
virtual uint32_t iss() const
Definition misc64.hh:172
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:175
ArmISA::MiscRegIndex dest
Definition misc64.hh:208
uint32_t iss() const override
Definition misc64.cc:187
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:67
uint32_t iss() const override
Definition misc64.cc:207
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:195
ArmISA::MiscRegIndex op1
Definition misc64.hh:228
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const
Internal function to generate disassembly string.
Definition misc64.cc:239
RegIndex dest
Definition misc64.hh:273
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:58
RegIndex op1
Definition misc64.hh:64
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:79
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:92
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
static void tlbiAll(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable)
Definition misc64.cc:249
static void tlbiRva(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool last_level)
Definition misc64.cc:366
static void tlbiAsid(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable)
Definition misc64.cc:312
static void tlbiIpaS2(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool last_level)
Definition misc64.cc:328
static void tlbiVa(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool last_level)
Definition misc64.cc:273
static void tlbiRipaS2(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool last_level)
Definition misc64.cc:387
static std::unordered_map< ArmISA::MiscRegIndex, TlbiFunc > tlbiOps
Definition misc64.hh:290
static void tlbiRvaa(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool last_level)
Definition misc64.cc:354
void performTlbi(ExecContext *xc, ArmISA::MiscRegIndex idx, RegVal value) const
Definition misc64.cc:1349
static void tlbiVaa(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool last_level)
Definition misc64.cc:300
static void tlbiVmall(ThreadContext *tc, RegVal value, bool secure, ArmISA::TranslationRegime regime, bool shareable, bool stage2=false)
Definition misc64.cc:261
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Definition misc64.cc:107
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:79
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:188
bool ELIsInHost(ThreadContext *tc, ExceptionLevel el)
Returns true if the current exception level el is executing a Host OS or an application of a Host OS ...
Definition utility.cc:290
ExceptionLevel currEL(const ThreadContext *tc)
Returns the current Exception Level (EL) of the provided ThreadContext.
Definition utility.cc:133
Fault checkFaultAccessAArch64SysReg(MiscRegIndex reg, CPSR cpsr, ThreadContext *tc, const MiscRegOp64 &inst)
Definition misc.cc:730
bool EL2Enabled(ThreadContext *tc)
Definition utility.cc:267
ExceptionLevel translationEl(TranslationRegime regime)
Definition utility.cc:1398
Bitfield< 24, 0 > iss
@ MISCREG_TLBI_VAE3
Definition misc.hh:738
@ MISCREG_TLBI_VALE2OS
Definition misc.hh:721
@ MISCREG_TLBI_RVALE2IS
Definition misc.hh:757
@ MISCREG_TLBI_ALLE3
Definition misc.hh:737
@ MISCREG_TLBI_ALLE1IS
Definition misc.hh:718
@ MISCREG_TLBI_VMALLE1OS
Definition misc.hh:693
@ MISCREG_TLBI_RVAE1IS
Definition misc.hh:750
@ MISCREG_TLBI_ALLE2OS
Definition misc.hh:715
@ MISCREG_TLBI_VALE2IS
Definition misc.hh:720
@ MISCREG_SPSEL
Definition misc.hh:631
@ MISCREG_TLBI_VAALE1OS
Definition misc.hh:703
@ MISCREG_TLBI_ASIDE1
Definition misc.hh:706
@ MISCREG_TLBI_RVAE3IS
Definition misc.hh:758
@ MISCREG_TLBI_RVAE3OS
Definition misc.hh:768
@ MISCREG_TLBI_IPAS2E1IS
Definition misc.hh:710
@ MISCREG_TLBI_RIPAS2E1
Definition misc.hh:744
@ MISCREG_TLBI_RVALE3IS
Definition misc.hh:759
@ MISCREG_TLBI_VAE3OS
Definition misc.hh:734
@ MISCREG_TLBI_RVAAE1
Definition misc.hh:741
@ MISCREG_TLBI_IPAS2E1OS
Definition misc.hh:711
@ MISCREG_TLBI_IPAS2LE1IS
Definition misc.hh:712
@ MISCREG_TLBI_ALLE1
Definition misc.hh:728
@ MISCREG_TLBI_RVALE1
Definition misc.hh:742
@ MISCREG_TLBI_RVALE3OS
Definition misc.hh:769
@ MISCREG_TLBI_VMALLS12E1OS
Definition misc.hh:723
@ MISCREG_SCR_EL3
Definition misc.hh:604
@ MISCREG_TLBI_VAE2
Definition misc.hh:727
@ MISCREG_TLBI_RVALE3
Definition misc.hh:749
@ MISCREG_TLBI_IPAS2E1
Definition misc.hh:724
@ MISCREG_TLBI_RVAE1OS
Definition misc.hh:760
@ MISCREG_TLBI_VALE3
Definition misc.hh:739
@ MISCREG_TLBI_VAAE1OS
Definition misc.hh:699
@ MISCREG_TLBI_ALLE2IS
Definition misc.hh:714
@ MISCREG_TLBI_ALLE1OS
Definition misc.hh:719
@ MISCREG_TLBI_RVAALE1OS
Definition misc.hh:763
@ MISCREG_TLBI_VAAE1IS
Definition misc.hh:698
@ MISCREG_TLBI_ASIDE1OS
Definition misc.hh:697
@ MISCREG_TLBI_VAE2OS
Definition misc.hh:717
@ MISCREG_TLBI_IPAS2LE1
Definition misc.hh:725
@ MISCREG_TLBI_VAALE1
Definition misc.hh:709
@ MISCREG_TLBI_RVAE2OS
Definition misc.hh:766
@ MISCREG_TLBI_RVALE1OS
Definition misc.hh:762
@ MISCREG_TLBI_VMALLE1
Definition misc.hh:704
@ MISCREG_TLBI_VMALLS12E1
Definition misc.hh:730
@ MISCREG_CPSR
Definition misc.hh:67
@ MISCREG_TLBI_VAE2IS
Definition misc.hh:716
@ MISCREG_TLBI_VMALLS12E1IS
Definition misc.hh:722
@ MISCREG_TLBI_ALLE3IS
Definition misc.hh:731
@ MISCREG_TLBI_VALE1OS
Definition misc.hh:701
@ MISCREG_TLBI_RVAE3
Definition misc.hh:748
@ MISCREG_TLBI_VALE1
Definition misc.hh:708
@ MISCREG_TLBI_RVAE2IS
Definition misc.hh:756
@ MISCREG_TLBI_RIPAS2E1IS
Definition misc.hh:754
@ MISCREG_TLBI_RIPAS2LE1IS
Definition misc.hh:755
@ MISCREG_HCR_EL2
Definition misc.hh:595
@ MISCREG_TLBI_RVAALE1
Definition misc.hh:743
@ MISCREG_TLBI_VALE3IS
Definition misc.hh:735
@ MISCREG_TLBI_RIPAS2E1OS
Definition misc.hh:764
@ MISCREG_TLBI_VAE1IS
Definition misc.hh:694
@ MISCREG_TLBI_RVAE2
Definition misc.hh:746
@ MISCREG_TLBI_RVAAE1OS
Definition misc.hh:761
@ MISCREG_TLBI_RVAAE1IS
Definition misc.hh:751
@ MISCREG_TLBI_VALE3OS
Definition misc.hh:736
@ MISCREG_TLBI_RVALE1IS
Definition misc.hh:752
@ MISCREG_TLBI_RIPAS2LE1OS
Definition misc.hh:765
@ MISCREG_TLBI_RVALE2OS
Definition misc.hh:767
@ MISCREG_TLBI_VAE1
Definition misc.hh:705
@ MISCREG_TLBI_VAE3IS
Definition misc.hh:733
@ MISCREG_TLBI_VAALE1IS
Definition misc.hh:702
@ MISCREG_TLBI_IPAS2LE1OS
Definition misc.hh:713
@ MISCREG_TLBI_RVAALE1IS
Definition misc.hh:753
@ MISCREG_TLBI_VALE1IS
Definition misc.hh:700
@ MISCREG_TLBI_VMALLE1IS
Definition misc.hh:692
@ MISCREG_TLBI_ALLE2
Definition misc.hh:726
@ MISCREG_TLBI_VALE2
Definition misc.hh:729
@ MISCREG_TLBI_VAE1OS
Definition misc.hh:695
@ MISCREG_TLBI_VAAE1
Definition misc.hh:707
@ MISCREG_TLBI_ASIDE1IS
Definition misc.hh:696
@ MISCREG_TLBI_RIPAS2LE1
Definition misc.hh:745
@ MISCREG_IMPDEF_UNIMPL
Definition misc.hh:1178
@ MISCREG_TLBI_RVAE1
Definition misc.hh:740
@ MISCREG_TLBI_RVALE2
Definition misc.hh:747
@ MISCREG_TLBI_ALLE3OS
Definition misc.hh:732
std::optional< MiscRegNum64 > encodeAArch64SysReg(MiscRegIndex misc_reg)
Definition misc.cc:2775
Bitfield< 3, 2 > el
Definition misc_types.hh:73
bool isSecureAtEL(ThreadContext *tc, ExceptionLevel el)
Definition utility.cc:93
Bitfield< 21 > ss
Definition misc_types.hh:60
Bitfield< 4 > pc
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint16_t RegIndex
Definition types.hh:176
std::shared_ptr< FaultBase > Fault
Definition types.hh:249
uint64_t RegVal
Definition types.hh:173
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
std::string csprintf(const char *format, const Args &...args)
Definition cprintf.hh:161
void ccprintf(cp::Print &print)
Definition cprintf.hh:130
The file contains the definition of a set of TLB Invalidate Instructions.

Generated on Tue Jun 18 2024 16:23:56 for gem5 by doxygen 1.11.0