aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/kernel/cpu/lgdt.cpp
blob: cad3ffa609028973d661d99653379945e35d14e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "arch/kernel/cpu/lgdt.hpp"

#include "arch/context_switching/descriptor_table/global_descriptor_table_pointer.hpp"

namespace teachos::arch::kernel::cpu
{
  auto
  load_global_descriptor_table(context_switching::descriptor_table::global_descriptor_table_pointer const & gdt_pointer)
      -> void
  {
    asm volatile("lgdt %[input]" : /* no output from call */ : [input] "r"(gdt_pointer));
  }
}  // namespace teachos::arch::kernel::cpu