1 #ifndef __LUNAIX_I386_ASM_H
2 #define __LUNAIX_I386_ASM_H
10 #define tss_esp0_off 4
13 #include <lunaix/types.h>
15 #define IRQ_TRIG_EDGE 0b0
16 #define IRQ_TRIG_LEVEL 0b1
18 #define IRQ_TYPE_FIXED (0b01 << 1)
19 #define IRQ_TYPE_NMI (0b11 << 1)
20 #define IRQ_TYPE (0b11 << 1)
22 #define IRQ_VE_HI (0b1 << 3)
23 #define IRQ_VE_LO (0b0 << 3)
25 #define IRQ_DEFAULT (IRQ_TRIG_EDGE | IRQ_TYPE_FIXED | IRQ_VE_HI)
34 } __attribute__((packed));
36 void tss_update_esp(u32_t esp0);
43 void (*irq_attach)(struct x86_intc*,
48 void (*notify_eoi)(struct x86_intc*, cpu_t id, int iv);
54 #endif /* __LUNAIX_I386_ASM_H */