Merge branch 'master' into isa/arm64
[lunaix-os.git] / lunaix-os / includes / lunaix / owloysius.h
1 #ifndef __LUNAIX_OWLOYSIUS_H
2 #define __LUNAIX_OWLOYSIUS_H
3
4 #include <lunaix/ds/ldga.h>
5
6 /**
7  * @brief stage where only basic memory management service
8  * is present
9  */
10 #define on_earlyboot c_earlyboot
11
12 /**
13  * @brief stage where most kernel service is ready, non-preempt 
14  * kernel.
15  * 
16  * boot-stage initialization is about to conclude.
17  */
18 #define on_boot c_boot
19
20 /**
21  * @brief stage where all services started, kernel is in preempt
22  * state
23  */
24 #define on_postboot c_postboot
25
26 #define owloysius_fetch_init(func, call_stage)                                     \
27     export_ldga_el(lunainit, func, ptr_t, func);                            \
28     export_ldga_el_sfx(lunainit, func##_##call_stage, ptr_t, func, call_stage);
29
30 #define invoke_init_function(stage) ldga_invoke_fn0(lunainit##_##stage)
31
32 #endif /* __LUNAIX_OWLOYSIUS_H */