Function trapframe::init

source ·
pub unsafe fn init()
Expand description

Initialize interrupt handling on x86_64.

Safety

This function will:

  • Disable interrupt.
  • Switch to a new GDT, extend 7 more entries from the current one.
  • Switch to a new TSS, set GSBASE to its base address.
  • Switch to a new IDT, override the current one.
  • Enable syscall instruction.
    • set EFER::SYSTEM_CALL_EXTENSIONS