visor/include/x86/gdt.h

20 lines
267 B
C

#ifndef _VISOR_GDT_H_
#define _VISOR_GDT_H_
#include <stdint.h>
__attribute__ ((packed))
struct GDTR {
uint16_t limit;
uint64_t base;
};
static inline struct GDTR
storegdt(void)
{
struct GDTR gdtr;
__asm__ ("sgdt %0\n\t" : "=m"(gdtr));
return gdtr;
}
#endif