Go to the documentation of this file.
16 #include <asm/segment.h>
22 static void realmode_switch_hook(
void)
25 asm volatile(
"lcallw *%0"
27 :
"eax",
"ebx",
"ecx",
"edx");
38 static void mask_all_interrupts(
void)
49 static void reset_coprocessor(
void)
66 static void setup_gdt(
void)
86 gdt.
len =
sizeof(boot_gdt)-1;
87 gdt.
ptr = (
u32)&boot_gdt + (
ds() << 4);
89 asm volatile(
"lgdtl %0" : :
"m" (
gdt));
95 static void setup_idt(
void)
97 static const struct gdt_ptr null_idt = {0, 0};
98 asm volatile(
"lidtl %0" : :
"m" (null_idt));
107 realmode_switch_hook();
111 puts(
"A20 gate not responding, unable to boot...\n");
119 mask_all_interrupts();