summaryrefslogtreecommitdiff
path: root/include/init.h
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2018-03-13 13:57:01 +0100
committerTom Rini <trini@konsulko.com>2018-03-16 14:56:00 -0400
commit11f86cbaff517da4561ab2ed05354671be6ef7a1 (patch)
tree0b6198eba7b27defb452951b39b2f2a428a428bb /include/init.h
parentd6f8771239b15e8a68b38fcde96977db212887bd (diff)
common: move board_init.c prototypes in init.h
Move function prototypes for common/init/board_init.c from common.h to init.h Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'include/init.h')
-rw-r--r--include/init.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/init.h b/include/init.h
index f57a438986..f952602b2f 100644
--- a/include/init.h
+++ b/include/init.h
@@ -109,6 +109,45 @@ int misc_init_f(void);
int embedded_dtb_select(void);
#endif
+/* common/init/board_init.c */
+extern ulong monitor_flash_len;
+
+/**
+ * ulong board_init_f_alloc_reserve - allocate reserved area
+ *
+ * This function is called by each architecture very early in the start-up
+ * code to allow the C runtime to reserve space on the stack for writable
+ * 'globals' such as GD and the malloc arena.
+ *
+ * @top: top of the reserve area, growing down.
+ * @return: bottom of reserved area
+ */
+ulong board_init_f_alloc_reserve(ulong top);
+
+/**
+ * board_init_f_init_reserve - initialize the reserved area(s)
+ *
+ * This function is called once the C runtime has allocated the reserved
+ * area on the stack. It must initialize the GD at the base of that area.
+ *
+ * @base: top from which reservation was done
+ */
+void board_init_f_init_reserve(ulong base);
+
+/**
+ * arch_setup_gd() - Set up the global_data pointer
+ *
+ * This pointer is special in some architectures and cannot easily be assigned
+ * to. For example on x86 it is implemented by adding a specific record to its
+ * Global Descriptor Table! So we we provide a function to carry out this task.
+ * For most architectures this can simply be:
+ *
+ * gd = gd_ptr;
+ *
+ * @gd_ptr: Pointer to global data
+ */
+void arch_setup_gd(gd_t *gd_ptr);
+
/* common/board_r.c */
#endif /* __ASSEMBLY__ */