Go to the documentation of this file.
42 #ifndef __ARCH_ARM_UTILITY_HH__
43 #define __ARCH_ARM_UTILITY_HH__
87 panic(
"Unhandled predicate condition: %d\n", code);
196 static inline uint8_t
201 it.bottom2 = psr.it1;
216 TCR tcr,
bool isInstr);
254 static inline uint32_t
256 uint32_t opc1, uint32_t
opc2)
258 return (isRead << 0) |
268 uint32_t &crn, uint32_t &opc1, uint32_t &
opc2)
270 isRead = (iss >> 0) & 0x1;
271 crm = (iss >> 1) & 0xF;
272 rt = (IntRegIndex) ((iss >> 5) & 0xF);
273 crn = (iss >> 10) & 0xF;
274 opc1 = (iss >> 14) & 0x7;
275 opc2 = (iss >> 17) & 0x7;
278 static inline uint32_t
282 return (isRead << 0) |
289 static inline uint32_t
291 uint32_t crm, uint32_t op2, IntRegIndex
rt)
311 HDCR hdcr, HSTR hstr, HCPTR hcptr, uint32_t iss);
386 CPSR cpsr, SCR scr, NSACR nsacr,
387 bool checkSecurity =
true);
399 return (validReg && isIntReg) ? regIdx : INTREG_DUMMY;
414 return isBigEndian64(tc) ? ByteOrder::big : ByteOrder::little;
Fault AArch64AArch32SystemAccessTrap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm, ExceptionClass ec)
bool condGenericTimerCommonEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
bool ELIs64(ThreadContext *tc, ExceptionLevel el)
bool testPredicate(uint32_t nz, uint32_t c, uint32_t v, ConditionCode code)
int decodePhysAddrRange64(uint8_t pa_enc)
Returns the n.
bool isGenericTimerVirtSystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
uint8_t encodePhysAddrRange64(int pa_size)
Returns the encoding corresponding to the specified n.
bool isSecureBelowEL3(ThreadContext *tc)
static ExceptionLevel currEL(const ThreadContext *tc)
bool condGenericTimerPhysHypTrap(const MiscRegIndex miscReg, ThreadContext *tc)
bool mcrMrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss, ExceptionClass *ec)
Fault mcrMrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm)
ByteOrder byteOrder(const ThreadContext *tc)
static ExceptionLevel opModeToEL(OperatingMode mode)
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 ...
Fault mcrrMrrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm)
bool inAArch64(ThreadContext *tc)
bool mcrrMrrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss, ExceptionClass *ec)
bool badMode(ThreadContext *tc, OperatingMode mode)
badMode is checking if the execution mode provided as an argument is valid and implemented.
Addr truncPage(Addr addr)
bool isGenericTimerSystemAccessTrapEL3(const MiscRegIndex miscReg, ThreadContext *tc)
bool condGenericTimerSystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
std::pair< bool, bool > ELUsingAArch32K(ThreadContext *tc, ExceptionLevel el)
This function checks whether selected EL provided as an argument is using the AArch32 ISA.
bool HaveLVA(ThreadContext *tc)
Addr purifyTaggedAddr(Addr addr, ThreadContext *tc, ExceptionLevel el, TCR tcr, bool isInstr)
Removes the tag from tagged addresses if that mode is enabled.
bool HavePACExt(ThreadContext *tc)
static uint32_t mcrMrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, uint32_t crn, uint32_t opc1, uint32_t opc2)
bool isGenericTimerPhysEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
bool isGenericTimerHypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
std::shared_ptr< FaultBase > Fault
bool HaveVirtHostExt(ThreadContext *tc)
Addr roundPage(Addr addr)
bool ELIs32(ThreadContext *tc, ExceptionLevel el)
int computeAddrTop(ThreadContext *tc, bool selbit, bool isInstr, TCR tcr, ExceptionLevel el)
bool condGenericTimerCommonEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
bool isGenericTimerPhysEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
RegVal getAffinity(ArmSystem *arm_sys, ThreadContext *tc)
Retrieves MPIDR_EL1.
bool EL2Enabled(ThreadContext *tc)
bool isAArch64AArch32SystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
static uint32_t msrMrs64IssBuild(bool isRead, uint32_t op0, uint32_t op1, uint32_t crn, uint32_t crm, uint32_t op2, IntRegIndex rt)
bool SPAlignmentCheckEnabled(ThreadContext *tc)
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
ExceptionLevel s1TranslationRegime(ThreadContext *tc, ExceptionLevel el)
bool isGenericTimerSystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
ExceptionLevel debugTargetFrom(ThreadContext *tc, bool secure)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static bool inPrivilegedMode(CPSR cpsr)
bool isSecure(ThreadContext *tc)
std::pair< bool, bool > ELStateUsingAArch32K(ThreadContext *tc, ExceptionLevel el, bool secure)
static OperatingMode currOpMode(const ThreadContext *tc)
bool IsSecureEL2Enabled(ThreadContext *tc)
static int decodeMrsMsrBankedIntRegIndex(uint8_t sysM, bool r)
bool decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int ®Idx, CPSR cpsr, SCR scr, NSACR nsacr, bool checkSecurity)
bool isUnpriviledgeAccess(ThreadContext *tc)
bool isGenericTimerCommonEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
void sendEvent(ThreadContext *tc)
Send an event (SEV) to a specific PE if there isn't already a pending event.
bool ELStateUsingAArch32(ThreadContext *tc, ExceptionLevel el, bool secure)
bool longDescFormatInUse(ThreadContext *tc)
static bool inUserMode(CPSR cpsr)
static bool inSecureState(SCR scr, CPSR cpsr)
bool mcrMrc14TrapToHyp(const MiscRegIndex miscReg, HCR hcr, CPSR cpsr, SCR scr, HDCR hdcr, HSTR hstr, HCPTR hcptr, uint32_t iss)
bool HaveSecureEL2Ext(ThreadContext *tc)
bool badMode32(ThreadContext *tc, OperatingMode mode)
badMode is checking if the execution mode provided as an argument is valid and implemented for AArch3...
bool isGenericTimerPhysHypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
bool isAArch64AArch32SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
bool isGenericTimerCommonEL0HypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
static uint8_t itState(CPSR psr)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
bool condGenericTimerPhysEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
bool isBigEndian64(const ThreadContext *tc)
bool isGenericTimerSystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
RegVal readMPIDR(ArmSystem *arm_sys, ThreadContext *tc)
This helper function is either returing the value of MPIDR_EL1 (by calling getMPIDR),...
static uint32_t mcrrMrrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, IntRegIndex rt2, uint32_t opc1)
RegVal getMPIDR(ArmSystem *arm_sys, ThreadContext *tc)
This helper function is returning the value of MPIDR_EL1.
#define panic(...)
This implements a cprintf based panic() function.
static void mcrMrcIssExtract(uint32_t iss, bool &isRead, uint32_t &crm, IntRegIndex &rt, uint32_t &crn, uint32_t &opc1, uint32_t &opc2)
Generated on Wed Jul 28 2021 12:10:22 for gem5 by doxygen 1.8.17