gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
utility.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, 2012-2013, 2016-2020 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2003-2005 The Regents of The University of Michigan
15  * Copyright (c) 2007-2008 The Florida State University
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
42 #ifndef __ARCH_ARM_UTILITY_HH__
43 #define __ARCH_ARM_UTILITY_HH__
44 
45 #include "arch/arm/isa_traits.hh"
46 #include "arch/arm/miscregs.hh"
47 #include "arch/arm/types.hh"
48 #include "base/logging.hh"
49 #include "base/trace.hh"
50 #include "base/types.hh"
51 #include "cpu/static_inst.hh"
52 #include "cpu/thread_context.hh"
53 
54 class ArmSystem;
55 
56 namespace ArmISA {
57 
58 inline PCState
59 buildRetPC(const PCState &curPC, const PCState &callPC)
60 {
61  PCState retPC = callPC;
62  retPC.uEnd();
63  return retPC;
64 }
65 
66 inline bool
67 testPredicate(uint32_t nz, uint32_t c, uint32_t v, ConditionCode code)
68 {
69  bool n = (nz & 0x2);
70  bool z = (nz & 0x1);
71 
72  switch (code)
73  {
74  case COND_EQ: return z;
75  case COND_NE: return !z;
76  case COND_CS: return c;
77  case COND_CC: return !c;
78  case COND_MI: return n;
79  case COND_PL: return !n;
80  case COND_VS: return v;
81  case COND_VC: return !v;
82  case COND_HI: return (c && !z);
83  case COND_LS: return !(c && !z);
84  case COND_GE: return !(n ^ v);
85  case COND_LT: return (n ^ v);
86  case COND_GT: return !(n ^ v || z);
87  case COND_LE: return (n ^ v || z);
88  case COND_AL: return true;
89  case COND_UC: return true;
90  default:
91  panic("Unhandled predicate condition: %d\n", code);
92  }
93 }
94 
95 void copyRegs(ThreadContext *src, ThreadContext *dest);
96 
97 static inline void
99 {
100  panic("Copy Misc. Regs Not Implemented Yet\n");
101 }
102 
105 void sendEvent(ThreadContext *tc);
106 
107 static inline bool
108 inUserMode(CPSR cpsr)
109 {
110  return cpsr.mode == MODE_USER || cpsr.mode == MODE_EL0T;
111 }
112 
113 static inline bool
115 {
116  return !inUserMode(cpsr);
117 }
118 
119 bool isSecure(ThreadContext *tc);
120 
121 bool inAArch64(ThreadContext *tc);
122 
123 static inline OperatingMode
125 {
126  CPSR cpsr = tc->readMiscRegNoEffect(MISCREG_CPSR);
127  return (OperatingMode) (uint8_t) cpsr.mode;
128 }
129 
130 static inline ExceptionLevel
132 {
133  return opModeToEL(currOpMode(tc));
134 }
135 
136 inline ExceptionLevel
137 currEL(CPSR cpsr)
138 {
139  return opModeToEL((OperatingMode) (uint8_t)cpsr.mode);
140 }
141 
142 bool HavePACExt(ThreadContext *tc);
144 bool HaveLVA(ThreadContext *tc);
147 bool EL2Enabled(ThreadContext *tc);
148 
166 
169 
170 bool
172 
174 
176 
182 
184 
185 bool isBigEndian64(const ThreadContext *tc);
186 
187 
197 
207 
208 static inline uint8_t
209 itState(CPSR psr)
210 {
211  ITSTATE it = 0;
212  it.top6 = psr.it2;
213  it.bottom2 = psr.it1;
214 
215  return (uint8_t)it;
216 }
217 
219 
228  TCR tcr, bool isInstr);
230  bool isInstr);
231 int computeAddrTop(ThreadContext *tc, bool selbit, bool isInstr,
232  TCR tcr, ExceptionLevel el);
233 
234 static inline bool
235 inSecureState(SCR scr, CPSR cpsr)
236 {
237  switch ((OperatingMode) (uint8_t) cpsr.mode) {
238  case MODE_MON:
239  case MODE_EL3T:
240  case MODE_EL3H:
241  return true;
242  case MODE_HYP:
243  case MODE_EL2T:
244  case MODE_EL2H:
245  return false;
246  default:
247  return !scr.ns;
248  }
249 }
250 
252 
254 
258 RegVal readMPIDR(ArmSystem *arm_sys, ThreadContext *tc);
259 
261 RegVal getMPIDR(ArmSystem *arm_sys, ThreadContext *tc);
262 
265 
266 static inline uint32_t
267 mcrMrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, uint32_t crn,
268  uint32_t opc1, uint32_t opc2)
269 {
270  return (isRead << 0) |
271  (crm << 1) |
272  (rt << 5) |
273  (crn << 10) |
274  (opc1 << 14) |
275  (opc2 << 17);
276 }
277 
278 static inline void
279 mcrMrcIssExtract(uint32_t iss, bool &isRead, uint32_t &crm, IntRegIndex &rt,
280  uint32_t &crn, uint32_t &opc1, uint32_t &opc2)
281 {
282  isRead = (iss >> 0) & 0x1;
283  crm = (iss >> 1) & 0xF;
284  rt = (IntRegIndex) ((iss >> 5) & 0xF);
285  crn = (iss >> 10) & 0xF;
286  opc1 = (iss >> 14) & 0x7;
287  opc2 = (iss >> 17) & 0x7;
288 }
289 
290 static inline uint32_t
291 mcrrMrrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, IntRegIndex rt2,
292  uint32_t opc1)
293 {
294  return (isRead << 0) |
295  (crm << 1) |
296  (rt << 5) |
297  (rt2 << 10) |
298  (opc1 << 16);
299 }
300 
301 static inline uint32_t
302 msrMrs64IssBuild(bool isRead, uint32_t op0, uint32_t op1, uint32_t crn,
303  uint32_t crm, uint32_t op2, IntRegIndex rt)
304 {
305  return isRead |
306  (crm << 1) |
307  (rt << 5) |
308  (crn << 10) |
309  (op1 << 14) |
310  (op2 << 17) |
311  (op0 << 20);
312 }
313 
314 Fault
315 mcrMrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst,
316  ThreadContext *tc, uint32_t imm);
317 bool
318 mcrMrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss,
319  ExceptionClass *ec = nullptr);
320 
321 bool
322 mcrMrc14TrapToHyp(const MiscRegIndex miscReg, HCR hcr, CPSR cpsr, SCR scr,
323  HDCR hdcr, HSTR hstr, HCPTR hcptr, uint32_t iss);
324 
325 Fault
326 mcrrMrrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst,
327  ThreadContext *tc, uint32_t imm);
328 bool
330  uint32_t iss, ExceptionClass *ec = nullptr);
331 
332 Fault
334  ExtMachInst machInst, ThreadContext *tc,
335  uint32_t imm, ExceptionClass ec);
336 bool
338  ThreadContext *tc);
339 bool
341  ThreadContext *tc);
342 bool
344  ExceptionClass *ec);
345 bool condGenericTimerPhysHypTrap(const MiscRegIndex miscReg,
346  ThreadContext *tc);
347 bool
349  ExceptionClass *ec);
350 bool
352  ExceptionClass *ec);
353 bool
355 bool
357  ThreadContext *tc);
358 bool
360  ThreadContext *tc);
361 bool
363  ThreadContext *tc);
364 bool
366  ThreadContext *tc);
367 bool
369  ThreadContext *tc);
370 bool
372  ThreadContext *tc);
373 bool
375  ThreadContext *tc);
376 bool
378  ThreadContext *tc);
379 bool
381  ThreadContext *tc);
382 bool
384  ThreadContext *tc);
385 bool
387  ThreadContext *tc);
388 
390 
391 inline void
393 {
394  inst->advancePC(pc);
395 }
396 
399 
400 // Decodes the register index to access based on the fields used in a MSR
401 // or MRS instruction
402 bool
403 decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int &regIdx,
404  CPSR cpsr, SCR scr, NSACR nsacr,
405  bool checkSecurity = true);
406 
407 // This wrapper function is used to turn the register index into a source
408 // parameter for the instruction. See Operands.isa
409 static inline int
410 decodeMrsMsrBankedIntRegIndex(uint8_t sysM, bool r)
411 {
412  int regIdx;
413  bool isIntReg;
414  bool validReg;
415 
416  validReg = decodeMrsMsrBankedReg(sysM, r, isIntReg, regIdx, 0, 0, 0, false);
417  return (validReg && isIntReg) ? regIdx : INTREG_DUMMY;
418 }
419 
423 int decodePhysAddrRange64(uint8_t pa_enc);
424 
428 uint8_t encodePhysAddrRange64(int pa_size);
429 
430 inline ByteOrder byteOrder(const ThreadContext *tc)
431 {
432  return isBigEndian64(tc) ? ByteOrder::big : ByteOrder::little;
433 };
434 
436 
437 }
438 #endif
ArmISA::sendEvent
void sendEvent(ThreadContext *tc)
Send an event (SEV) to a specific PE if there isn't already a pending event.
Definition: utility.cc:103
ThreadContext::readMiscRegNoEffect
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
ArmISA::isGenericTimerSystemAccessTrapEL3
bool isGenericTimerSystemAccessTrapEL3(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1152
ArmISA::ELIsInHost
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:337
ArmISA::COND_PL
@ COND_PL
Definition: ccregs.hh:69
ArmISA::copyRegs
void copyRegs(ThreadContext *src, ThreadContext *dest)
Definition: utility.cc:75
ArmISA::EL2Enabled
bool EL2Enabled(ThreadContext *tc)
Definition: utility.cc:314
ArmISA::encodePhysAddrRange64
uint8_t encodePhysAddrRange64(int pa_size)
Returns the encoding corresponding to the specified n.
Definition: utility.cc:1351
ArmISA::debugTargetFrom
ExceptionLevel debugTargetFrom(ThreadContext *tc, bool secure)
Definition: utility.cc:131
ArmISA::MODE_HYP
@ MODE_HYP
Definition: types.hh:642
ArmISA::COND_EQ
@ COND_EQ
Definition: ccregs.hh:64
ArmISA::getAffinity
RegVal getAffinity(ArmSystem *arm_sys, ThreadContext *tc)
Retrieves MPIDR_EL1.
Definition: utility.cc:250
ArmISA::computeAddrTop
int computeAddrTop(ThreadContext *tc, bool selbit, bool isInstr, TCR tcr, ExceptionLevel el)
Definition: utility.cc:458
ArmISA::MODE_EL0T
@ MODE_EL0T
Definition: types.hh:629
ArmISA::HaveVirtHostExt
bool HaveVirtHostExt(ThreadContext *tc)
Definition: utility.cc:264
ArmISA::ConditionCode
ConditionCode
Definition: ccregs.hh:63
ArmISA::HaveLVA
bool HaveLVA(ThreadContext *tc)
Definition: utility.cc:271
ArmISA::buildRetPC
PCState buildRetPC(const PCState &curPC, const PCState &callPC)
Definition: utility.hh:59
ArmISA::currOpMode
static OperatingMode currOpMode(const ThreadContext *tc)
Definition: utility.hh:124
StaticInst::advancePC
virtual void advancePC(TheISA::PCState &pcState) const =0
ArmISA::isGenericTimerVirtSystemAccessTrapEL2
bool isGenericTimerVirtSystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1074
ArmISA::byteOrder
ByteOrder byteOrder(const ThreadContext *tc)
Definition: utility.hh:430
ArmISA::isGenericTimerPhysEL1SystemAccessTrapEL2
bool isGenericTimerPhysEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1052
ArmISA::COND_VC
@ COND_VC
Definition: ccregs.hh:71
ArmISA::COND_UC
@ COND_UC
Definition: ccregs.hh:79
ArmISA::MODE_EL3H
@ MODE_EL3H
Definition: types.hh:635
ArmISA::isGenericTimerCommonEL0SystemAccessTrapEL2
bool isGenericTimerCommonEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1016
ArmISA::badMode32
bool badMode32(ThreadContext *tc, OperatingMode mode)
badMode is checking if the execution mode provided as an argument is valid and implemented for AArch3...
Definition: utility.cc:446
ArmISA::OperatingMode
OperatingMode
Definition: types.hh:628
ArmISA::currEL
static ExceptionLevel currEL(const ThreadContext *tc)
Definition: utility.hh:131
ArmISA::condGenericTimerCommonEL1SystemAccessTrapEL2
bool condGenericTimerCommonEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1110
ArmISA::IntRegIndex
IntRegIndex
Definition: intregs.hh:51
ArmISA::isAArch64AArch32SystemAccessTrapEL1
bool isAArch64AArch32SystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:844
ArmISA::isGenericTimerHypTrap
bool isGenericTimerHypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
Definition: utility.cc:858
ArmISA::inSecureState
static bool inSecureState(SCR scr, CPSR cpsr)
Definition: utility.hh:235
ArmISA::itState
static uint8_t itState(CPSR psr)
Definition: utility.hh:209
ArmISA::decodePhysAddrRange64
int decodePhysAddrRange64(uint8_t pa_enc)
Returns the n.
Definition: utility.cc:1328
ArmISA::condGenericTimerPhysHypTrap
bool condGenericTimerPhysHypTrap(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:907
ArmISA::mcrrMrrc15TrapToHyp
bool mcrrMrrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss, ExceptionClass *ec)
Definition: utility.cc:769
ArmISA::HaveSecureEL2Ext
bool HaveSecureEL2Ext(ThreadContext *tc)
Definition: utility.cc:293
ArmISA::mcrMrc15TrapToHyp
bool mcrMrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss, ExceptionClass *ec)
Definition: utility.cc:552
ArmISA::mcrrMrrcIssBuild
static uint32_t mcrrMrrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, IntRegIndex rt2, uint32_t opc1)
Definition: utility.hh:291
ArmISA::getMPIDR
RegVal getMPIDR(ArmSystem *arm_sys, ThreadContext *tc)
This helper function is returning the value of MPIDR_EL1.
Definition: utility.cc:202
ArmISA::condGenericTimerPhysEL1SystemAccessTrapEL2
bool condGenericTimerPhysEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1144
ArmISA::AArch64AArch32SystemAccessTrap
Fault AArch64AArch32SystemAccessTrap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm, ExceptionClass ec)
Definition: utility.cc:830
ArmISA::decodeMrsMsrBankedReg
bool decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int &regIdx, CPSR cpsr, SCR scr, NSACR nsacr, bool checkSecurity)
Definition: utility.cc:1168
ArmISA
Definition: ccregs.hh:41
types.hh
ArmISA::advancePC
void advancePC(PCState &pc, const StaticInstPtr &inst)
Definition: utility.hh:392
ArmISA::ec
ec
Definition: miscregs_types.hh:663
ArmISA::mcrrMrrc15Trap
Fault mcrrMrrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm)
Definition: utility.cc:759
ArmISA::rt
Bitfield< 15, 12 > rt
Definition: types.hh:124
ArmISA::COND_VS
@ COND_VS
Definition: ccregs.hh:70
ArmISA::ELIs64
bool ELIs64(ThreadContext *tc, ExceptionLevel el)
Definition: utility.cc:322
ArmISA::mcrMrc15Trap
Fault mcrMrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm)
Definition: utility.cc:542
ArmISA::IsSecureEL2Enabled
bool IsSecureEL2Enabled(ThreadContext *tc)
Definition: utility.cc:300
ArmISA::ELStateUsingAArch32
bool ELStateUsingAArch32(ThreadContext *tc, ExceptionLevel el, bool secure)
Definition: utility.cc:418
ArmISA::n
Bitfield< 31 > n
Definition: miscregs_types.hh:450
ArmISA::truncPage
Addr truncPage(Addr addr)
Definition: utility.cc:530
ArmISA::ELIs32
bool ELIs32(ThreadContext *tc, ExceptionLevel el)
Definition: utility.cc:328
ArmISA::isBigEndian64
bool isBigEndian64(const ThreadContext *tc)
Definition: utility.cc:428
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
ArmISA::testPredicate
bool testPredicate(uint32_t nz, uint32_t c, uint32_t v, ConditionCode code)
Definition: utility.hh:67
ArmISA::decodeMrsMsrBankedIntRegIndex
static int decodeMrsMsrBankedIntRegIndex(uint8_t sysM, bool r)
Definition: utility.hh:410
ArmISA::isAArch64AArch32SystemAccessTrapEL2
bool isAArch64AArch32SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:968
ArmISA::ExceptionLevel
ExceptionLevel
Definition: types.hh:621
ArmISA::COND_AL
@ COND_AL
Definition: ccregs.hh:78
ArmISA::imm
Bitfield< 7, 0 > imm
Definition: types.hh:141
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:246
MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:240
ArmISA::z
Bitfield< 11 > z
Definition: miscregs_types.hh:370
MipsISA::r
r
Definition: pra_constants.hh:95
ArmISA::ELStateUsingAArch32K
std::pair< bool, bool > ELStateUsingAArch32K(ThreadContext *tc, ExceptionLevel el, bool secure)
Definition: utility.cc:368
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
ArmISA::COND_GT
@ COND_GT
Definition: ccregs.hh:76
ArmISA::el
Bitfield< 3, 2 > el
Definition: miscregs_types.hh:69
ArmISA::SPAlignmentCheckEnabled
bool SPAlignmentCheckEnabled(ThreadContext *tc)
Definition: utility.cc:1304
ArmISA::isGenericTimerPhysHypTrap
bool isGenericTimerPhysHypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
Definition: utility.cc:900
ArmISA::opModeToEL
static ExceptionLevel opModeToEL(OperatingMode mode)
Definition: types.hh:736
ArmISA::opc2
Bitfield< 7, 5 > opc2
Definition: types.hh:115
static_inst.hh
ArmISA::s1TranslationRegime
ExceptionLevel s1TranslationRegime(ThreadContext *tc, ExceptionLevel el)
Definition: utility.cc:278
ArmISA::longDescFormatInUse
bool longDescFormatInUse(ThreadContext *tc)
Definition: utility.cc:167
std::pair
STL pair class.
Definition: stl.hh:58
ArmISA::COND_LS
@ COND_LS
Definition: ccregs.hh:73
ArmISA::MODE_EL2T
@ MODE_EL2T
Definition: types.hh:632
ArmISA::ELUsingAArch32K
std::pair< bool, bool > ELUsingAArch32K(ThreadContext *tc, ExceptionLevel el)
This function checks whether selected EL provided as an argument is using the AArch32 ISA.
Definition: utility.cc:347
ArmISA::copyMiscRegs
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
Definition: utility.hh:98
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
ArmISA::purifyTaggedAddr
Addr purifyTaggedAddr(Addr addr, ThreadContext *tc, ExceptionLevel el, TCR tcr, bool isInstr)
Removes the tag from tagged addresses if that mode is enabled.
Definition: utility.cc:503
ArmISA::readMPIDR
RegVal readMPIDR(ArmSystem *arm_sys, ThreadContext *tc)
This helper function is either returing the value of MPIDR_EL1 (by calling getMPIDR),...
Definition: utility.cc:174
ArmISA::msrMrs64IssBuild
static uint32_t msrMrs64IssBuild(bool isRead, uint32_t op0, uint32_t op1, uint32_t crn, uint32_t crm, uint32_t op2, IntRegIndex rt)
Definition: utility.hh:302
ArmISA::HavePACExt
bool HavePACExt(ThreadContext *tc)
Definition: utility.cc:256
ArmISA::INTREG_DUMMY
@ INTREG_DUMMY
Definition: intregs.hh:116
ArmISA::inPrivilegedMode
static bool inPrivilegedMode(CPSR cpsr)
Definition: utility.hh:114
ArmISA::isGenericTimerSystemAccessTrapEL1
bool isGenericTimerSystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:922
X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:80
ArmISA::MODE_EL3T
@ MODE_EL3T
Definition: types.hh:634
ArmSystem
Definition: system.hh:59
miscregs.hh
ArmISA::COND_HI
@ COND_HI
Definition: ccregs.hh:72
ArmISA::COND_LE
@ COND_LE
Definition: ccregs.hh:77
ArmISA::MISCREG_CPSR
@ MISCREG_CPSR
Definition: miscregs.hh:57
ArmISA::mcrMrcIssExtract
static void mcrMrcIssExtract(uint32_t iss, bool &isRead, uint32_t &crm, IntRegIndex &rt, uint32_t &crn, uint32_t &opc1, uint32_t &opc2)
Definition: utility.hh:279
ArmISA::isSecureBelowEL3
bool isSecureBelowEL3(ThreadContext *tc)
Definition: utility.cc:124
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
types.hh
ArmISA::isUnpriviledgeAccess
bool isUnpriviledgeAccess(ThreadContext *tc)
Definition: utility.cc:1287
ArmISA::MiscRegIndex
MiscRegIndex
Definition: miscregs.hh:56
ArmISA::isGenericTimerCommonEL0HypTrap
bool isGenericTimerCommonEL0HypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
Definition: utility.cc:884
ArmISA::ExceptionClass
ExceptionClass
Definition: types.hh:648
ArmISA::COND_LT
@ COND_LT
Definition: ccregs.hh:75
ArmISA::COND_CS
@ COND_CS
Definition: ccregs.hh:66
logging.hh
ArmISA::COND_MI
@ COND_MI
Definition: ccregs.hh:68
isa_traits.hh
ArmISA::condGenericTimerCommonEL0SystemAccessTrapEL2
bool condGenericTimerCommonEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1083
ArmISA::MODE_MON
@ MODE_MON
Definition: types.hh:640
ArmISA::c
Bitfield< 29 > c
Definition: miscregs_types.hh:50
RefCountingPtr< StaticInst >
trace.hh
ArmISA::mcrMrcIssBuild
static uint32_t mcrMrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, uint32_t crn, uint32_t opc1, uint32_t opc2)
Definition: utility.hh:267
ArmISA::MODE_USER
@ MODE_USER
Definition: types.hh:636
ArmISA::inAArch64
bool inAArch64(ThreadContext *tc)
Definition: utility.cc:160
ArmISA::nz
nz
Definition: miscregs_types.hh:49
ArmISA::isGenericTimerPhysEL0SystemAccessTrapEL2
bool isGenericTimerPhysEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1029
ArmISA::inUserMode
static bool inUserMode(CPSR cpsr)
Definition: utility.hh:108
ArmISA::mcrMrc14TrapToHyp
bool mcrMrc14TrapToHyp(const MiscRegIndex miscReg, HCR hcr, CPSR cpsr, SCR scr, HDCR hdcr, HSTR hstr, HCPTR hcptr, uint32_t iss)
Definition: utility.cc:709
ArmISA::COND_CC
@ COND_CC
Definition: ccregs.hh:67
ArmISA::COND_NE
@ COND_NE
Definition: ccregs.hh:65
ArmISA::condGenericTimerSystemAccessTrapEL1
bool condGenericTimerSystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:941
ArmISA::MODE_EL2H
@ MODE_EL2H
Definition: types.hh:633
ArmISA::isGenericTimerSystemAccessTrapEL2
bool isGenericTimerSystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:982
ArmISA::roundPage
Addr roundPage(Addr addr)
Definition: utility.cc:536
ArmISA::badMode
bool badMode(ThreadContext *tc, OperatingMode mode)
badMode is checking if the execution mode provided as an argument is valid and implemented.
Definition: utility.cc:452
ArmISA::v
Bitfield< 28 > v
Definition: miscregs_types.hh:51
thread_context.hh
ArmISA::COND_GE
@ COND_GE
Definition: ccregs.hh:74
RegVal
uint64_t RegVal
Definition: types.hh:174
ArmISA::isSecure
bool isSecure(ThreadContext *tc)
Definition: utility.cc:112
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
MipsISA::ExtMachInst
uint64_t ExtMachInst
Definition: types.hh:39

Generated on Tue Jun 22 2021 15:28:21 for gem5 by doxygen 1.8.17