6 typedef unsigned int reg32;
7 typedef unsigned short reg16;
19 } __attribute__((packed)) gp_regs;
29 } __attribute__((packed)) sg_reg;
32 cpu_get_brand(char* brand_out);
34 #pragma GCC diagnostic push
35 #pragma GCC diagnostic ignored "-Wreturn-type"
39 asm("mov %cr0, %eax");
45 asm("mov %cr2, %eax");
51 asm("mov %cr3, %eax");
53 #pragma GCC diagnostic pop
58 asm("mov %0, %%cr0" ::"r"(v));
64 asm("mov %0, %%cr2" ::"r"(v));
70 asm("mov %0, %%cr3" ::"r"(v));
76 asm("invlpg (%0)" ::"r"((uintptr_t)va) : "memory");
80 cpu_enable_interrupt()
86 cpu_disable_interrupt()
95 asm("movl %%cr3, %0\n"