-
static const init_fnc_t init_sequence_f[]Boot Loader/U-BOOT 2019. 9. 25. 13:56
/common/board_f.c
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138static const init_fnc_t init_sequence_f[] = {setup_mon_len,#ifdef CONFIG_OF_CONTROLfdtdec_setup,#endif#ifdef CONFIG_TRACEtrace_early_init,#endifinitf_malloc,initf_console_record,#if defined(CONFIG_HAVE_FSP)arch_fsp_init,#endifarch_cpu_init, /* basic arch cpu dependent setup */mach_cpu_init, /* SoC/machine dependent CPU setup */initf_dm,arch_cpu_init_dm,mark_bootstage, /* need timer, go after init dm */#if defined(CONFIG_BOARD_EARLY_INIT_F)board_early_init_f,#endif#if defined(CONFIG_PPC) || defined(CONFIG_SYS_FSL_CLK) || defined(CONFIG_M68K)/* get CPU and bus clocks according to the environment variable */get_clocks, /* get CPU and bus clocks (etc.) */#endiftimer_init, /* initialize timer */#if defined(CONFIG_BOARD_POSTCLK_INIT)board_postclk_init,#endifenv_init, /* initialize environment */init_baud_rate, /* initialze baudrate settings */serial_init, /* serial communications setup */console_init_f, /* stage 1 init of console */display_options, /* say that we are here */display_text_info, /* show debugging info if required */#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SH) || \defined(CONFIG_X86)checkcpu,#endif#if defined(CONFIG_DISPLAY_CPUINFO)print_cpuinfo, /* display cpu info (and speed) */#endif#if defined(CONFIG_DISPLAY_BOARDINFO)show_board_info,#endifINIT_FUNC_WATCHDOG_INIT#if defined(CONFIG_MISC_INIT_F)misc_init_f,#endifINIT_FUNC_WATCHDOG_RESET#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)init_func_i2c,#endif#if defined(CONFIG_HARD_SPI)init_func_spi,#endifannounce_dram_init,dram_init, /* configure available RAM banks */#ifdef CONFIG_POSTpost_init_f,#endifINIT_FUNC_WATCHDOG_RESET#if defined(CONFIG_SYS_DRAM_TEST)testdram,#endif /* CONFIG_SYS_DRAM_TEST */INIT_FUNC_WATCHDOG_RESET#ifdef CONFIG_POSTinit_post,#endifINIT_FUNC_WATCHDOG_RESET/** Now that we have DRAM mapped and working, we can* relocate the code and continue running from DRAM.** Reserve memory at end of RAM for (top down in that order):* - area that won't get touched by U-Boot and Linux (optional)* - kernel log buffer* - protected RAM* - LCD framebuffer* - monitor code* - board info struct*/setup_dest_addr,#if defined(CONFIG_LOGBUFFER)reserve_logbuffer,#endif#ifdef CONFIG_PRAMreserve_pram,#endifreserve_round_4k,#ifdef CONFIG_ARMreserve_mmu,#endifreserve_video,reserve_trace,reserve_uboot,reserve_malloc,reserve_board,setup_machine,reserve_global_data,reserve_fdt,reserve_arch,reserve_stacks,dram_init_banksize,show_dram_config,#if defined(CONFIG_M68K) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \defined(CONFIG_SH)setup_board_part1,#endif#if defined(CONFIG_PPC) || defined(CONFIG_M68K)INIT_FUNC_WATCHDOG_RESETsetup_board_part2,#endifdisplay_new_sp,#ifdef CONFIG_SYS_EXTBDINFOsetup_board_extra,#endif#ifdef CONFIG_OF_BOARD_FIXUPfix_fdt,#endifINIT_FUNC_WATCHDOG_RESETreloc_fdt,setup_reloc,#if defined(CONFIG_X86) || defined(CONFIG_ARC)copy_uboot_to_ram,do_elf_reloc_fixups,clear_bss,#endif#if defined(CONFIG_XTENSA)clear_bss,#endif#if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \!CONFIG_IS_ENABLED(X86_64)jump_to_copy,#endifNULL,};cs CONFIG_OF_CONTROL=y
CONFIG_BOARD_EARLY_INIT_F=y
36라인 아무것도 없음
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_ARM=y
107번 11번 아무것도 없음
119번 실행 x
125번 아무것도 없음
130번 아무것도 없음
133번 실행 x
실행될 함수들
setup_mon_len
fdtdec_setup
initf_malloc
initf_console_record
/* basic arch cpu dependent setup */
arch_cpu_init
/* SoC/machine dependent CPU setup */
mach_cpu_init
initf_dm
arch_cpu_init_dm
/* need timer, go after init dm */
mark_bootstage
board_early_init_f
/* initialize timer */
timer_init
/* initialize environment */
env_init
/* initialze baudrate settings */
init_baud_rate
/* serial communications setup */
serial_init
/* stage 1 init of console */
console_init_f
/* say that we are here */
display_options
/* show debugging info if required */
display_text_info
/* display cpu info (and speed) */
print_cpuinfo
show_board_info
INIT_FUNC_WATCHDOG_INIT????????????????????????
INIT_FUNC_WATCHDOG_RESET?????????????????????
announce_dram_init
/* configure available RAM banks */
dram_init
INIT_FUNC_WATCHDOG_RESET????????????????????????
INIT_FUNC_WATCHDOG_RESET
INIT_FUNC_WATCHDOG_RESET
/*
* Now that we have DRAM mapped and working, we can
* relocate the code and continue running from DRAM.
*
* Reserve memory at end of RAM for (top down in that order):
* - area that won't get touched by U-Boot and Linux (optional)
* - kernel log buffer
* - protected RAM
* - LCD framebuffer
* - monitor code
* - board info struct
*/
setup_dest_addr
reserve_round_4k
reserve_mmu
reserve_video
reserve_trace
reserve_uboot
reserve_malloc
reserve_board
setup_machine
reserve_global_data
reserve_fdt
reserve_arch
reserve_stacks
dram_init_banksize
show_dram_config
display_new_sp
INIT_FUNC_WATCHDOG_RESET
reloc_fdt
setup_reloc
NULL
을
'Boot Loader > U-BOOT' 카테고리의 다른 글
static int setup_mon_len(void) (0) 2019.09.25 _main (0) 2019.09.25 int initcall_run_list(const init_fnc_t init_sequence[]) (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