#1336 Sending EOI to Local APIC acts that all interrupts is complete


Each interrupt handler makes a write to the end-of-interrupt (EOI) register. This
write is occur at the end of the handler routine, sometime before the IRET instruction. This action indicates that the servicing of the current interrupt is complete and the local APIC can issue the next interrupt from the ISR. In Bochs realization, sending EOI indicates that the servicing of the all interrupts.


  • Alexander Kobets

    I think that I am choosed a not correct 'Milestone' as 'can't_reproduce', simple I not found more suitable. May be 'pending'??? In really I can reproduce this bug in my software. For russian speaking developers, you can find full article here http://osdev.ru/viewtopic.php?f=7&t=784

  • Stanislav Shwartsman

    Here is Bochs's ode about handling EOI:

    BX_DEBUG(("Wrote 0x%x to EOI", value));
    int vec = highest_priority_int(isr);
    if (vec < 0) {
    BX_DEBUG(("EOI written without any bit in ISR"));
    else {
    if ((Bit32u) vec != spurious_vector) {
    BX_DEBUG(("local apic received EOI, hopefully for vector 0x%02x", vec));
    isr[vec] = 0;
    if(tmr[vec]) {
    tmr[vec] = 0;

    As you can see it just finds highest priority interrupt in ISR and EOI's only it.
    I can't get from the description the behavior that you talk about.
    Can yu supply an example image which reproduces it ?

    Smth that would run differently on Vmware and Bochs ?
    Or even better real hardware and Bochs ?
    Also explain what is expected behavior and what is observed behavior.


  • Alexander Kobets

    Behavior between Bochs (like VMware WS) and real PC are not 'better', it completely different. Main problem with servicing HW interrupt by IO/APIC. Showing code relevant to Local APIC seems to correct, but I am not sure that IO/APIC correctly processed apic_bus_broadcast_eoi(vec);

    I try shortly to explain the expected and observed behaviors.
    At issue is sequense of nested interrupts by IO/APIC linked with Local APIC. In processing of servicing interrupt, nested interrupt preemptive current process, send EOI and return to servicing previous interrupt. Sended EOI unmask only nested interrupt, but all other stay masked. But in Boshs, when nested interrupt send EOI, then previous interrupts become upmasked and they receive re-entrant interrupts same level.


Log in to post a comment.