static int apic_do_eoi(struct apic_state * apic) {
int i = 0, j = 0;
+ PrintDebug("Received APIC EOI\n");
+
// We iterate backwards to find the highest priority
for (i = 31; i >= 0; i--) {
uchar_t * svc_major = apic->int_svc_reg + i;
uchar_t flag = 0x1 << j;
if ((*svc_major) & flag) {
*svc_major &= ~flag;
+
+#ifdef CRAY_XT
+ if (((i * 8) + j) == 238) {
+ V3_ACK_IRQ(238);
+ }
+#endif
return 0;
}
}
}
static int apic_raise_intr(void * private_data, int irq) {
+#ifdef CRAY_XT
+ // The Seastar is connected directly to the LAPIC via LINT0 on the ICC bus
+
+ if (irq == 238) {
+ struct vm_device * dev = (struct vm_device *)private_data;
+ struct apic_state * apic = (struct apic_state *)dev->private_data;
+
+ return activate_apic_irq(apic, irq);
+ }
+#endif
return 0;
}
*svc_location |= flag;
*req_location &= ~flag;
+#ifdef CRAY_XT
+ if ((irq == 238) || (irq == 239)) {
+ PrintError("APIC: Begin IRQ %d (ISR=%x), (IRR=%x)\n", irq, *svc_location, *req_location);
+ }
+#endif
+
return 0;
}