32 #ifndef __ARCH_ALPHA_INTERRUPT_HH__ 33 #define __ARCH_ALPHA_INTERRUPT_HH__ 43 #include "debug/Flow.hh" 44 #include "debug/Interrupt.hh" 45 #include "params/AlphaInterrupts.hh" 62 typedef AlphaInterruptsParams
Params;
67 return dynamic_cast<const Params *
>(
_params);
72 memset(interrupts, 0,
sizeof(interrupts));
86 DPRINTF(Interrupt,
"Interrupt %d:%d posted\n", int_num, index);
89 panic(
"int_num out of bounds\n");
91 if (index < 0 || index >= (
int)
sizeof(uint64_t) * 8)
92 panic(
"int_num out of bounds\n");
94 interrupts[int_num] |= 1 <<
index;
95 intstatus |= (
ULL(1) << int_num);
101 DPRINTF(Interrupt,
"Interrupt %d:%d cleared\n", int_num, index);
104 panic(
"int_num out of bounds\n");
106 if (index < 0 || index >= (
int)
sizeof(uint64_t) * 8)
107 panic(
"int_num out of bounds\n");
109 interrupts[int_num] &= ~(1 <<
index);
110 if (interrupts[int_num] == 0)
111 intstatus &= ~(
ULL(1) << int_num);
117 DPRINTF(Interrupt,
"Interrupts all cleared\n");
119 memset(interrupts, 0,
sizeof(interrupts));
147 panic(
"asynchronous traps not implemented\n");
150 uint64_t summary = 0;
158 summary |= (
ULL(1) <<
i);
165 if (intstatus & (
ULL(1) <<
i)) {
168 summary |= (
ULL(1) <<
i);
181 uint64_t summary = 0;
188 summary |= (
ULL(1) <<
i);
195 if (intstatus & (
ULL(1) <<
i)) {
198 summary |= (
ULL(1) <<
i);
203 newSummary = summary;
205 DPRINTF(Flow,
"Interrupt! IPLR=%d ipl=%d summary=%x\n",
208 return std::make_shared<InterruptFault>();
223 #endif // __ARCH_ALPHA_INTERRUPT_HH__ #define panic(...)
This implements a cprintf based panic() function.
void unserialize(CheckpointIn &cp)
Unserialize an object.
void updateIntrInfo(ThreadContext *tc)
virtual TheISA::PCState pcState() const =0
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
ThreadContext is the external interface to all thread state for anything outside of the CPU...
#define UNSERIALIZE_SCALAR(scalar)
void post(int int_num, int index)
void serialize(CheckpointOut &cp) const
Serialize an object.
#define SERIALIZE_ARRAY(member, size)
void setCPU(BaseCPU *_cpu)
#define ULL(N)
uint64_t constant
Fault getInterrupt(ThreadContext *tc)
const Params * params() const
#define SERIALIZE_SCALAR(scalar)
#define UNSERIALIZE_ARRAY(member, size)
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
std::ostream CheckpointOut
const SimObjectParams * _params
Cached copy of the object parameters.
uint64_t interrupts[NumInterruptLevels]
AlphaInterruptsParams Params
bool checkInterrupts(ThreadContext *tc) const
std::shared_ptr< FaultBase > Fault
void clear(int int_num, int index)