32 #ifndef __ARCH_SPARC_INTERRUPT_HH__
33 #define __ARCH_SPARC_INTERRUPT_HH__
39 #include "debug/Interrupt.hh"
40 #include "params/SparcInterrupts.hh"
62 typedef SparcInterruptsParams
Params;
78 if (softint & 0x10000 || softint & 0x1)
82 while (level > 0 && !(1 << level & softint))
84 if (1 << level & softint)
92 DPRINTF(Interrupt,
"Interrupt %d:%d posted\n", int_num, index);
94 assert(index >= 0 && index < 64);
103 DPRINTF(Interrupt,
"Interrupt %d:%d cleared\n", int_num, index);
105 assert(index >= 0 && index < 64);
196 return std::make_shared<HstickMatch>();
200 return std::make_shared<InterruptVector>();
206 return std::make_shared<TrapLevelZero>();
210 return std::make_shared<HstickMatch>();
214 return std::make_shared<InterruptVector>();
218 return std::make_shared<CpuMondo>();
221 return std::make_shared<DevMondo>();
225 return std::make_shared<InterruptLevelN>(
level);
229 return std::make_shared<ResumableError>();
263 #endif // __ARCH_SPARC_INTERRUPT_HH__
Fault getInterrupt(ThreadContext *tc)
decltype(nullptr) constexpr NoFault
SparcInterruptsParams Params
void setCPU(BaseCPU *_cpu)
virtual MiscReg readMiscRegNoEffect(int misc_reg) const =0
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool checkInterrupts(ThreadContext *tc) const
ThreadContext is the external interface to all thread state for anything outside of the CPU...
#define UNSERIALIZE_SCALAR(scalar)
const Params * params() const
uint64_t get_vec(int int_num)
Hyper privileged registers.
#define SERIALIZE_ARRAY(member, size)
uint64_t interrupts[NumInterruptTypes]
#define ULL(N)
uint64_t constant
#define SERIALIZE_SCALAR(scalar)
int InterruptLevel(uint64_t softint)
#define UNSERIALIZE_ARRAY(member, size)
std::ostream CheckpointOut
const SimObjectParams * _params
Cached copy of the object parameters.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void post(int int_num, int index)
void updateIntrInfo(ThreadContext *tc)
std::shared_ptr< FaultBase > Fault
void clear(int int_num, int index)
Abstract superclass for simulation objects.