blob: cb13aa8bebfa0abb29dbff30d8791e512a5ec1a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#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 gdt_pointer)
-> void
{
// TODO: build lgdt argument from global_descriptor_table_pointer (don't know how yet)
asm volatile("lgdt (%0)" : : "r"(gdt_pointer));
}
} // namespace teachos::arch::kernel::cpu
|