Ignore:
Timestamp:
Jun 28, 2017, 3:24:02 PM (7 years ago)
Author:
max@…
Message:

enable the timer (not yet calibrated)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_apic.c

    r83 r86  
    105105        hal_lapic_write(LAPIC_LVT_THM, LAPIC_THM_M);
    106106        hal_lapic_write(LAPIC_LVT_ERR, LAPIC_ERR_M);
     107
     108        /* Now, enable the timer in repeated mode. */
     109        hal_lapic_write(LAPIC_LVT_TMR, LAPIC_TMR_TM|LAPIC_TMR_M);
     110        hal_lapic_write(LAPIC_DCR_TIMER, LAPIC_DCRT_DIV1);
     111        hal_lapic_write(LAPIC_ICR_TIMER, 1000000000); // XXX calibrate
     112        hal_lapic_write(LAPIC_LVT_TMR, LAPIC_TMR_TM|LAPIC_TIMER_VECTOR);
    107113}
    108114
Note: See TracChangeset for help on using the changeset viewer.