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_kentry.S

    r82 r86  
    2323#include <hal_boot.h>
    2424#include <hal_kentry.h>
     25#include <hal_apic.h>
    2526
    2627#define TRAPENTRY(a)    \
    27         pushq $(a);     \
    28         jmp alltraps;
     28        pushq   $(a);   \
     29        jmp     alltraps;
    2930
    3031#define ZTRAPENTRY(a) \
    31         pushq $0; \
     32        pushq   $0; \
    3233        TRAPENTRY(a)
    3334
    3435        .text
    3536        .globl  hal_trap_entry
     37        .globl  hal_timer_intr
    3638        .type   hal_trap_entry, @function
     39        .type   hal_timer_intr, @function
    3740
    3841        /*
     
    118121         * LAPIC interrupts.
    119122         */
    120 ASM_ENTRY(x86_spurious)
     123ASM_ENTRY(x86_lapic_spurious)
    121124        ZTRAPENTRY(T_ASTFLT)
    122 ASM_ENTRY(x86_timer)
    123         ZTRAPENTRY(T_ASTFLT)
     125
     126ASM_ENTRY(x86_lapic_timer)
     127        pushq   $0
     128        pushq   $T_ASTFLT
     129        INTR_SAVE_REGS
     130
     131        movq    %rsp,%rdi
     132        call    hal_timer_intr
     133
     134        movq    lapic_va(%rip),%rax
     135        movl    $0,LAPIC_EOI(%rax)
     136
     137        INTR_RESTORE_REGS
     138        addq    $16,%rsp
     139        iretq
    124140
    125141/*
     
    164180
    165181x86_intrs:
    166         .quad   x86_spurious
    167         .quad   x86_timer
     182        .quad   x86_lapic_spurious
     183        .quad   x86_lapic_timer
    168184
Note: See TracChangeset for help on using the changeset viewer.