#define SMP #define APIC_IO #include #include #define KDSEL 0x10 #define KPSEL 0x18 .text .p2align 2 .globl apic_timer_handler .type apic_timer_handler,@function apic_timer_handler: pushl %eax pushl %ecx pushl %edx pushl %ds pushl %es pushl %fs movl $KDSEL, %eax mov %ax, %ds mov %ax, %es movl $KPSEL, %eax mov %ax, %fs pushl $0 call clock_handler addl $4,%esp /* movl $0, lapic_eoi */ movl lapic_start, %eax addl $0xb0, %eax movl $0, (%eax) popl %fs popl %es popl %ds popl %edx popl %ecx popl %eax iret