23 #ifndef LIBBSP_ARM_SHARED_START_H 24 #define LIBBSP_ARM_SHARED_START_H 28 #include <bsp/linker-symbols.h> 44 #define BSP_START_TEXT_SECTION __attribute__((section(".bsp_start_text"))) 46 #define BSP_START_DATA_SECTION __attribute__((section(".bsp_start_data"))) 51 #ifdef BSP_START_HOOKS_WITH_LOADER_ARGS 52 #define BSP_START_HOOKS_LOADER_ARGS int saved_psr, int saved_machid, int saved_dtb_adr 54 #define BSP_START_HOOKS_LOADER_ARGS void 95 BSP_START_TEXT_SECTION
static inline void bsp_start_copy_sections(
void)
99 (
int *) bsp_section_text_begin,
100 (
const int *) bsp_section_text_load_begin,
101 (
size_t) bsp_section_text_size
106 (
int *) bsp_section_rodata_begin,
107 (
const int *) bsp_section_rodata_load_begin,
108 (
size_t) bsp_section_rodata_size
113 (
int *) bsp_section_data_begin,
114 (
const int *) bsp_section_data_load_begin,
115 (
size_t) bsp_section_data_size
120 (
int *) bsp_section_fast_text_begin,
121 (
const int *) bsp_section_fast_text_load_begin,
122 (
size_t) bsp_section_fast_text_size
127 (
int *) bsp_section_fast_data_begin,
128 (
const int *) bsp_section_fast_data_load_begin,
129 (
size_t) bsp_section_fast_data_size
133 BSP_START_TEXT_SECTION
static inline void 134 bsp_start_memcpy_libc(
void *dest,
const void *src,
size_t n)
137 memcpy(dest, src, n);
148 BSP_START_TEXT_SECTION
static inline void bsp_start_copy_sections_compact(
void)
151 bsp_start_memcpy_libc(
152 bsp_section_data_begin,
153 bsp_section_data_load_begin,
154 (
size_t) bsp_section_data_size
158 bsp_start_memcpy_libc(
159 bsp_section_fast_text_begin,
160 bsp_section_fast_text_load_begin,
161 (
size_t) bsp_section_fast_text_size
165 bsp_start_memcpy_libc(
166 bsp_section_fast_data_begin,
167 bsp_section_fast_data_load_begin,
168 (
size_t) bsp_section_fast_data_size
172 BSP_START_TEXT_SECTION
static inline void bsp_start_clear_bss(
void)
174 memset(bsp_section_bss_begin, 0, (
size_t) bsp_section_bss_size);
void _start(void)
System start entry.
void bsp_start_hook_0(BSP_START_HOOKS_LOADER_ARGS)
Start entry hook 0.
void bsp_start_memcpy(int *dest, const int *src, size_t n)
Similar to standard memcpy().
void bsp_start_hook_1(BSP_START_HOOKS_LOADER_ARGS)
Start entry hook 1.
void bsp_start_memcpy_arm(int *dest, const int *src, size_t n)
ARM entry point to bsp_start_memcpy().