Decoupling Architectural-specific Code (#35)
[lunaix-os.git] / lunaix-os / arch / generic / includes / sys / cpu.h
1 #ifndef __LUNAIX_CPU_H
2 #define __LUNAIX_CPU_H
3
4 #include <lunaix/types.h>
5
6 /**
7  * @brief Get processor ID string
8  *
9  * @param id_out
10  */
11 void
12 cpu_get_id(char* id_out);
13
14 void
15 cpu_trap_sched();
16
17 void
18 cpu_trap_panic(char* message);
19
20
21 /**
22  * @brief Load current processor state
23  *
24  * @return ptr_t
25  */
26 ptr_t
27 cpu_ldstate();
28
29 /**
30  * @brief Load current processor config
31  *
32  * @return ptr_t
33  */
34 ptr_t
35 cpu_ldconfig();
36
37 /**
38  * @brief Change current processor state
39  *
40  * @return ptr_t
41  */
42 void
43 cpu_chconfig(ptr_t val);
44
45 /**
46  * @brief Change current virtual memory space
47  *
48  * @return ptr_t
49  */
50 void
51 cpu_chvmspace(ptr_t val);
52
53 void
54 cpu_enable_interrupt();
55
56 void
57 cpu_disable_interrupt();
58
59 void
60 cpu_wait();
61
62 /**
63  * @brief Read exeception address
64  *
65  * @return ptr_t
66  */
67 ptr_t
68 cpu_ldeaddr();
69
70
71 #endif /* __LUNAIX_CPU_H */