重构内存分配器、增加中断支持、整理rust运行时环境 #4
|
@ -4,8 +4,14 @@
|
|||
#include <kernel/arch/x86_64/interrupt_procs.h>
|
||||
|
||||
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