4 #include <lunaix/types.h>
7 * @brief Get processor ID string
12 cpu_get_id(char* id_out);
18 cpu_trap_panic(char* message);
22 * @brief Load current processor state
30 asm volatile("pushf\n"
37 * @brief Load current processor config
45 asm volatile("movl %%cr0,%0" : "=r"(val));
50 * @brief Change current processor state
55 cpu_chconfig(u32_t val)
57 asm("mov %0, %%cr0" ::"r"(val));
61 * @brief Change current virtual memory space
66 cpu_chvmspace(u32_t val)
68 asm("mov %0, %%cr3" ::"r"(val));
72 cpu_enable_interrupt()
78 cpu_disable_interrupt()
90 * @brief Read exeception address
98 asm volatile("movl %%cr2,%0" : "=r"(val));
102 #endif /* __LUNAIX_CPU_H */