version 1.5, 2017/08/07 17:10:09 |
version 1.6, 2017/11/04 08:50:47 |
Line 75 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 75 __KERNEL_RCSID(0, "$NetBSD$"); |
|
|
|
#include <machine/segments.h> |
#include <machine/segments.h> |
|
|
|
/* On xen PV this is just numberspace management - used in x86/intr.c */ |
#if !defined(XEN) |
#if !defined(XEN) |
|
|
struct gate_descriptor *idt; |
struct gate_descriptor *idt; |
|
#endif |
|
|
static char idt_allocmap[NIDT]; |
static char idt_allocmap[NIDT]; |
|
|
/* |
/* |
Line 120 idt_vec_set(int vec, void (*function)(vo |
|
Line 123 idt_vec_set(int vec, void (*function)(vo |
|
{ |
{ |
|
|
KASSERT(idt_allocmap[vec] == 1); |
KASSERT(idt_allocmap[vec] == 1); |
|
#if !defined(XEN) |
setgate(&idt[vec], function, 0, SDT_SYS386IGT, SEL_KPL, |
setgate(&idt[vec], function, 0, SDT_SYS386IGT, SEL_KPL, |
GSEL(GCODE_SEL, SEL_KPL)); |
GSEL(GCODE_SEL, SEL_KPL)); |
|
#endif |
} |
} |
|
|
/* |
/* |
|
|
idt_vec_free(int vec) |
idt_vec_free(int vec) |
{ |
{ |
|
|
|
#if !defined(XEN) |
unsetgate(&idt[vec]); |
unsetgate(&idt[vec]); |
|
#endif |
idt_allocmap[vec] = 0; |
idt_allocmap[vec] = 0; |
} |
} |
|
|
#endif /* !defined(XEN) */ |
|