syscall: enable fast syscall instruction
This commit is contained in:
parent
32d12d09ca
commit
d67c828c6f
6 changed files with 39 additions and 7 deletions
|
|
@ -60,8 +60,8 @@ void gdt_init()
|
|||
gdt_insert(4, GDT_ACCESS_DATA_RING0, 0xC0);
|
||||
gdt_insert(5, GDT_ACCESS_CODE_RING0, 0xA0);
|
||||
gdt_insert(6, GDT_ACCESS_DATA_RING0, 0xC0);
|
||||
gdt_insert(7, GDT_ACCESS_CODE_RING3, 0xA0);
|
||||
gdt_insert(8, GDT_ACCESS_DATA_RING3, 0xC0);
|
||||
gdt_insert(7, GDT_ACCESS_DATA_RING3, 0xC0);
|
||||
gdt_insert(8, GDT_ACCESS_CODE_RING3, 0xA0);
|
||||
|
||||
__gdtr.size = (sizeof(__gdt) - 1);
|
||||
__gdtr.offset = (uint64_t)__gdt;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
static bool irq_mapped[16] = { false };
|
||||
static void *irq_handlers[16] = { NULL };
|
||||
|
||||
void gate_syscall();
|
||||
void gate_syscall_int80();
|
||||
|
||||
exception_decl(0x00);
|
||||
exception_decl(0x01);
|
||||
|
|
@ -170,7 +170,7 @@ void idt_init()
|
|||
idt_insert(0x2E, GATE_INTR, 0, GDT_SEGMENT_CODE_RING0, __irq(0x0E));
|
||||
idt_insert(0x2F, GATE_INTR, 0, GDT_SEGMENT_CODE_RING0, __irq(0x0F));
|
||||
|
||||
idt_insert(0x80, GATE_INTR_DPL3, 0, GDT_SEGMENT_CODE_RING0, gate_syscall);
|
||||
idt_insert(0x80, GATE_INTR_DPL3, 0, GDT_SEGMENT_CODE_RING0, gate_syscall_int80);
|
||||
|
||||
irq_map(4, serial_trap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue