重构内存分配器、增加中断支持、整理rust运行时环境 #4
|
@ -6,6 +6,12 @@
|
||||||
void interrupt_init()
|
void interrupt_init()
|
||||||
{
|
{
|
||||||
gate_descriptor_t gate;
|
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));
|
trap_gate_generate(gate, interrupt_entry_sym(DE));
|
||||||
interrupt_register_gate(gate, 0);
|
interrupt_register_gate(gate, 0);
|
||||||
trap_gate_generate(gate, interrupt_entry_sym(UNSUPPORTED));
|
trap_gate_generate(gate, interrupt_entry_sym(UNSUPPORTED));
|
||||||
|
@ -14,5 +20,6 @@ void interrupt_init()
|
||||||
interrupt_register_gate(gate, 2);
|
interrupt_register_gate(gate, 2);
|
||||||
trap_gate_generate(gate, interrupt_entry_sym(BP));
|
trap_gate_generate(gate, interrupt_entry_sym(BP));
|
||||||
interrupt_register_gate(gate, 3);
|
interrupt_register_gate(gate, 3);
|
||||||
|
|
||||||
interrupt_open();
|
interrupt_open();
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue