Skip to content

Commit c3e4387

Browse files
committed
Kernel: Stop flushing GDT/IDT registers all the time
1 parent 17d4e74 commit c3e4387

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

Kernel/Arch/i386/CPU.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,12 @@ void register_interrupt_handler(u8 index, void (*f)())
447447
{
448448
s_idt[index].low = 0x00080000 | LSW((f));
449449
s_idt[index].high = ((u32)(f)&0xffff0000) | 0x8e00;
450-
flush_idt();
451450
}
452451

453452
void register_user_callable_interrupt_handler(u8 index, void (*f)())
454453
{
455454
s_idt[index].low = 0x00080000 | LSW((f));
456455
s_idt[index].high = ((u32)(f)&0xffff0000) | 0xef00;
457-
flush_idt();
458456
}
459457

460458
void flush_idt()

Kernel/Scheduler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ void Scheduler::switch_now()
464464
{
465465
Descriptor& descriptor = get_gdt_entry(current->selector());
466466
descriptor.type = 9;
467-
flush_gdt();
468467
asm("sti\n"
469468
"ljmp *(%%eax)\n" ::"a"(&current->far_ptr()));
470469
}
@@ -521,7 +520,6 @@ bool Scheduler::context_switch(Thread& thread)
521520

522521
auto& descriptor = get_gdt_entry(thread.selector());
523522
descriptor.type = 11; // Busy TSS
524-
flush_gdt();
525523
return true;
526524
}
527525

0 commit comments

Comments
 (0)