Created
April 16, 2015 10:41
-
-
Save mfleming/5fb77eb761ae0fd0c64a to your computer and use it in GitHub Desktop.
grub empty IDT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct grub_cpu_idt_descriptor | |
{ | |
grub_uint16_t limit; | |
grub_uint32_t base; | |
} __attribute__ ((packed)); | |
static struct grub_cpu_idt_descriptor no_idt __attribute__((aligned(16))); | |
/* The main routine. */ | |
void __attribute__ ((noreturn)) | |
grub_main (void) | |
{ | |
void (*fo)(void) = NULL; | |
asm volatile ("lidt %0" :: "m" (no_idt)); | |
fo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment