+} __attribute__((packed)) gp_regs;
+
+typedef struct
+{
+ reg16 ss;
+ reg16 es;
+ reg16 ds;
+ reg16 fs;
+ reg16 gs;
+ reg16 cs;
+} __attribute__((packed)) sg_reg;
+
+void
+cpu_get_brand(char* brand_out);
+
+int
+cpu_has_apic();
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type"
+static inline reg32
+cpu_rcr0()
+{
+ asm("mov %cr0, %eax");
+}
+
+static inline reg32
+cpu_rcr2()
+{
+ asm("mov %cr2, %eax");
+}
+
+static inline reg32
+cpu_rcr3()
+{
+ asm("mov %cr3, %eax");
+}
+#pragma GCC diagnostic pop