Boot framework rework (#45)
[lunaix-os.git] / lunaix-os / arch / generic / includes / sys / hart.h
1 #ifndef __LUNAIX_ARCH_HART_H
2 #define __LUNAIX_ARCH_HART_H
3
4 #ifndef __ASM__
5 #include <lunaix/compiler.h>
6 #include <sys/cpu.h>
7
8 struct exec_param;
9
10 struct regcontext
11 {
12     
13 } compact;
14
15 struct hart_state
16 {
17     
18 } compact;
19
20 struct exec_param
21 {
22     struct hart_state* parent_state;
23 } compact;
24
25 ptr_t
26 hart_pc(struct hart_state* state);
27
28 ptr_t
29 hart_sp(struct hart_state* state);
30
31 bool
32 kernel_context(struct hart_state* hstate);
33
34 ptr_t
35 hart_stack_frame(struct hart_state* hstate);
36
37 int
38 hart_vector_stamp(struct hart_state* hstate);
39
40 unsigned int
41 hart_ecause(struct hart_state* hstate);
42
43 struct hart_state*
44 hart_parent_state(struct hart_state* hstate);
45
46 void
47 hart_push_state(struct hart_state* p_hstate, struct hart_state* hstate);
48
49 #endif
50
51 #endif /* __LUNAIX_ARCH_HART_H */