Ticket #2573 (closed defect: fixed)

Opened 10 years ago

Last modified 8 years ago

Local APIC timer dies

Reported by: SadKo Owned by:
Priority: major Component: other
Version: VirtualBox 2.0.4 Keywords:
Cc: Guest type: other
Host type: other

Description (last modified by frank) (diff)

An APIC timer is initialized as periodic:

// lapic_base: u32_t *lapic_base;

    // Disable timer first
    lapic_base[APIC_DWREG_LVT_TMR]      = APIC_TIMER_VECTOR |
                                          APIC_LVT_D_STAT_IDLE |
                                          APIC_LVT_TMR_PERIODIC |
                                          APIC_LVT_TRIGGER_LEVEL |
    // Write counters
    lapic_base[APIC_DWREG_TMR_DIVIDE]   = div;
    lapic_base[APIC_DWREG_TMR_INIT]     = counter;

    // Enable if it is enabled in configruation
    if (enabled)
        lapic_base[APIC_DWREG_LVT_TMR]  = APIC_TIMER_VECTOR |
                                          APIC_LVT_D_STAT_IDLE |
                                          APIC_LVT_TRIGGER_LEVEL |

Timer interrupt is ok (a counter in a handler is periodically incremented). Then a system is sending INIT IPI:


And whoops... A timer dies. And no timer re-initialization helps.

Change History

comment:1 Changed 10 years ago by frank

  • Description modified (diff)

comment:2 Changed 10 years ago by SadKo

Defined constants:

#define APIC_DWREG_LVT_TMR          0x00c8  /* LVT Timer Register                   */

#define APIC_ICR0_D_MODE_INIT       0x00000500  /* Delivery mode: INIT                  */
#define APIC_ICR0_DST_ALL_NO_SELF   0x000c0000  /* Destination: All excluding self      */

// LVT Register flags
#define APIC_LVT_D_STAT_IDLE        0x00000000  /* Delivery status: Idle                */
#define APIC_LVT_TRIGGER_LEVEL      0x00008000  /* Trigger Mode: Level                  */
#define APIC_LVT_MASK               0x00010000  /* Interrupt Mask                       */
#define APIC_LVT_TMR_PERIODIC       0x00020000  /* Timer: Periodic                      */

A constant APIC_LVT_TRIGGER_LEVEL takes no effect (if it is used or not) and is described in timer's LVT entry as reserved. So you can ignore it.

comment:3 Changed 10 years ago by sandervl73

Thanks for the detailed reported. We'll have a look at it next week.

comment:4 Changed 8 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Please reopen if still reproducible with VBox 3.1.6.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use