gem5 v25.0.0.1
Loading...
Searching...
No Matches
gem5::RiscvISA::RiscvFault Class Reference

#include <faults.hh>

Inheritance diagram for gem5::RiscvISA::RiscvFault:
gem5::FaultBase gem5::RiscvISA::AddressFault gem5::RiscvISA::BreakpointFault gem5::RiscvISA::InstFault gem5::RiscvISA::InterruptFault gem5::RiscvISA::NonMaskableInterruptFault gem5::RiscvISA::SyscallFault gem5::RiscvISA::VirtualInstFault gem5::RiscvISA::IllegalFrmFault gem5::RiscvISA::IllegalInstFault gem5::RiscvISA::UnimplementedFault gem5::RiscvISA::UnknownInstFault

Protected Member Functions

 RiscvFault (FaultName n, FaultType ft, ExceptionCode c)
FaultName name () const override
bool isInterrupt () const
bool isNonMaskableInterrupt () const
bool isResumableNonMaskableInterrupt (ISA *isa) const
bool isPlainException () const
bool isGuestPageFault () const
ExceptionCode exception () const
virtual RegVal trap_value () const
virtual RegVal trap_value2 () const
virtual bool mustSetGva () const
virtual void invokeSE (ThreadContext *tc, const StaticInstPtr &inst)
void invoke (ThreadContext *tc, const StaticInstPtr &inst) override

Protected Attributes

const FaultName _name
const FaultType _fault_type
ExceptionCode _code

Additional Inherited Members

Public Member Functions inherited from gem5::FaultBase
virtual ~FaultBase ()

Detailed Description

Definition at line 58 of file faults.hh.

Constructor & Destructor Documentation

◆ RiscvFault()

Member Function Documentation

◆ exception()

ExceptionCode gem5::RiscvISA::RiscvFault::exception ( ) const
inlineprotected

Definition at line 88 of file faults.hh.

References _code.

Referenced by invoke().

◆ invoke()

void gem5::RiscvISA::RiscvFault::invoke ( ThreadContext * tc,
const StaticInstPtr & inst )
overrideprotectedvirtual

Reimplemented from gem5::FaultBase.

Definition at line 60 of file faults.cc.

References _code, gem5::X86ISA::addr, gem5::PCStateBase::as(), gem5::bits(), gem5::RiscvISA::CAUSE_INTERRUPT_MASKS, gem5::ThreadContext::contextId(), DPRINTFS, exception(), gem5::FullSystem, gem5::ThreadContext::getCpuPtr(), gem5::ThreadContext::getIsaPtr(), gem5::RiscvISA::INT_EXT_SUPER, gem5::RiscvISA::INT_EXT_VIRTUAL_SUPER, gem5::RiscvISA::INT_SOFTWARE_SUPER, gem5::RiscvISA::INT_SOFTWARE_VIRTUAL_SUPER, gem5::RiscvISA::INT_TIMER_SUPER, gem5::RiscvISA::INT_TIMER_VIRTUAL_SUPER, invokeSE(), isGuestPageFault(), isInterrupt(), isNonMaskableInterrupt(), isResumableNonMaskableInterrupt(), gem5::RiscvISA::MISCREG_HEDELEG, gem5::RiscvISA::MISCREG_HIDELEG, gem5::RiscvISA::MISCREG_HSTATUS, gem5::RiscvISA::MISCREG_HTVAL, gem5::RiscvISA::MISCREG_ISA, gem5::RiscvISA::MISCREG_MCAUSE, gem5::RiscvISA::MISCREG_MEDELEG, gem5::RiscvISA::MISCREG_MEPC, gem5::RiscvISA::MISCREG_MIDELEG, gem5::RiscvISA::MISCREG_MNCAUSE, gem5::RiscvISA::MISCREG_MNEPC, gem5::RiscvISA::MISCREG_MNSTATUS, gem5::RiscvISA::MISCREG_MTVAL, gem5::RiscvISA::MISCREG_MTVAL2, gem5::RiscvISA::MISCREG_MTVEC, gem5::RiscvISA::MISCREG_NMIE, gem5::RiscvISA::MISCREG_NMIVEC, gem5::RiscvISA::MISCREG_PRV, gem5::RiscvISA::MISCREG_SCAUSE, gem5::RiscvISA::MISCREG_SEPC, gem5::RiscvISA::MISCREG_STATUS, gem5::RiscvISA::MISCREG_STVAL, gem5::RiscvISA::MISCREG_STVEC, gem5::RiscvISA::MISCREG_VSCAUSE, gem5::RiscvISA::MISCREG_VSEPC, gem5::RiscvISA::MISCREG_VSSTATUS, gem5::RiscvISA::MISCREG_VSTVAL, gem5::RiscvISA::MISCREG_VSTVEC, mustSetGva(), name(), panic, gem5::ThreadContext::pcState(), gem5::RiscvISA::PRV_HS, gem5::RiscvISA::PRV_M, gem5::RiscvISA::PRV_S, gem5::RiscvISA::PRV_U, gem5::ThreadContext::readMiscReg(), gem5::ThreadContext::readMiscRegNoEffect(), gem5::RiscvISA::resetV(), gem5::ThreadContext::setMiscReg(), gem5::ArmISA::status, trap_value(), trap_value2(), gem5::RiscvISA::virtualizationEnabled(), and warn_if.

◆ invokeSE()

void gem5::RiscvISA::RiscvFault::invokeSE ( ThreadContext * tc,
const StaticInstPtr & inst )
protectedvirtual

◆ isGuestPageFault()

bool gem5::RiscvISA::RiscvFault::isGuestPageFault ( ) const
inlineprotected

◆ isInterrupt()

bool gem5::RiscvISA::RiscvFault::isInterrupt ( ) const
inlineprotected

Definition at line 70 of file faults.hh.

References _fault_type, and gem5::RiscvISA::INTERRUPT.

Referenced by invoke().

◆ isNonMaskableInterrupt()

bool gem5::RiscvISA::RiscvFault::isNonMaskableInterrupt ( ) const
inlineprotected

Definition at line 71 of file faults.hh.

References _fault_type, and gem5::RiscvISA::NON_MASKABLE_INTERRUPT.

Referenced by invoke(), and isResumableNonMaskableInterrupt().

◆ isPlainException()

bool gem5::RiscvISA::RiscvFault::isPlainException ( ) const
inlineprotected

Definition at line 80 of file faults.hh.

References _fault_type, and gem5::RiscvISA::OTHERS.

◆ isResumableNonMaskableInterrupt()

bool gem5::RiscvISA::RiscvFault::isResumableNonMaskableInterrupt ( ISA * isa) const
inlineprotected

Definition at line 75 of file faults.hh.

References gem5::RiscvISA::ISA::enableSmrnmi(), and isNonMaskableInterrupt().

Referenced by invoke().

◆ mustSetGva()

virtual bool gem5::RiscvISA::RiscvFault::mustSetGva ( ) const
inlineprotectedvirtual

Reimplemented in gem5::RiscvISA::AddressFault, and gem5::RiscvISA::BreakpointFault.

Definition at line 91 of file faults.hh.

Referenced by invoke().

◆ name()

FaultName gem5::RiscvISA::RiscvFault::name ( ) const
inlineoverrideprotectedvirtual

Implements gem5::FaultBase.

Definition at line 69 of file faults.hh.

References _name.

Referenced by invoke(), invokeSE(), and gem5::RiscvISA::UnimplementedFault::UnimplementedFault().

◆ trap_value()

virtual RegVal gem5::RiscvISA::RiscvFault::trap_value ( ) const
inlineprotectedvirtual

◆ trap_value2()

virtual RegVal gem5::RiscvISA::RiscvFault::trap_value2 ( ) const
inlineprotectedvirtual

Reimplemented in gem5::RiscvISA::AddressFault.

Definition at line 90 of file faults.hh.

Referenced by invoke().

Member Data Documentation

◆ _code

ExceptionCode gem5::RiscvISA::RiscvFault::_code
protected

◆ _fault_type

const FaultType gem5::RiscvISA::RiscvFault::_fault_type
protected

Definition at line 62 of file faults.hh.

Referenced by isInterrupt(), isNonMaskableInterrupt(), isPlainException(), and RiscvFault().

◆ _name

const FaultName gem5::RiscvISA::RiscvFault::_name
protected

Definition at line 61 of file faults.hh.

Referenced by name(), and RiscvFault().


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 2025 08:07:01 for gem5 by doxygen 1.14.0