ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • static const init_fnc_t init_sequence_f[]
    Boot Loader/U-BOOT 2019. 9. 25. 13:56

    /common/board_f.c

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    static const init_fnc_t init_sequence_f[] = {
        setup_mon_len,
    #ifdef CONFIG_OF_CONTROL
        fdtdec_setup,
    #endif
    #ifdef CONFIG_TRACE
        trace_early_init,
    #endif
        initf_malloc,
        initf_console_record,
    #if defined(CONFIG_HAVE_FSP)
        arch_fsp_init,
    #endif
        arch_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.) */
    #endif
        timer_init,        /* initialize timer */
    #if defined(CONFIG_BOARD_POSTCLK_INIT)
        board_postclk_init,
    #endif
        env_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,
    #endif
        INIT_FUNC_WATCHDOG_INIT
    #if defined(CONFIG_MISC_INIT_F)
        misc_init_f,
    #endif
        INIT_FUNC_WATCHDOG_RESET
    #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
        init_func_i2c,
    #endif
    #if defined(CONFIG_HARD_SPI)
        init_func_spi,
    #endif
        announce_dram_init,
        dram_init,        /* configure available RAM banks */
    #ifdef CONFIG_POST
        post_init_f,
    #endif
        INIT_FUNC_WATCHDOG_RESET
    #if defined(CONFIG_SYS_DRAM_TEST)
        testdram,
    #endif /* CONFIG_SYS_DRAM_TEST */
        INIT_FUNC_WATCHDOG_RESET
     
    #ifdef CONFIG_POST
        init_post,
    #endif
        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,
    #if defined(CONFIG_LOGBUFFER)
        reserve_logbuffer,
    #endif
    #ifdef CONFIG_PRAM
        reserve_pram,
    #endif
        reserve_round_4k,
    #ifdef CONFIG_ARM
        reserve_mmu,
    #endif
        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,
    #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_RESET
        setup_board_part2,
    #endif
        display_new_sp,
    #ifdef CONFIG_SYS_EXTBDINFO
        setup_board_extra,
    #endif
    #ifdef CONFIG_OF_BOARD_FIXUP
        fix_fdt,
    #endif
        INIT_FUNC_WATCHDOG_RESET
        reloc_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,
    #endif
        NULL,
    };
    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

    댓글

Designed by Tistory.