aboutsummaryrefslogtreecommitdiff
path: root/include/kern/init.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/kern/init.h')
-rw-r--r--include/kern/init.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/kern/init.h b/include/kern/init.h
index 0ebbeac..7c40d19 100644
--- a/include/kern/init.h
+++ b/include/kern/init.h
@@ -64,6 +64,13 @@
void(*init7_ptr)() = init7fn; \
static void init7fn
+#define entry_point(fn) \
+ static __attribute((__section__(".entry_point"))) __attribute((__used__)) \
+ struct { \
+ uint32_t _unused; \
+ uint32_t entry_point; \
+ } c = { 0x2000c000, (uint32_t) &fn }
+
typedef enum {
INIT_LEVEL_0,
INIT_LEVEL_1,