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

Generated on Fri Feb 28 2020 16:26:55 for gem5 by doxygen 1.8.13