47using namespace ArmISA;
56 bool foundPsr =
false;
84 bool foundPsr =
false;
135 std::stringstream
ss;
144 std::stringstream
ss;
154 std::stringstream
ss;
167 std::stringstream
ss;
180 std::stringstream
ss;
189 std::stringstream
ss;
199 std::stringstream
ss;
210 std::stringstream
ss;
220 std::stringstream
ss;
235 std::stringstream
ss;
251 std::stringstream
ss;
265 std::stringstream
ss;
278 std::stringstream
ss;
290 std::stringstream
ss;
302 std::stringstream
ss;
313 std::stringstream
ss;
326 std::stringstream
ss;
338 std::stringstream
ss;
358 flags[IsNonSpeculative] =
true;
389 return std::make_shared<UndefinedInstruction>(
machInst,
false,
414 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
415 SecurityState::Secure : SecurityState::NonSecure;
420 TLBIALL tlbiOp(TranslationRegime::EL10,
ss);
433 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
434 SecurityState::Secure : SecurityState::NonSecure;
435 TLBIALL tlbiOp(TranslationRegime::EL10,
ss);
445 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
446 SecurityState::Secure : SecurityState::NonSecure;
465 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
466 SecurityState::Secure : SecurityState::NonSecure;
485 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
486 SecurityState::Secure : SecurityState::NonSecure;
491 TLBIMVA tlbiOp(TranslationRegime::EL10,
493 mbits(value, 31, 12),
510 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
511 SecurityState::Secure : SecurityState::NonSecure;
516 TLBIMVA tlbiOp(TranslationRegime::EL10,
518 mbits(value, 31, 12),
534 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
535 SecurityState::Secure : SecurityState::NonSecure;
536 TLBIMVA tlbiOp(TranslationRegime::EL10,
538 mbits(value, 31, 12),
550 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
551 SecurityState::Secure : SecurityState::NonSecure;
552 TLBIMVA tlbiOp(TranslationRegime::EL10,
554 mbits(value, 31, 12),
567 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
568 SecurityState::Secure : SecurityState::NonSecure;
573 TLBIASID tlbiOp(TranslationRegime::EL10,
589 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
590 SecurityState::Secure : SecurityState::NonSecure;
591 TLBIASID tlbiOp(TranslationRegime::EL10,
604 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
605 SecurityState::Secure : SecurityState::NonSecure;
610 mbits(value, 31, 12),
false);
625 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
626 SecurityState::Secure : SecurityState::NonSecure;
632 mbits(value, 31, 12),
true);
646 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
647 SecurityState::Secure : SecurityState::NonSecure;
649 mbits(value, 31, 12),
false);
659 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
660 SecurityState::Secure : SecurityState::NonSecure;
662 mbits(value, 31, 12),
true);
672 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
673 SecurityState::Secure : SecurityState::NonSecure;
675 mbits(value, 31, 12),
false);
685 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
686 SecurityState::Secure : SecurityState::NonSecure;
688 mbits(value, 31, 12),
true);
698 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
699 SecurityState::Secure : SecurityState::NonSecure;
701 mbits(value, 31, 12),
false);
711 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
712 SecurityState::Secure : SecurityState::NonSecure;
714 mbits(value, 31, 12),
true);
724 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
725 SecurityState::Secure : SecurityState::NonSecure;
726 TLBIIPA tlbiOp(TranslationRegime::EL10,
728 static_cast<Addr>(
bits(value, 35, 0)) << 12,
740 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
741 SecurityState::Secure : SecurityState::NonSecure;
742 TLBIIPA tlbiOp(TranslationRegime::EL10,
744 static_cast<Addr>(
bits(value, 35, 0)) << 12,
756 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
757 SecurityState::Secure : SecurityState::NonSecure;
758 TLBIIPA tlbiOp(TranslationRegime::EL10,
760 static_cast<Addr>(
bits(value, 35, 0)) << 12,
772 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
773 SecurityState::Secure : SecurityState::NonSecure;
774 TLBIIPA tlbiOp(TranslationRegime::EL10,
776 static_cast<Addr>(
bits(value, 35, 0)) << 12,
788 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
789 SecurityState::Secure : SecurityState::NonSecure;
794 ITLBIMVA tlbiOp(TranslationRegime::EL10,
796 mbits(value, 31, 12),
812 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
813 SecurityState::Secure : SecurityState::NonSecure;
818 DTLBIMVA tlbiOp(TranslationRegime::EL10,
820 mbits(value, 31, 12),
836 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
837 SecurityState::Secure : SecurityState::NonSecure;
842 ITLBIASID tlbiOp(TranslationRegime::EL10,
859 auto ss = release->has(ArmExtension::SECURITY) && !scr.ns ?
860 SecurityState::Secure : SecurityState::NonSecure;
865 DTLBIASID tlbiOp(TranslationRegime::EL10,
879 TLBIALLN tlbiOp(TranslationRegime::EL10);
886 TLBIALLN tlbiOp(TranslationRegime::EL10);
893 TLBIALLN tlbiOp(TranslationRegime::EL2);
900 TLBIALLN tlbiOp(TranslationRegime::EL2);
905 panic(
"Unrecognized TLBIOp\n");
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).
void printShiftOperand(std::ostream &os, RegIndex rm, bool immShift, uint32_t shiftAmt, RegIndex rs, ArmShiftType type) const
Data TLB Invalidate by ASID match.
Data TLB Invalidate by VA.
const ArmRelease * getRelease() const
Instruction TLB Invalidate All.
Instruction TLB Invalidate by ASID match.
Instruction TLB Invalidate by VA.
TLB Invalidate All, Non-Secure.
TLB Invalidate by ASID match.
TLB Invalidate by Intermediate Physical Address.
TLB Invalidate by VA, All ASID.
void broadcast(ThreadContext *tc)
Broadcast the TLB Invalidate operation to all TLBs in the Arm system.
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.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
McrMrcImplDefined(const char *_mnemonic, ArmISA::ExtMachInst _machInst, uint64_t _iss, ArmISA::MiscRegIndex _miscReg)
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
Certain mrc/mcr instructions act as nops or flush the pipe based on what register the instruction is ...
Fault execute(ExecContext *xc, trace::InstRecord *traceData) const override
McrMrcMiscInst(const char *_mnemonic, ArmISA::ExtMachInst _machInst, uint64_t _iss, ArmISA::MiscRegIndex _miscReg)
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
ArmISA::MiscRegIndex miscReg
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
ArmISA::MiscRegIndex dest
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
ArmISA::MiscRegIndex dest
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
void printMsrBase(std::ostream &os) const
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
Register ID: describe an architectural register with its class and index.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
ArmISA::ArmShiftType shiftType
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
uint8_t numSrcRegs() const
Number of source registers.
uint8_t numDestRegs() const
Number of destination registers.
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
const char * mnemonic
Base mnemonic (e.g., "add").
std::bitset< Num_Flags > flags
Flag values for this instruction.
const RegId & srcRegIdx(int i) const
Return logical index (architectural reg num) of i'th source reg.
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
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
Internal function to generate disassembly string.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
#define panic(...)
This implements a cprintf based panic() function.
ExceptionLevel currEL(const ThreadContext *tc)
Returns the current Exception Level (EL) of the provided ThreadContext.
Fault mcrMrc15Trap(const MiscRegIndex misc_reg, ExtMachInst mach_inst, ThreadContext *tc, uint32_t imm)
bool EL2Enabled(ThreadContext *tc)
Bitfield< 27, 25 > encoding
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::string csprintf(const char *format, const Args &...args)
constexpr decltype(nullptr) NoFault
@ MiscRegClass
Control (misc) register.
void ccprintf(cp::Print &print)
The file contains the definition of a set of TLB Invalidate Instructions.