在设置中断之前将所有的中断描述符定向到unsupported处理函数
This commit is contained in:
parent
bec4634857
commit
37ee2ca85d
|
@ -6,6 +6,12 @@
|
|||
void interrupt_init()
|
||||
{
|
||||
gate_descriptor_t gate;
|
||||
trap_gate_generate(gate, interrupt_entry_sym(UNSUPPORTED));
|
||||
for (usize i = 4; i < 256; i++)
|
||||
{
|
||||
interrupt_register_gate(gate, i);
|
||||
}
|
||||
|
||||
trap_gate_generate(gate, interrupt_entry_sym(DE));
|
||||
interrupt_register_gate(gate, 0);
|
||||
trap_gate_generate(gate, interrupt_entry_sym(UNSUPPORTED));
|
||||
|
@ -14,5 +20,6 @@ void interrupt_init()
|
|||
interrupt_register_gate(gate, 2);
|
||||
trap_gate_generate(gate, interrupt_entry_sym(BP));
|
||||
interrupt_register_gate(gate, 3);
|
||||
|
||||
interrupt_open();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue