Changeset 10665 in vbox for trunk/src/VBox
- Timestamp:
- Jul 15, 2008 2:41:57 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r10660 r10665 509 509 } 510 510 511 static int apic_get_ppr_zero_tpr(APICState *s) 512 { 513 int isrv; 514 515 isrv = get_highest_priority_int(s->isr); 516 if (isrv < 0) 517 isrv = 0; 518 return isrv; 519 } 520 511 521 static int apic_get_arb_pri(APICState *s) 512 522 { … … 544 554 545 555 #ifdef VBOX 556 557 /* Check if the APIC has a pending interrupt/if a TPR change would active one. */ 558 PDMBOTHCBDECL(bool) apicHasPendingIrq(PPDMDEVINS pDevIns) 559 { 560 int irrv, ppr; 561 562 APICState *s = PDMINS2DATA(pDevIns, APICState *); 563 if (!s) 564 return false; 565 566 irrv = get_highest_priority_int(s->irr); 567 if (irrv < 0) 568 return false; 569 570 ppr = apic_get_ppr_zero_tpr(s); 571 if (ppr && (irrv & 0xf0) <= (ppr & 0xf0)) 572 return false; 573 574 return true; 575 } 576 546 577 static void apic_update_tpr(APICState *s, uint32_t val) 547 578 { … … 762 793 return intno; 763 794 } 764 765 /* Check if the APIC has a pending interrupt/if a TPR change would active one. */766 PDMBOTHCBDECL(bool) apicHasPendingIrq(PPDMDEVINS pDevIns)767 {768 int irrv;769 770 APICState *s = PDMINS2DATA(pDevIns, APICState *);771 if (!s)772 return false;773 774 irrv = get_highest_priority_int(s->irr);775 return irrv >= 0;776 }777 778 795 779 796 static uint32_t apic_get_current_count(APICState *s)
Note:
See TracChangeset
for help on using the changeset viewer.