4 #include <lunaix/types.h>
6 #ifdef CONFIG_ARCH_X86_64
15 * @brief Get processor ID string
20 cpu_get_id(char* id_out);
26 cpu_trap_panic(char* message);
29 * @brief Load current processor state
37 asm volatile("pushf\n"
44 * @brief Load current processor config
52 asm volatile(_MOV "%%cr0,%0" : "=r"(val));
57 * @brief Change current processor state
62 cpu_chconfig(reg_t val)
64 asm(_MOV "%0, %%cr0" ::"r"(val));
68 * @brief Change current virtual memory space
73 cpu_chvmspace(reg_t val)
75 asm(_MOV "%0, %%cr3" ::"r"(val));
79 * @brief Read exeception address
87 asm volatile(_MOV "%%cr2,%0" : "=r"(val));
93 cpu_enable_interrupt()
99 cpu_disable_interrupt()
110 #endif /* __LUNAIX_CPU_H */