Lines Matching defs:irq

88     uint8_t priority_add;   /**< highest irq priority */
164 /* set irq level. If an edge is detected, then the IRR is set to 1 */
165 DECLINLINE(void) pic_set_irq1(PPICSTATE pPic, int irq, int level, uint32_t uTagSrc)
167 Log(("pic_set_irq1: irq=%d level=%d\n", irq, level));
168 int mask = 1 << irq;
207 if (!pPic->auTags[irq])
208 pPic->auTags[irq] = uTagSrc;
210 pPic->auTags[irq] |= RT_BIT_32(31);
217 number). Return 8 if no irq */
252 /* higher priority found: an irq should be generated */
258 /* raise irq to CPU if necessary. must be called every time the active
259 irq may change */
262 int irq2, irq;
269 /* if irq request by slave pic, signal master PIC */
277 /* look at requested irq */
278 irq = pic_get_irq(&pThis->aPics[0]);
279 if (irq >= 0)
281 /* If irq 2 is pending on the master pic, then there must be one pending on the slave pic too! Otherwise we'll get
284 if (irq != 2 || irq2 != -1)
296 Log(("pic_update_irq: irq 2 is active, but no interrupt is pending on the slave pic!!\n"));
299 /* if this was the only pending irq, then we must clear the interrupt ff flag */
322 int irq, intno;
325 /* Query the current pending irq, if any. */
327 intno = irq = pic_get_irq(pActivePIC);
328 if (irq == 2)
331 irq = pic_get_irq(pActivePIC);
332 intno = irq + 8;
340 if ( irq >= 0
341 && ((1 << irq) & ~pActivePIC->imr) == 0)
398 /* acknowledge interrupt 'irq' */
399 DECLINLINE(void) pic_intack(PPICSTATE pPic, int irq)
404 pPic->priority_add = (irq + 1) & 7;
407 pPic->isr |= (1 << irq);
410 if (!(pPic->elcr & (1 << irq)))
412 Log2(("pic_intack: irr=%x irrnew=%x\n", pPic->irr, pPic->irr & ~(1 << irq)));
413 pPic->irr &= ~(1 << irq);
428 int irq;
432 /* read the irq from the PIC */
436 irq = pic_get_irq(&pThis->aPics[0]);
437 if (irq >= 0)
439 pic_intack(&pThis->aPics[0], irq);
440 if (irq == 2)
454 Log2(("picGetInterrupt1: %x base=%x irq=%x uTagSrc=%#x\n", intno, pThis->aPics[1].irq_base, irq2, *puTagSrc));
455 irq = irq2 + 8;
459 intno = pThis->aPics[0].irq_base + irq;
460 *puTagSrc = pThis->aPics[0].auTags[irq];
461 pThis->aPics[0].auTags[irq] = 0;
462 Log2(("picGetInterrupt0: %x base=%x irq=%x uTagSrc=%#x\n", intno, pThis->aPics[0].irq_base, irq, *puTagSrc));
469 irq = 7;
470 intno = pThis->aPics[0].irq_base + irq;
501 int irq;
545 irq = (priority + pPic->priority_add) & 7;
546 Log(("pic_write: EOI prio=%d irq=%d\n", priority, irq));
547 pPic->isr &= ~(1 << irq);
549 pPic->priority_add = (irq + 1) & 7;
558 irq = val & 7;
559 Log(("pic_write: EOI2 for irq %d\n", irq));
560 pPic->isr &= ~(1 << irq);
576 irq = val & 7;
577 Log(("pic_write: EOI3 for irq %d\n", irq));
578 pPic->isr &= ~(1 << irq);
579 pPic->priority_add = (irq + 1) & 7;
605 Log(("pic_write: set irq base to %x\n", pPic->irq_base));
634 Log2(("pic_poll_read: clear slave irq (isr)\n"));
638 Log2(("pic_poll_read: clear irq %d (isr)\n", ret));
1070 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatClearedActiveIRQ2, STAMTYPE_COUNTER, "/Devices/PIC/Masked/ActiveIRQ2", STAMUNIT_OCCURENCES, "Number of cleared irq 2.");