postIntEvent[x] =
new EventFunctionWrapper([this, x]{ postDelayedInt(x); },
"Post Interrupt to CPU");
+ postFiqEvent[x] =
+ new EventFunctionWrapper([this, x]{ postDelayedFiq(x); },
+ "Post FIQ to CPU");
}
DPRINTF(Interrupt, "cpuEnabled[0]=%d cpuEnabled[1]=%d\n", cpuEnabled(0),
cpuEnabled(1));
GicV2::~GicV2()
{
- for (int x = 0; x < CPU_MAX; x++)
+ for (int x = 0; x < CPU_MAX; x++) {
delete postIntEvent[x];
+ delete postFiqEvent[x];
+ }
}
Tick
signalDrainDone();
}
+void
+GicV2::postFiq(uint32_t cpu, Tick when)
+{
+ if (!(postFiqEvent[cpu]->scheduled())) {
+ ++pendingDelayedInterrupts;
+ eventq->schedule(postFiqEvent[cpu], when);
+ }
+}
+
+void
+GicV2::postDelayedFiq(uint32_t cpu)
+{
+ platform->intrctrl->post(cpu, ArmISA::INT_FIQ, 0);
+ --pendingDelayedInterrupts;
+ assert(pendingDelayedInterrupts >= 0);
+ if (pendingDelayedInterrupts == 0)
+ signalDrainDone();
+}
+
DrainState
GicV2::drain()
{
* Post an interrupt to a CPU with a delay
*/
void postInt(uint32_t cpu, Tick when);
+ void postFiq(uint32_t cpu, Tick when);
/**
* Deliver a delayed interrupt to the target CPU
*/
void postDelayedInt(uint32_t cpu);
+ void postDelayedFiq(uint32_t cpu);
EventFunctionWrapper *postIntEvent[CPU_MAX];
+ EventFunctionWrapper *postFiqEvent[CPU_MAX];
int pendingDelayedInterrupts;
public: