-
int initcall_run_list(const init_fnc_t init_sequence[])Boot Loader/U-BOOT 2019. 9. 25. 13:53
/lib/initcall.c
12345678910111213141516171819202122232425262728int initcall_run_list(const init_fnc_t init_sequence[]){const init_fnc_t *init_fnc_ptr;for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {unsigned long reloc_ofs = 0;int ret;if (gd->flags & GD_FLG_RELOC)reloc_ofs = gd->reloc_off;#ifdef CONFIG_EFI_APPreloc_ofs = (unsigned long)image_base;#endifdebug("initcall: %p", (char *)*init_fnc_ptr - reloc_ofs);if (gd->flags & GD_FLG_RELOC)debug(" (relocated to %p)\n", (char *)*init_fnc_ptr);elsedebug("\n");ret = (*init_fnc_ptr)();if (ret) {printf("initcall sequence %p failed at call %p (err=%d)\n",init_sequence,(char *)*init_fnc_ptr - reloc_ofs, ret);return -1;}}return 0;}cs CONFIG_EFI_APP은 정의되어있지 않다.
static const init_fnc_t init_sequence_f[]
에 정의된 함수를 실행한다.
'Boot Loader > U-BOOT' 카테고리의 다른 글
_main (0) 2019.09.25 static const init_fnc_t init_sequence_f[] (0) 2019.09.25 void board_init_f(ulong boot_flags) (0) 2019.09.25 ulong board_init_f_alloc_reserve(ulong top) (0) 2019.09.25 /common/init/board_init.c (0) 2019.09.25