gem5  v20.1.0.0
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 {
117 }
118 
119 static inline bool
121 {
122  return !inUserMode(cpsr);
123 }
124 
125 static inline bool
127 {
128  return !inUserMode(tc);
129 }
130 
131 bool isSecure(ThreadContext *tc);
132 
133 bool inAArch64(ThreadContext *tc);
134 
135 static inline OperatingMode
137 {
138  CPSR cpsr = tc->readMiscRegNoEffect(MISCREG_CPSR);
139  return (OperatingMode) (uint8_t) cpsr.mode;
140 }
141 
142 static inline ExceptionLevel
144 {
145  return opModeToEL(currOpMode(tc));
146 }
147 
148 inline ExceptionLevel
149 currEL(CPSR cpsr)
150 {
151  return opModeToEL((OperatingMode) (uint8_t)cpsr.mode);
152 }
153 
154 bool HavePACExt(ThreadContext *tc);
158 bool EL2Enabled(ThreadContext *tc);
159 
177 
180 
181 bool
183 
185 
187 
193 
195 
196 bool isBigEndian64(const ThreadContext *tc);
197 
198 
208 
218 
219 static inline uint8_t
220 itState(CPSR psr)
221 {
222  ITSTATE it = 0;
223  it.top6 = psr.it2;
224  it.bottom2 = psr.it1;
225 
226  return (uint8_t)it;
227 }
228 
230 
239  TCR tcr, bool isInstr);
241  bool isInstr);
242 int computeAddrTop(ThreadContext *tc, bool selbit, bool isInstr,
243  TCR tcr, ExceptionLevel el);
244 
245 static inline bool
246 inSecureState(SCR scr, CPSR cpsr)
247 {
248  switch ((OperatingMode) (uint8_t) cpsr.mode) {
249  case MODE_MON:
250  case MODE_EL3T:
251  case MODE_EL3H:
252  return true;
253  case MODE_HYP:
254  case MODE_EL2T:
255  case MODE_EL2H:
256  return false;
257  default:
258  return !scr.ns;
259  }
260 }
261 
263 
265 
269 RegVal readMPIDR(ArmSystem *arm_sys, ThreadContext *tc);
270 
272 RegVal getMPIDR(ArmSystem *arm_sys, ThreadContext *tc);
273 
276 
277 static inline uint32_t
278 mcrMrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, uint32_t crn,
279  uint32_t opc1, uint32_t opc2)
280 {
281  return (isRead << 0) |
282  (crm << 1) |
283  (rt << 5) |
284  (crn << 10) |
285  (opc1 << 14) |
286  (opc2 << 17);
287 }
288 
289 static inline void
290 mcrMrcIssExtract(uint32_t iss, bool &isRead, uint32_t &crm, IntRegIndex &rt,
291  uint32_t &crn, uint32_t &opc1, uint32_t &opc2)
292 {
293  isRead = (iss >> 0) & 0x1;
294  crm = (iss >> 1) & 0xF;
295  rt = (IntRegIndex) ((iss >> 5) & 0xF);
296  crn = (iss >> 10) & 0xF;
297  opc1 = (iss >> 14) & 0x7;
298  opc2 = (iss >> 17) & 0x7;
299 }
300 
301 static inline uint32_t
302 mcrrMrrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, IntRegIndex rt2,
303  uint32_t opc1)
304 {
305  return (isRead << 0) |
306  (crm << 1) |
307  (rt << 5) |
308  (rt2 << 10) |
309  (opc1 << 16);
310 }
311 
312 static inline uint32_t
313 msrMrs64IssBuild(bool isRead, uint32_t op0, uint32_t op1, uint32_t crn,
314  uint32_t crm, uint32_t op2, IntRegIndex rt)
315 {
316  return isRead |
317  (crm << 1) |
318  (rt << 5) |
319  (crn << 10) |
320  (op1 << 14) |
321  (op2 << 17) |
322  (op0 << 20);
323 }
324 
325 Fault
326 mcrMrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst,
327  ThreadContext *tc, uint32_t imm);
328 bool
329 mcrMrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss,
330  ExceptionClass *ec = nullptr);
331 
332 bool
333 mcrMrc14TrapToHyp(const MiscRegIndex miscReg, HCR hcr, CPSR cpsr, SCR scr,
334  HDCR hdcr, HSTR hstr, HCPTR hcptr, uint32_t iss);
335 
336 Fault
337 mcrrMrrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst,
338  ThreadContext *tc, uint32_t imm);
339 bool
341  uint32_t iss, ExceptionClass *ec = nullptr);
342 
343 Fault
345  ExtMachInst machInst, ThreadContext *tc,
346  uint32_t imm, ExceptionClass ec);
347 bool
349  ThreadContext *tc);
350 bool
352  ThreadContext *tc);
353 bool
355  ExceptionClass *ec);
356 bool condGenericTimerPhysHypTrap(const MiscRegIndex miscReg,
357  ThreadContext *tc);
358 bool
360  ExceptionClass *ec);
361 bool
363  ExceptionClass *ec);
364 bool
366 bool
368  ThreadContext *tc);
369 bool
371  ThreadContext *tc);
372 bool
374  ThreadContext *tc);
375 bool
377  ThreadContext *tc);
378 bool
380  ThreadContext *tc);
381 bool
383  ThreadContext *tc);
384 bool
386  ThreadContext *tc);
387 bool
389  ThreadContext *tc);
390 bool
392  ThreadContext *tc);
393 bool
395  ThreadContext *tc);
396 bool
398  ThreadContext *tc);
399 
401 
402 uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp);
403 
404 inline void
406 {
407  inst->advancePC(pc);
408 }
409 
412 
413 inline uint64_t
415 {
416  return tc->readMiscReg(MISCREG_CONTEXTIDR);
417 }
418 
419 // Decodes the register index to access based on the fields used in a MSR
420 // or MRS instruction
421 bool
422 decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int &regIdx,
423  CPSR cpsr, SCR scr, NSACR nsacr,
424  bool checkSecurity = true);
425 
426 // This wrapper function is used to turn the register index into a source
427 // parameter for the instruction. See Operands.isa
428 static inline int
429 decodeMrsMsrBankedIntRegIndex(uint8_t sysM, bool r)
430 {
431  int regIdx;
432  bool isIntReg;
433  bool validReg;
434 
435  validReg = decodeMrsMsrBankedReg(sysM, r, isIntReg, regIdx, 0, 0, 0, false);
436  return (validReg && isIntReg) ? regIdx : INTREG_DUMMY;
437 }
438 
442 int decodePhysAddrRange64(uint8_t pa_enc);
443 
447 uint8_t encodePhysAddrRange64(int pa_size);
448 
449 inline ByteOrder byteOrder(const ThreadContext *tc)
450 {
451  return isBigEndian64(tc) ? ByteOrder::big : ByteOrder::little;
452 };
453 
455 
456 }
457 #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:165
ThreadContext::readMiscRegNoEffect
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
ArmISA::isGenericTimerSystemAccessTrapEL3
bool isGenericTimerSystemAccessTrapEL3(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1205
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:392
ArmISA::COND_PL
@ COND_PL
Definition: ccregs.hh:69
ArmISA::copyRegs
void copyRegs(ThreadContext *src, ThreadContext *dest)
Definition: utility.cc:136
ArmISA::EL2Enabled
bool EL2Enabled(ThreadContext *tc)
Definition: utility.cc:369
ArmISA::fp
Bitfield< 19, 16 > fp
Definition: miscregs_types.hh:173
ArmISA::encodePhysAddrRange64
uint8_t encodePhysAddrRange64(int pa_size)
Returns the encoding corresponding to the specified n.
Definition: utility.cc:1404
ArmISA::debugTargetFrom
ExceptionLevel debugTargetFrom(ThreadContext *tc, bool secure)
Definition: utility.cc:193
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:312
ArmISA::computeAddrTop
int computeAddrTop(ThreadContext *tc, bool selbit, bool isInstr, TCR tcr, ExceptionLevel el)
Definition: utility.cc:513
ArmISA::MODE_EL0T
@ MODE_EL0T
Definition: types.hh:629
ArmISA::HaveVirtHostExt
bool HaveVirtHostExt(ThreadContext *tc)
Definition: utility.cc:326
ArmISA::ConditionCode
ConditionCode
Definition: ccregs.hh:63
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:136
ArmISA::isGenericTimerVirtSystemAccessTrapEL2
bool isGenericTimerVirtSystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1127
ArmISA::getArgument
uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
Definition: utility.cc:57
ArmISA::byteOrder
ByteOrder byteOrder(const ThreadContext *tc)
Definition: utility.hh:449
ArmISA::isGenericTimerPhysEL1SystemAccessTrapEL2
bool isGenericTimerPhysEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1105
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:1069
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:501
ArmISA::OperatingMode
OperatingMode
Definition: types.hh:628
ArmISA::currEL
static ExceptionLevel currEL(const ThreadContext *tc)
Definition: utility.hh:143
ArmISA::condGenericTimerCommonEL1SystemAccessTrapEL2
bool condGenericTimerCommonEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1163
ArmISA::IntRegIndex
IntRegIndex
Definition: intregs.hh:51
ArmISA::isAArch64AArch32SystemAccessTrapEL1
bool isAArch64AArch32SystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:897
ArmISA::isGenericTimerHypTrap
bool isGenericTimerHypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
Definition: utility.cc:911
ArmISA::inSecureState
static bool inSecureState(SCR scr, CPSR cpsr)
Definition: utility.hh:246
ArmISA::itState
static uint8_t itState(CPSR psr)
Definition: utility.hh:220
ArmISA::decodePhysAddrRange64
int decodePhysAddrRange64(uint8_t pa_enc)
Returns the n.
Definition: utility.cc:1381
ArmISA::condGenericTimerPhysHypTrap
bool condGenericTimerPhysHypTrap(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:960
ArmISA::mcrrMrrc15TrapToHyp
bool mcrrMrrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss, ExceptionClass *ec)
Definition: utility.cc:822
ArmISA::HaveSecureEL2Ext
bool HaveSecureEL2Ext(ThreadContext *tc)
Definition: utility.cc:348
ArmISA::mcrMrc15TrapToHyp
bool mcrMrc15TrapToHyp(const MiscRegIndex miscReg, ThreadContext *tc, uint32_t iss, ExceptionClass *ec)
Definition: utility.cc:607
ArmISA::mcrrMrrcIssBuild
static uint32_t mcrrMrrcIssBuild(bool isRead, uint32_t crm, IntRegIndex rt, IntRegIndex rt2, uint32_t opc1)
Definition: utility.hh:302
ArmISA::getMPIDR
RegVal getMPIDR(ArmSystem *arm_sys, ThreadContext *tc)
This helper function is returning the value of MPIDR_EL1.
Definition: utility.cc:264
ArmISA::condGenericTimerPhysEL1SystemAccessTrapEL2
bool condGenericTimerPhysEL1SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1197
ArmISA::AArch64AArch32SystemAccessTrap
Fault AArch64AArch32SystemAccessTrap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm, ExceptionClass ec)
Definition: utility.cc:883
ArmISA::decodeMrsMsrBankedReg
bool decodeMrsMsrBankedReg(uint8_t sysM, bool r, bool &isIntReg, int &regIdx, CPSR cpsr, SCR scr, NSACR nsacr, bool checkSecurity)
Definition: utility.cc:1221
ArmISA
Definition: ccregs.hh:41
types.hh
ArmISA::advancePC
void advancePC(PCState &pc, const StaticInstPtr &inst)
Definition: utility.hh:405
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:812
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:377
ArmISA::mcrMrc15Trap
Fault mcrMrc15Trap(const MiscRegIndex miscReg, ExtMachInst machInst, ThreadContext *tc, uint32_t imm)
Definition: utility.cc:597
ArmISA::IsSecureEL2Enabled
bool IsSecureEL2Enabled(ThreadContext *tc)
Definition: utility.cc:355
ArmISA::ELStateUsingAArch32
bool ELStateUsingAArch32(ThreadContext *tc, ExceptionLevel el, bool secure)
Definition: utility.cc:473
ArmISA::n
Bitfield< 31 > n
Definition: miscregs_types.hh:450
ArmISA::truncPage
Addr truncPage(Addr addr)
Definition: utility.cc:585
ArmISA::ELIs32
bool ELIs32(ThreadContext *tc, ExceptionLevel el)
Definition: utility.cc:383
ArmISA::MISCREG_CONTEXTIDR
@ MISCREG_CONTEXTIDR
Definition: miscregs.hh:393
ArmISA::isBigEndian64
bool isBigEndian64(const ThreadContext *tc)
Definition: utility.cc:483
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:429
ArmISA::isAArch64AArch32SystemAccessTrapEL2
bool isAArch64AArch32SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1021
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:240
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:423
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:1357
ArmISA::isGenericTimerPhysHypTrap
bool isGenericTimerPhysHypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
Definition: utility.cc:953
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:333
ArmISA::longDescFormatInUse
bool longDescFormatInUse(ThreadContext *tc)
Definition: utility.cc:229
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:402
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:142
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:558
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:236
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:313
ArmISA::HavePACExt
bool HavePACExt(ThreadContext *tc)
Definition: utility.cc:318
ArmISA::INTREG_DUMMY
@ INTREG_DUMMY
Definition: intregs.hh:116
ArmISA::inPrivilegedMode
static bool inPrivilegedMode(CPSR cpsr)
Definition: utility.hh:120
ArmISA::isGenericTimerSystemAccessTrapEL1
bool isGenericTimerSystemAccessTrapEL1(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:975
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:290
ArmISA::isSecureBelowEL3
bool isSecureBelowEL3(ThreadContext *tc)
Definition: utility.cc:186
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
types.hh
ArmISA::getExecutingAsid
uint64_t getExecutingAsid(ThreadContext *tc)
Definition: utility.hh:414
ArmISA::isUnpriviledgeAccess
bool isUnpriviledgeAccess(ThreadContext *tc)
Definition: utility.cc:1340
ThreadContext::readMiscReg
virtual RegVal readMiscReg(RegIndex misc_reg)=0
ArmISA::MiscRegIndex
MiscRegIndex
Definition: miscregs.hh:56
addr
ip6_addr_t addr
Definition: inet.hh:423
ArmISA::isGenericTimerCommonEL0HypTrap
bool isGenericTimerCommonEL0HypTrap(const MiscRegIndex miscReg, ThreadContext *tc, ExceptionClass *ec)
Definition: utility.cc:937
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:1136
ArmISA::MODE_MON
@ MODE_MON
Definition: types.hh:640
ArmISA::c
Bitfield< 29 > c
Definition: miscregs_types.hh:50
RefCountingPtr
If you want a reference counting pointer to a mutable object, create it like this:
Definition: refcnt.hh:118
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:278
ArmISA::MODE_USER
@ MODE_USER
Definition: types.hh:636
ArmISA::inAArch64
bool inAArch64(ThreadContext *tc)
Definition: utility.cc:222
ArmISA::nz
nz
Definition: miscregs_types.hh:49
ArmISA::isGenericTimerPhysEL0SystemAccessTrapEL2
bool isGenericTimerPhysEL0SystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1082
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:762
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:994
ArmISA::MODE_EL2H
@ MODE_EL2H
Definition: types.hh:633
ArmISA::isGenericTimerSystemAccessTrapEL2
bool isGenericTimerSystemAccessTrapEL2(const MiscRegIndex miscReg, ThreadContext *tc)
Definition: utility.cc:1035
ArmISA::roundPage
Addr roundPage(Addr addr)
Definition: utility.cc:591
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:507
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:168
ArmISA::isSecure
bool isSecure(ThreadContext *tc)
Definition: utility.cc:174
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 Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17