Go to the documentation of this file.
42 #include "debug/Faults.hh"
77 "NMI overwriting M-mode trap handler state");
135 panic(
"Unknown privilege mode %d.", prv);
140 uint64_t _cause =
_code;
185 std::unique_ptr<PCState> new_pc(
dynamic_cast<PCState *
>(
187 panic_if(!new_pc,
"Failed create new PCState from ISA pointer");
192 if (mmu ==
nullptr) {
193 warn(
"MMU is not Riscv MMU instance, we can't reset PMP");
196 mmu->getPMP()->pmpReset();
203 panic(
"Unknown instruction 0x%08x at pc %s", rsi->machInst,
211 panic(
"Illegal instruction 0x%08x at pc %s: %s", rsi->machInst,
224 panic(
"Illegal floating-point rounding mode 0x%x at pc %s.",
Addr instAddr() const
Returns the memory address of the instruction this PC points to.
const std::string instName
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual System * getSystemPtr()=0
virtual void clearLoadReservation(ContextID cid)
Base class for all RISC-V static instructions.
virtual BaseMMU * getMMUPtr()=0
virtual const PCStateBase & pcState() const =0
void invoke(ThreadContext *tc, const StaticInstPtr &inst) override
virtual ContextID contextId() const =0
Workload * workload
OS kernel.
T * get() const
Directly access the pointer itself without taking a reference.
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
virtual void advancePC(PCStateBase &pc_state) const =0
void schedRelBreak(Tick delta)
Cause the simulator to execute a breakpoint relative to the current tick.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual PCStateBase * newPCState(Addr new_inst_addr=0) const =0
FaultName name() const override
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define DPRINTFS(x, s,...)
void invokeSE(ThreadContext *tc, const StaticInstPtr &inst) override
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void invokeSE(ThreadContext *tc, const StaticInstPtr &inst) override
void invokeSE(ThreadContext *tc, const StaticInstPtr &inst) override
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
void invokeSE(ThreadContext *tc, const StaticInstPtr &inst) override
void invokeSE(ThreadContext *tc, const StaticInstPtr &inst) override
virtual BaseCPU * getCpuPtr()=0
virtual RegVal trap_value() const
virtual BaseISA * getIsaPtr() const =0
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void invokeSE(ThreadContext *tc, const StaticInstPtr &inst) override
virtual void invokeSE(ThreadContext *tc, const StaticInstPtr &inst)
const RegVal CAUSE_INTERRUPT_MASKS[enums::Num_RiscvType]
bool isNonMaskableInterrupt() const
virtual void syscall(ThreadContext *tc)
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:46 for gem5 by doxygen 1.8.17