Added set_user_intr_gate() and made "int 3" accessible to userland (the breakpoint exception).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11997 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3eae1fea40
commit
99dbd8b489
@ -70,7 +70,7 @@ interrupt_ack(int n)
|
||||
|
||||
|
||||
static void
|
||||
set_gate(desc_table *gate_addr, unsigned int addr, int type, int dpl)
|
||||
set_gate(desc_table *gate_addr, addr_t addr, int type, int dpl)
|
||||
{
|
||||
unsigned int gate1; // first byte of gate desc
|
||||
unsigned int gate2; // second byte of gate desc
|
||||
@ -86,7 +86,14 @@ set_gate(desc_table *gate_addr, unsigned int addr, int type, int dpl)
|
||||
static void
|
||||
set_intr_gate(int n, void *addr)
|
||||
{
|
||||
set_gate(&idt[n], (unsigned int)addr, 14, DPL_KERNEL);
|
||||
set_gate(&idt[n], (addr_t)addr, 14, DPL_KERNEL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_user_intr_gate(int n, void *addr)
|
||||
{
|
||||
set_gate(&idt[n], (addr_t)addr, 14, DPL_USER);
|
||||
}
|
||||
|
||||
|
||||
@ -341,7 +348,7 @@ arch_int_init(kernel_args *args)
|
||||
set_intr_gate(0, &trap0);
|
||||
set_intr_gate(1, &trap1);
|
||||
set_intr_gate(2, &trap2);
|
||||
set_intr_gate(3, &trap3);
|
||||
set_user_intr_gate(3, &trap3);
|
||||
set_intr_gate(4, &trap4);
|
||||
set_intr_gate(5, &trap5);
|
||||
set_intr_gate(6, &trap6);
|
||||
|
Loading…
Reference in New Issue
Block a user