gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
faults.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, 2012-2013, 2016-2019 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 __ARM_FAULTS_HH__
43 #define __ARM_FAULTS_HH__
44 
45 #include "arch/arm/miscregs.hh"
46 #include "arch/arm/pagetable.hh"
47 #include "arch/arm/types.hh"
48 #include "base/logging.hh"
49 #include "sim/faults.hh"
50 #include "sim/full_system.hh"
51 
52 // The design of the "name" and "vect" functions is in sim/faults.hh
53 
54 namespace ArmISA
55 {
56 typedef Addr FaultOffset;
57 
58 class ArmStaticInst;
59 
60 class ArmFault : public FaultBase
61 {
62  protected:
64  uint32_t issRaw;
65 
66  // Helper variables for ARMv8 exception handling
67  bool from64; // True if the exception is generated from the AArch64 state
68  bool to64; // True if the exception is taken in AArch64 state
69  ExceptionLevel fromEL; // Source exception level
70  ExceptionLevel toEL; // Target exception level
71  OperatingMode fromMode; // Source operating mode (aarch32)
72  OperatingMode toMode; // Next operating mode (aarch32)
73 
74  // This variable is true if the above fault specific informations
75  // have been updated. This is to prevent that a client is using their
76  // un-updated default constructed value.
78 
79  bool hypRouted; // True if the fault has been routed to Hypervisor
80  bool span; // True if the fault is setting the PSTATE.PAN bit
81 
82  virtual Addr getVector(ThreadContext *tc);
84 
85  public:
91  {
93  InstructionCacheMaintenance, // Short-desc. format only
102  TLBConflictAbort, // Requires LPAE
106  AddressSizeLL, // AArch64 only
107 
108  // Not real faults. These are faults to allow the translation function
109  // to inform the memory access function not to proceed for a prefetch
110  // that misses in the TLB or that targets an uncacheable address
113 
116  };
117 
126 
128  {
129  S1PTW, // DataAbort, PrefetchAbort: Stage 1 Page Table Walk,
130  OVA, // DataAbort, PrefetchAbort: stage 1 Virtual Address for stage 2 faults
131  SAS, // DataAbort: Syndrome Access Size
132  SSE, // DataAbort: Syndrome Sign Extend
133  SRT, // DataAbort: Syndrome Register Transfer
134  CM, // DataAbort: Cache Maintenance/Address Translation Op
135  OFA, // DataAbort: Override fault Address. This is needed when
136  // the abort is triggered by a CMO. The faulting address is
137  // then the address specified in the register argument of the
138  // instruction and not the cacheline address (See FAR doc)
139 
140  // AArch64 only
141  SF, // DataAbort: width of the accessed register is SixtyFour
142  AR // DataAbort: Acquire/Release semantics
143  };
144 
146  {
150  };
151 
152  struct FaultVals
153  {
155 
156  const FaultOffset offset;
157 
158  // Offsets used for exceptions taken in AArch64 state
159  const uint16_t currELTOffset;
160  const uint16_t currELHOffset;
161  const uint16_t lowerEL64Offset;
162  const uint16_t lowerEL32Offset;
163 
165 
166  const uint8_t armPcOffset;
167  const uint8_t thumbPcOffset;
168  // The following two values are used in place of armPcOffset and
169  // thumbPcOffset when the exception return address is saved into ELR
170  // registers (exceptions taken in HYP mode or in AArch64 state)
171  const uint8_t armPcElrOffset;
172  const uint8_t thumbPcElrOffset;
173 
174  const bool hypTrappable;
175  const bool abortDisable;
176  const bool fiqDisable;
177 
178  // Exception class used to appropriately set the syndrome register
179  // (exceptions taken in HYP mode or in AArch64 state)
181 
183  FaultVals(const FaultName& name_, const FaultOffset& offset_,
184  const uint16_t& currELTOffset_, const uint16_t& currELHOffset_,
185  const uint16_t& lowerEL64Offset_,
186  const uint16_t& lowerEL32Offset_,
187  const OperatingMode& nextMode_, const uint8_t& armPcOffset_,
188  const uint8_t& thumbPcOffset_, const uint8_t& armPcElrOffset_,
189  const uint8_t& thumbPcElrOffset_, const bool& hypTrappable_,
190  const bool& abortDisable_, const bool& fiqDisable_,
191  const ExceptionClass& ec_)
192  : name(name_), offset(offset_), currELTOffset(currELTOffset_),
193  currELHOffset(currELHOffset_), lowerEL64Offset(lowerEL64Offset_),
194  lowerEL32Offset(lowerEL32Offset_), nextMode(nextMode_),
195  armPcOffset(armPcOffset_), thumbPcOffset(thumbPcOffset_),
196  armPcElrOffset(armPcElrOffset_), thumbPcElrOffset(thumbPcElrOffset_),
197  hypTrappable(hypTrappable_), abortDisable(abortDisable_),
198  fiqDisable(fiqDisable_), ec(ec_) {}
199  };
200 
201  ArmFault(ExtMachInst _machInst = 0, uint32_t _iss = 0) :
202  machInst(_machInst), issRaw(_iss), from64(false), to64(false),
203  fromEL(EL0), toEL(EL0), fromMode(MODE_UNDEFINED),
204  faultUpdated(false), hypRouted(false), span(false) {}
205 
206  // Returns the actual syndrome register to use based on the target
207  // exception level
209  // Returns the actual fault address register to use based on the target
210  // exception level
212 
213  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
215  void invoke64(ThreadContext *tc, const StaticInstPtr &inst =
217  void update(ThreadContext *tc);
218 
220  virtual void annotate(AnnotationIDs id, uint64_t val) {}
221  virtual FaultStat& countStat() = 0;
222  virtual FaultOffset offset(ThreadContext *tc) = 0;
223  virtual FaultOffset offset64(ThreadContext *tc) = 0;
224  virtual OperatingMode nextMode() = 0;
225  virtual bool routeToMonitor(ThreadContext *tc) const = 0;
226  virtual bool routeToHyp(ThreadContext *tc) const { return false; }
227  virtual uint8_t armPcOffset(bool isHyp) = 0;
228  virtual uint8_t thumbPcOffset(bool isHyp) = 0;
229  virtual uint8_t armPcElrOffset() = 0;
230  virtual uint8_t thumbPcElrOffset() = 0;
231  virtual bool abortDisable(ThreadContext *tc) = 0;
232  virtual bool fiqDisable(ThreadContext *tc) = 0;
233  virtual ExceptionClass ec(ThreadContext *tc) const = 0;
234  virtual uint32_t iss() const = 0;
235  virtual bool isStage2() const { return false; }
236  virtual FSR getFsr(ThreadContext *tc) const { return 0; }
237  virtual void setSyndrome(ThreadContext *tc, MiscRegIndex syndrome_reg);
238  virtual bool getFaultVAddr(Addr &va) const { return false; }
239 
240 };
241 
242 template<typename T>
243 class ArmFaultVals : public ArmFault
244 {
245  protected:
246  static FaultVals vals;
247 
248  public:
249  ArmFaultVals<T>(ExtMachInst _machInst = 0, uint32_t _iss = 0) :
250  ArmFault(_machInst, _iss) {}
251  FaultName name() const override { return vals.name; }
252  FaultStat & countStat() override { return vals.count; }
253  FaultOffset offset(ThreadContext *tc) override;
254 
255  FaultOffset offset64(ThreadContext *tc) override;
256 
257  OperatingMode nextMode() override { return vals.nextMode; }
258  virtual bool routeToMonitor(ThreadContext *tc) const override {
259  return false;
260  }
261  uint8_t armPcOffset(bool isHyp) override {
262  return isHyp ? vals.armPcElrOffset
263  : vals.armPcOffset;
264  }
265  uint8_t thumbPcOffset(bool isHyp) override {
266  return isHyp ? vals.thumbPcElrOffset
267  : vals.thumbPcOffset;
268  }
269  uint8_t armPcElrOffset() override { return vals.armPcElrOffset; }
270  uint8_t thumbPcElrOffset() override { return vals.thumbPcElrOffset; }
271  bool abortDisable(ThreadContext* tc) override { return vals.abortDisable; }
272  bool fiqDisable(ThreadContext* tc) override { return vals.fiqDisable; }
273  ExceptionClass ec(ThreadContext *tc) const override { return vals.ec; }
274  uint32_t iss() const override { return issRaw; }
275 };
276 
277 class Reset : public ArmFaultVals<Reset>
278 {
279  protected:
280  Addr getVector(ThreadContext *tc) override;
281 
282  public:
283  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
285 };
286 
287 class UndefinedInstruction : public ArmFaultVals<UndefinedInstruction>
288 {
289  protected:
290  bool unknown;
291  bool disabled;
293  const char *mnemonic;
294 
295  public:
297  bool _unknown,
298  const char *_mnemonic = NULL,
299  bool _disabled = false) :
301  unknown(_unknown), disabled(_disabled),
302  overrideEc(EC_INVALID), mnemonic(_mnemonic)
303  {}
304  UndefinedInstruction(ExtMachInst _machInst, uint32_t _iss,
305  ExceptionClass _overrideEc, const char *_mnemonic = NULL) :
306  ArmFaultVals<UndefinedInstruction>(_machInst, _iss),
307  unknown(false), disabled(true), overrideEc(_overrideEc),
308  mnemonic(_mnemonic)
309  {}
310 
311  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
313  bool routeToHyp(ThreadContext *tc) const override;
314  ExceptionClass ec(ThreadContext *tc) const override;
315  uint32_t iss() const override;
316 };
317 
318 class SupervisorCall : public ArmFaultVals<SupervisorCall>
319 {
320  protected:
322  public:
323  SupervisorCall(ExtMachInst _machInst, uint32_t _iss,
324  ExceptionClass _overrideEc = EC_INVALID) :
325  ArmFaultVals<SupervisorCall>(_machInst, _iss),
326  overrideEc(_overrideEc)
327  {}
328 
329  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
331  bool routeToHyp(ThreadContext *tc) const override;
332  ExceptionClass ec(ThreadContext *tc) const override;
333  uint32_t iss() const override;
334 };
335 
336 class SecureMonitorCall : public ArmFaultVals<SecureMonitorCall>
337 {
338  public:
340  ArmFaultVals<SecureMonitorCall>(_machInst)
341  {}
342 
343  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
345  ExceptionClass ec(ThreadContext *tc) const override;
346  uint32_t iss() const override;
347 };
348 
349 class SupervisorTrap : public ArmFaultVals<SupervisorTrap>
350 {
351  protected:
354 
355  public:
356  SupervisorTrap(ExtMachInst _machInst, uint32_t _iss,
357  ExceptionClass _overrideEc = EC_INVALID) :
358  ArmFaultVals<SupervisorTrap>(_machInst, _iss),
359  overrideEc(_overrideEc)
360  {}
361 
362  bool routeToHyp(ThreadContext *tc) const override;
363  uint32_t iss() const override;
364  ExceptionClass ec(ThreadContext *tc) const override;
365 };
366 
367 class SecureMonitorTrap : public ArmFaultVals<SecureMonitorTrap>
368 {
369  protected:
372 
373  public:
374  SecureMonitorTrap(ExtMachInst _machInst, uint32_t _iss,
375  ExceptionClass _overrideEc = EC_INVALID) :
376  ArmFaultVals<SecureMonitorTrap>(_machInst, _iss),
377  overrideEc(_overrideEc)
378  {}
379 
380  ExceptionClass ec(ThreadContext *tc) const override;
381 };
382 
383 class HypervisorCall : public ArmFaultVals<HypervisorCall>
384 {
385  public:
386  HypervisorCall(ExtMachInst _machInst, uint32_t _imm);
387 
388  ExceptionClass ec(ThreadContext *tc) const override;
389 };
390 
391 class HypervisorTrap : public ArmFaultVals<HypervisorTrap>
392 {
393  protected:
396 
397  public:
398  HypervisorTrap(ExtMachInst _machInst, uint32_t _iss,
399  ExceptionClass _overrideEc = EC_INVALID) :
400  ArmFaultVals<HypervisorTrap>(_machInst, _iss),
401  overrideEc(_overrideEc)
402  {}
403 
404  ExceptionClass ec(ThreadContext *tc) const override;
405 };
406 
407 template <class T>
408 class AbortFault : public ArmFaultVals<T>
409 {
410  protected:
424  bool write;
426  uint8_t source;
427  uint8_t srcEncoded;
428  bool stage2;
429  bool s1ptw;
431 
432  public:
433  AbortFault(Addr _faultAddr, bool _write, TlbEntry::DomainType _domain,
434  uint8_t _source, bool _stage2,
436  faultAddr(_faultAddr), OVAddr(0), write(_write),
437  domain(_domain), source(_source), srcEncoded(0),
438  stage2(_stage2), s1ptw(false), tranMethod(_tranMethod)
439  {}
440 
441  bool getFaultVAddr(Addr &va) const override;
442 
443  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
445 
446  FSR getFsr(ThreadContext *tc) const override;
447  uint8_t getFaultStatusCode(ThreadContext *tc) const;
448  bool abortDisable(ThreadContext *tc) override;
449  uint32_t iss() const override;
450  bool isStage2() const override { return stage2; }
451  void annotate(ArmFault::AnnotationIDs id, uint64_t val) override;
452  void setSyndrome(ThreadContext *tc, MiscRegIndex syndrome_reg) override;
453  bool isMMUFault() const;
454 };
455 
456 class PrefetchAbort : public AbortFault<PrefetchAbort>
457 {
458  public:
459  static const MiscRegIndex FsrIndex = MISCREG_IFSR;
460  static const MiscRegIndex FarIndex = MISCREG_IFAR;
461  static const MiscRegIndex HFarIndex = MISCREG_HIFAR;
462 
463  PrefetchAbort(Addr _addr, uint8_t _source, bool _stage2 = false,
465  AbortFault<PrefetchAbort>(_addr, false, TlbEntry::DomainType::NoAccess,
466  _source, _stage2, _tranMethod)
467  {}
468 
469  ExceptionClass ec(ThreadContext *tc) const override;
470  // @todo: external aborts should be routed if SCR.EA == 1
471  bool routeToMonitor(ThreadContext *tc) const override;
472  bool routeToHyp(ThreadContext *tc) const override;
473 };
474 
475 class DataAbort : public AbortFault<DataAbort>
476 {
477  public:
478  static const MiscRegIndex FsrIndex = MISCREG_DFSR;
479  static const MiscRegIndex FarIndex = MISCREG_DFAR;
480  static const MiscRegIndex HFarIndex = MISCREG_HDFAR;
481  bool isv;
482  uint8_t sas;
483  uint8_t sse;
484  uint8_t srt;
485  uint8_t cm;
486 
487  // AArch64 only
488  bool sf;
489  bool ar;
490 
491  DataAbort(Addr _addr, TlbEntry::DomainType _domain, bool _write, uint8_t _source,
492  bool _stage2 = false, ArmFault::TranMethod _tranMethod = ArmFault::UnknownTran) :
493  AbortFault<DataAbort>(_addr, _write, _domain, _source, _stage2,
494  _tranMethod),
495  isv(false), sas (0), sse(0), srt(0), cm(0), sf(false), ar(false)
496  {}
497 
498  ExceptionClass ec(ThreadContext *tc) const override;
499  // @todo: external aborts should be routed if SCR.EA == 1
500  bool routeToMonitor(ThreadContext *tc) const override;
501  bool routeToHyp(ThreadContext *tc) const override;
502  uint32_t iss() const override;
503  void annotate(AnnotationIDs id, uint64_t val) override;
504 };
505 
506 class VirtualDataAbort : public AbortFault<VirtualDataAbort>
507 {
508  public:
509  static const MiscRegIndex FsrIndex = MISCREG_DFSR;
510  static const MiscRegIndex FarIndex = MISCREG_DFAR;
511  static const MiscRegIndex HFarIndex = MISCREG_HDFAR;
512 
513  VirtualDataAbort(Addr _addr, TlbEntry::DomainType _domain, bool _write,
514  uint8_t _source) :
515  AbortFault<VirtualDataAbort>(_addr, _write, _domain, _source, false)
516  {}
517 
518  void invoke(ThreadContext *tc, const StaticInstPtr &inst) override;
519 };
520 
521 class Interrupt : public ArmFaultVals<Interrupt>
522 {
523  public:
524  bool routeToMonitor(ThreadContext *tc) const override;
525  bool routeToHyp(ThreadContext *tc) const override;
526  bool abortDisable(ThreadContext *tc) override;
527 };
528 
529 class VirtualInterrupt : public ArmFaultVals<VirtualInterrupt>
530 {
531  public:
533 };
534 
535 class FastInterrupt : public ArmFaultVals<FastInterrupt>
536 {
537  public:
538  bool routeToMonitor(ThreadContext *tc) const override;
539  bool routeToHyp(ThreadContext *tc) const override;
540  bool abortDisable(ThreadContext *tc) override;
541  bool fiqDisable(ThreadContext *tc) override;
542 };
543 
544 class VirtualFastInterrupt : public ArmFaultVals<VirtualFastInterrupt>
545 {
546  public:
548 };
549 
551 class PCAlignmentFault : public ArmFaultVals<PCAlignmentFault>
552 {
553  protected:
556  public:
557  PCAlignmentFault(Addr _faultPC) : faultPC(_faultPC)
558  {}
559  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
561  bool routeToHyp(ThreadContext *tc) const override;
562 };
563 
565 class SPAlignmentFault : public ArmFaultVals<SPAlignmentFault>
566 {
567  public:
569  bool routeToHyp(ThreadContext *tc) const override;
570 };
571 
573 class SystemError : public ArmFaultVals<SystemError>
574 {
575  public:
576  SystemError();
577  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
579  bool routeToMonitor(ThreadContext *tc) const override;
580  bool routeToHyp(ThreadContext *tc) const override;
581 };
582 
584 class SoftwareBreakpoint : public ArmFaultVals<SoftwareBreakpoint>
585 {
586  public:
587  SoftwareBreakpoint(ExtMachInst _mach_inst, uint32_t _iss);
588 
589  bool routeToHyp(ThreadContext *tc) const override;
590  ExceptionClass ec(ThreadContext *tc) const override;
591 };
592 
593 // A fault that flushes the pipe, excluding the faulting instructions
594 class ArmSev : public ArmFaultVals<ArmSev>
595 {
596  public:
597  ArmSev () {}
598  void invoke(ThreadContext *tc, const StaticInstPtr &inst =
600 };
601 
603 class IllegalInstSetStateFault : public ArmFaultVals<IllegalInstSetStateFault>
604 {
605  public:
607 };
608 
609 /*
610  * Explicitly declare template static member variables to avoid warnings
611  * in some clang versions
612  */
634 
645 bool getFaultVAddr(Fault fault, Addr &va);
646 
647 
648 } // namespace ArmISA
649 
650 #endif // __ARM_FAULTS_HH__
ExceptionClass overrideEc
Definition: faults.hh:353
bool abortDisable(ThreadContext *tc) override
Definition: faults.hh:271
HypervisorTrap(ExtMachInst _machInst, uint32_t _iss, ExceptionClass _overrideEc=EC_INVALID)
Definition: faults.hh:398
static uint8_t aarch64FaultSources[NumFaultSources]
Encodings of the fault sources in AArch64 state.
Definition: faults.hh:125
static FaultVals vals
Definition: faults.hh:246
Illegal Instruction Set State fault (AArch64 only)
Definition: faults.hh:603
MiscRegIndex
Definition: miscregs.hh:56
ExceptionClass overrideEc
Definition: faults.hh:321
uint8_t source
Definition: faults.hh:426
MiscRegIndex getFaultAddrReg64() const
Definition: faults.cc:362
Stack pointer alignment fault (AArch64 only)
Definition: faults.hh:565
const uint16_t currELTOffset
Definition: faults.hh:159
DataAbort(Addr _addr, TlbEntry::DomainType _domain, bool _write, uint8_t _source, bool _stage2=false, ArmFault::TranMethod _tranMethod=ArmFault::UnknownTran)
Definition: faults.hh:491
uint32_t issRaw
Definition: faults.hh:64
uint64_t ExtMachInst
Definition: types.hh:39
System error (AArch64 only)
Definition: faults.hh:584
PCAlignmentFault(Addr _faultPC)
Definition: faults.hh:557
FaultName name() const override
Definition: faults.hh:251
ExceptionClass ec(ThreadContext *tc) const override
Definition: faults.hh:273
OperatingMode
Definition: types.hh:590
const OperatingMode nextMode
Definition: faults.hh:164
uint8_t armPcOffset(bool isHyp) override
Definition: faults.hh:261
Definition: ccregs.hh:41
virtual FSR getFsr(ThreadContext *tc) const
Definition: faults.hh:236
const uint16_t currELHOffset
Definition: faults.hh:160
uint8_t thumbPcElrOffset() override
Definition: faults.hh:270
ExceptionLevel fromEL
Definition: faults.hh:69
ThreadContext is the external interface to all thread state for anything outside of the CPU...
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2505
uint8_t armPcElrOffset() override
Definition: faults.hh:269
PrefetchAbort(Addr _addr, uint8_t _source, bool _stage2=false, ArmFault::TranMethod _tranMethod=ArmFault::UnknownTran)
Definition: faults.hh:463
VirtualDataAbort(Addr _addr, TlbEntry::DomainType _domain, bool _write, uint8_t _source)
Definition: faults.hh:513
virtual bool routeToHyp(ThreadContext *tc) const
Definition: faults.hh:226
AbortFault(Addr _faultAddr, bool _write, TlbEntry::DomainType _domain, uint8_t _source, bool _stage2, ArmFault::TranMethod _tranMethod=ArmFault::UnknownTran)
Definition: faults.hh:433
Bitfield< 63 > val
Definition: misc.hh:769
ExceptionLevel
Definition: types.hh:583
virtual FaultOffset offset64(ThreadContext *tc)=0
Addr faultAddr
The virtual address the fault occured at.
Definition: faults.hh:417
static uint8_t shortDescFaultSources[NumFaultSources]
Encodings of the fault sources when the short-desc.
Definition: faults.hh:120
virtual bool getFaultVAddr(Addr &va) const
Definition: faults.hh:238
ExceptionClass overrideEc
Definition: faults.hh:292
SupervisorTrap(ExtMachInst _machInst, uint32_t _iss, ExceptionClass _overrideEc=EC_INVALID)
Definition: faults.hh:356
bool isStage2() const override
Definition: faults.hh:450
Addr FaultOffset
Definition: faults.hh:56
SecureMonitorCall(ExtMachInst _machInst)
Definition: faults.hh:339
TlbEntry::DomainType domain
Definition: faults.hh:425
PC alignment fault (AArch64 only)
Definition: faults.hh:551
UndefinedInstruction(ExtMachInst _machInst, bool _unknown, const char *_mnemonic=NULL, bool _disabled=false)
Definition: faults.hh:296
static uint8_t longDescFaultSources[NumFaultSources]
Encodings of the fault sources when the long-desc.
Definition: faults.hh:123
const uint8_t thumbPcElrOffset
Definition: faults.hh:172
ArmFault::TranMethod tranMethod
Definition: faults.hh:430
System error (AArch64 only)
Definition: faults.hh:573
UndefinedInstruction(ExtMachInst _machInst, uint32_t _iss, ExceptionClass _overrideEc, const char *_mnemonic=NULL)
Definition: faults.hh:304
ExceptionClass overrideEc
Definition: faults.hh:371
const uint16_t lowerEL32Offset
Definition: faults.hh:162
const char * FaultName
Definition: faults.hh:36
virtual void annotate(AnnotationIDs id, uint64_t val)
Definition: faults.hh:220
ArmStaticInst * instrAnnotate(const StaticInstPtr &inst)
Definition: faults.cc:708
virtual bool routeToMonitor(ThreadContext *tc) const override
Definition: faults.hh:258
const uint16_t lowerEL64Offset
Definition: faults.hh:161
ExtMachInst machInst
Definition: faults.hh:394
uint32_t iss() const override
Definition: faults.hh:274
FaultStat & countStat() override
Definition: faults.hh:252
const uint8_t armPcElrOffset
Definition: faults.hh:171
virtual FaultStat & countStat()=0
virtual bool routeToMonitor(ThreadContext *tc) const =0
SecureMonitorTrap(ExtMachInst _machInst, uint32_t _iss, ExceptionClass _overrideEc=EC_INVALID)
Definition: faults.hh:374
Addr OVAddr
Original virtual address.
Definition: faults.hh:423
const FaultName name
Definition: faults.hh:154
Addr getVector64(ThreadContext *tc)
Definition: faults.cc:323
ExtMachInst machInst
Definition: faults.hh:63
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:140
MiscRegIndex getSyndromeReg64() const
Definition: faults.cc:346
void invoke64(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
Definition: faults.cc:614
const uint8_t thumbPcOffset
Definition: faults.hh:167
Bitfield< 8 > va
uint8_t srcEncoded
Definition: faults.hh:427
SupervisorCall(ExtMachInst _machInst, uint32_t _iss, ExceptionClass _overrideEc=EC_INVALID)
Definition: faults.hh:323
const ExceptionClass ec
Definition: faults.hh:180
virtual bool isStage2() const
Definition: faults.hh:235
ExceptionClass
Definition: types.hh:610
virtual uint32_t iss() const =0
uint8_t thumbPcOffset(bool isHyp) override
Definition: faults.hh:265
virtual Addr getVector(ThreadContext *tc)
Definition: faults.cc:291
bool hypRouted
Definition: faults.hh:79
const FaultOffset offset
Definition: faults.hh:156
FaultVals(const FaultName &name_, const FaultOffset &offset_, const uint16_t &currELTOffset_, const uint16_t &currELHOffset_, const uint16_t &lowerEL64Offset_, const uint16_t &lowerEL32Offset_, const OperatingMode &nextMode_, const uint8_t &armPcOffset_, const uint8_t &thumbPcOffset_, const uint8_t &armPcElrOffset_, const uint8_t &thumbPcElrOffset_, const bool &hypTrappable_, const bool &abortDisable_, const bool &fiqDisable_, const ExceptionClass &ec_)
Definition: faults.hh:183
bool faultUpdated
Definition: faults.hh:77
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr) override
Definition: faults.cc:469
ExceptionLevel toEL
Definition: faults.hh:70
OperatingMode toMode
Definition: faults.hh:72
bool fiqDisable(ThreadContext *tc) override
Definition: faults.hh:272
const uint8_t armPcOffset
Definition: faults.hh:166
FaultSource
Generic fault source enums used to index into {short/long/aarch64}DescFaultSources[] to get the actua...
Definition: faults.hh:90
void update(ThreadContext *tc)
Definition: faults.cc:419
OperatingMode nextMode() override
Definition: faults.hh:257
virtual void setSyndrome(ThreadContext *tc, MiscRegIndex syndrome_reg)
Definition: faults.cc:378
static StaticInstPtr nullStaticInstPtr
Pointer to a statically allocated "null" instruction object.
Definition: static_inst.hh:225
Addr faultPC
The unaligned value of the PC.
Definition: faults.hh:555
ExtMachInst machInst
Definition: faults.hh:370
ExtMachInst machInst
Definition: faults.hh:352
std::shared_ptr< FaultBase > Fault
Definition: types.hh:238
OperatingMode fromMode
Definition: faults.hh:71
ExceptionClass overrideEc
Definition: faults.hh:395
ArmFault(ExtMachInst _machInst=0, uint32_t _iss=0)
Definition: faults.hh:201

Generated on Mon Jun 8 2020 15:34:38 for gem5 by doxygen 1.8.13