9 /* void set_idt(uint32_t addr, uint16_t limit) */
19 /* int get_intr_flag() */
24 # bit 9 of eflags is IF
29 /* void set_intr_flag(int onoff) */
39 /* interrupt entry with error code macro
40 * this macro generates an interrupt entry point for the
41 * exceptions which include error codes in the stack frame
43 .macro ientry_err n name
44 .globl intr_entry_\name
50 /* interrupt entry without error code macro
51 * this macro generates an interrupt entry point for the interrupts
52 * and exceptions which do not include error codes in the stack frame
53 * it pushes a dummy error code (0), to make the stack frame identical
55 .macro ientry_noerr n name
56 .globl intr_entry_\name
63 /* common code used by all entry points. calls dispatch_intr()
68 /* save general purpose registers */
72 /* restore general purpose registers */
74 /* remove error code and intr num from stack */
78 /* special case for the timer interrupt, to avoid all the overhead of
79 * going through the C interrupt dispatcher 250 times each second
82 .global intr_entry_fast_timer
83 intr_entry_fast_timer:
85 # signal end of interrupt
93 /* XXX not necessary for now, just leaving it in in case it's useful
96 * intr_ret is called by context_switch to return from the kernel
97 * to userspace. The argument is a properly formed intr_frame
98 * structure with the saved context of the new task.
100 * First thing to do is remove the return address pointing back
101 * to context_switch, which then leaves us with a proper interrupt
102 * stack frame, so we can jump right in the middle of the regular
103 * interrupt return code above.
110 /* by including interrupts.h with ASM defined, the macros above
111 * are expanded to generate all required interrupt entry points