42#ifndef __ARM_FAULTS_HH__
43#define __ARM_FAULTS_HH__
197 uint16_t curr_elt_offset, uint16_t curr_elh_offset,
198 uint16_t lower_el64_offset,
199 uint16_t lower_el32_offset,
201 uint8_t thumb_pc_offset, uint8_t arm_pc_elr_offset,
202 uint8_t thumb_pc_elr_offset,
bool hyp_trappable,
203 bool abort_disable,
bool fiq_disable,
250 virtual uint32_t
iss()
const = 0;
333 const char *_mnemonic = NULL,
334 bool _disabled =
false) :
353 uint32_t
iss()
const override;
376 uint32_t
iss()
const override;
394 uint32_t
iss()
const override;
414 uint32_t
iss()
const override;
492 uint8_t _source,
bool _stage2,
526 _source, _stage2, _tranMethod, _debug)
537 uint32_t
iss()
const override;
561 _tranMethod, _debug_type),
574 uint32_t
iss()
const override;
708 uint32_t
iss()
const override;
724 uint32_t
iss()
const override;
ArmFault::TranMethod tranMethod
AbortFault(Addr _faultAddr, bool _write, TlbEntry::DomainType _domain, uint8_t _source, bool _stage2, ArmFault::TranMethod _tranMethod=ArmFault::UnknownTran, ArmFault::DebugType _debug=ArmFault::NODEBUG)
Addr OVAddr
Original virtual address.
Addr faultAddr
The virtual address the fault occured at.
void setSyndrome(ThreadContext *tc, MiscRegIndex syndrome_reg) override
uint8_t getFaultStatusCode(ThreadContext *tc) const
TlbEntry::DomainType domain
ArmFault::DebugType debugType
bool isStage2() const override
void annotate(ArmFault::AnnotationIDs id, uint64_t val) override
bool abortDisable(ThreadContext *tc) override
bool getFaultVAddr(Addr &va) const override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
FSR getFsr(ThreadContext *tc) const override
virtual bool routeToMonitor(ThreadContext *tc) const override
ExceptionClass ec(ThreadContext *tc) const override
Syndrome methods.
ArmFaultVals(ExtMachInst mach_inst=0, uint32_t _iss=0)
FaultOffset offset64(ThreadContext *tc) override
bool il(ThreadContext *tc) const override
uint8_t armPcOffset(bool is_hyp) override
bool fiqDisable(ThreadContext *tc) override
uint32_t iss() const override
uint8_t armPcElrOffset() override
bool abortDisable(ThreadContext *tc) override
OperatingMode nextMode() override
FaultName name() const override
uint8_t thumbPcOffset(bool is_hyp) override
uint8_t thumbPcElrOffset() override
virtual FaultOffset offset(ThreadContext *tc)=0
virtual FSR getFsr(ThreadContext *tc) const
virtual bool routeToMonitor(ThreadContext *tc) const =0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
FaultSource
Generic fault source enums used to index into {short/long/aarch64}DescFaultSources[] to get the actua...
@ InstructionCacheMaintenance
@ SynchExtAbtOnTranslTableWalkLL
@ AsynchPtyErrOnMemoryAccess
@ SynchPtyErrOnTranslTableWalkLL
@ AsynchronousExternalAbort
@ SynchPtyErrOnMemoryAccess
@ SynchronousExternalAbort
virtual uint32_t iss() const =0
static uint8_t shortDescFaultSources[NumFaultSources]
Encodings of the fault sources when the short-desc.
virtual bool routeToHyp(ThreadContext *tc) const
void invoke32(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr)
virtual uint8_t thumbPcOffset(bool is_hyp)=0
MiscRegIndex getSyndromeReg64() const
virtual void annotate(AnnotationIDs id, uint64_t val)
virtual Addr getVector(ThreadContext *tc)
virtual bool il(ThreadContext *tc) const =0
ArmStaticInst * instrAnnotate(const StaticInstPtr &inst)
virtual FaultOffset offset64(ThreadContext *tc)=0
virtual bool abortDisable(ThreadContext *tc)=0
virtual uint32_t vectorCatchFlag() const
void update(ThreadContext *tc)
static uint8_t longDescFaultSources[NumFaultSources]
Encodings of the fault sources when the long-desc.
void invoke64(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr)
virtual bool isStage2() const
virtual uint8_t armPcOffset(bool is_hyp)=0
virtual uint8_t thumbPcElrOffset()=0
virtual bool fiqDisable(ThreadContext *tc)=0
OperatingMode getToMode() const
virtual bool getFaultVAddr(Addr &va) const
bool vectorCatch(ThreadContext *tc, const StaticInstPtr &inst)
static uint8_t aarch64FaultSources[NumFaultSources]
Encodings of the fault sources in AArch64 state.
virtual uint8_t armPcElrOffset()=0
virtual OperatingMode nextMode()=0
virtual ExceptionClass ec(ThreadContext *tc) const =0
Addr getVector64(ThreadContext *tc)
virtual void setSyndrome(ThreadContext *tc, MiscRegIndex syndrome_reg)
ArmFault(ExtMachInst mach_inst=0, uint32_t _iss=0)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
static const MiscRegIndex FarIndex
bool routeToHyp(ThreadContext *tc) const override
uint32_t iss() const override
void annotate(AnnotationIDs id, uint64_t val) override
DataAbort(Addr _addr, TlbEntry::DomainType _domain, bool _write, uint8_t _source, bool _stage2=false, ArmFault::TranMethod _tranMethod=ArmFault::UnknownTran, ArmFault::DebugType _debug_type=ArmFault::NODEBUG)
uint32_t vectorCatchFlag() const override
bool routeToMonitor(ThreadContext *tc) const override
static const MiscRegIndex HFarIndex
static const MiscRegIndex FsrIndex
bool fiqDisable(ThreadContext *tc) override
bool abortDisable(ThreadContext *tc) override
bool routeToMonitor(ThreadContext *tc) const override
bool routeToHyp(ThreadContext *tc) const override
uint32_t vectorCatchFlag() const override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
bool routeToHyp(ThreadContext *tc) const override
bool il(ThreadContext *tc) const override
HardwareBreakpoint(Addr _vaddr, uint32_t _iss)
bool routeToMonitor(ThreadContext *tc) const override
HypervisorCall(ExtMachInst mach_inst, uint32_t _imm)
uint32_t vectorCatchFlag() const override
bool routeToHyp(ThreadContext *tc) const override
ExceptionClass overrideEc
HypervisorTrap(ExtMachInst mach_inst, uint32_t _iss, ExceptionClass _overrideEc=ExceptionClass::INVALID)
Illegal Instruction Set State fault (AArch64 only)
IllegalInstSetStateFault()
bool il(ThreadContext *tc) const override
Syndrome methods.
bool routeToHyp(ThreadContext *tc) const override
uint32_t vectorCatchFlag() const override
bool abortDisable(ThreadContext *tc) override
bool routeToHyp(ThreadContext *tc) const override
bool routeToMonitor(ThreadContext *tc) const override
PC alignment fault (AArch64 only)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
bool il(ThreadContext *tc) const override
Syndrome methods.
bool routeToHyp(ThreadContext *tc) const override
Addr faultPC
The unaligned value of the PC.
PCAlignmentFault(Addr fault_pc)
PrefetchAbort(Addr _addr, uint8_t _source, bool _stage2=false, ArmFault::TranMethod _tranMethod=ArmFault::UnknownTran, ArmFault::DebugType _debug=ArmFault::NODEBUG)
uint32_t iss() const override
static const MiscRegIndex FarIndex
bool il(ThreadContext *tc) const override
uint32_t vectorCatchFlag() const override
static const MiscRegIndex HFarIndex
bool routeToHyp(ThreadContext *tc) const override
bool routeToMonitor(ThreadContext *tc) const override
static const MiscRegIndex FsrIndex
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
Addr getVector(ThreadContext *tc) override
Stack pointer alignment fault (AArch64 only)
bool routeToHyp(ThreadContext *tc) const override
bool il(ThreadContext *tc) const override
Syndrome methods.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
uint32_t iss() const override
uint32_t vectorCatchFlag() const override
SecureMonitorCall(ExtMachInst mach_inst)
ExceptionClass overrideEc
SecureMonitorTrap(ExtMachInst mach_inst, uint32_t _iss, ExceptionClass _overrideEc=ExceptionClass::INVALID)
Software Breakpoint (AArch64 only)
bool routeToHyp(ThreadContext *tc) const override
SoftwareBreakpoint(ExtMachInst mach_inst, uint32_t _iss)
bool routeToHyp(ThreadContext *tc) const override
bool il(ThreadContext *tc) const override
uint32_t iss() const override
SoftwareStepFault(ExtMachInst mach_inst, bool is_ldx, bool stepped)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
uint32_t vectorCatchFlag() const override
ExceptionClass overrideEc
bool routeToHyp(ThreadContext *tc) const override
uint32_t iss() const override
SupervisorCall(ExtMachInst mach_inst, uint32_t _iss, ExceptionClass _overrideEc=ExceptionClass::INVALID)
bool routeToHyp(ThreadContext *tc) const override
SupervisorTrap(ExtMachInst mach_inst, uint32_t _iss, ExceptionClass _overrideEc=ExceptionClass::INVALID)
ExceptionClass overrideEc
uint32_t iss() const override
System error (AArch64 only)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
bool il(ThreadContext *tc) const override
Syndrome methods.
bool routeToMonitor(ThreadContext *tc) const override
bool routeToHyp(ThreadContext *tc) const override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
UndefinedInstruction(ExtMachInst mach_inst, uint32_t _iss, ExceptionClass _overrideEc, const char *_mnemonic=NULL)
UndefinedInstruction(ExtMachInst mach_inst, bool _unknown, const char *_mnemonic=NULL, bool _disabled=false)
ExceptionClass overrideEc
uint32_t vectorCatchFlag() const override
bool routeToHyp(ThreadContext *tc) const override
uint32_t iss() const override
VirtualDataAbort(Addr _addr, TlbEntry::DomainType _domain, bool _write, uint8_t _source)
static const MiscRegIndex FsrIndex
void invoke(ThreadContext *tc, const StaticInstPtr &inst) override
static const MiscRegIndex FarIndex
static const MiscRegIndex HFarIndex
Watchpoint(ExtMachInst mach_inst, Addr vaddr, bool _write, bool _cm)
bool il(ThreadContext *tc) const override
bool routeToHyp(ThreadContext *tc) const override
void annotate(AnnotationIDs id, uint64_t val) override
uint32_t iss() const override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
bool getFaultVAddr(Fault fault, Addr &va)
Returns true if the fault passed as a first argument was triggered by a memory access,...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const StaticInstPtr nullStaticInstPtr
Statically allocated null StaticInstPtr.
const uint8_t armPcOffset
const OperatingMode nextMode
const uint16_t lowerEL32Offset
const uint16_t currELHOffset
const uint8_t armPcElrOffset
FaultVals(const FaultName &name_, FaultOffset offset_, uint16_t curr_elt_offset, uint16_t curr_elh_offset, uint16_t lower_el64_offset, uint16_t lower_el32_offset, OperatingMode next_mode, uint8_t arm_pc_offset, uint8_t thumb_pc_offset, uint8_t arm_pc_elr_offset, uint8_t thumb_pc_elr_offset, bool hyp_trappable, bool abort_disable, bool fiq_disable, ExceptionClass ec_)
const uint16_t lowerEL64Offset
const uint8_t thumbPcOffset
const uint8_t thumbPcElrOffset
const uint16_t currELTOffset