重构内存分配器、增加中断支持、整理rust运行时环境 #4

Merged
pointer-to-bios merged 39 commits from downstream into main 2024-04-11 00:36:14 +08:00
1 changed files with 8 additions and 1 deletions
Showing only changes of commit 37ee2ca85d - Show all commits

View File

@ -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();
}