aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/dump_gdt.cc
blob: 718ada68c973be44034363aea430289f3a189721 (plain)
1
2
3
4
5
6
7
8
#include <stdlib.h>
#include "../gdt.h"

extern "C" void dump_gdt() {
  GDT::Pointer gdtr{0, 0};
  asm volatile("sgdt %0" : "=m"(gdtr) :);
  printk("GDT at ", uhex{gdtr.base}, " , limit=", gdtr.limit, '\n');
}