Uboot start process analysis (five)

1 Introduction

Uboot start process analysis (e) In the previous article, the following link:

https://www.cnblogs.com/Cqlismy/p/12147411.html

Already board_init_f () function to make a simple analysis, the function of some early initialization of peripherals such as serial debugging, and populated member variables gd_t structure body, most notably the entire DRAM memory has been assigned to uboot relocation, then, let's review process probably _main function, as follows:

_main
    |
    board_init_f_alloc_reserve-->reserve gd and early malloc area
    |
    board_init_f_init_reserve-->initialize global data
    |
    board_init_f-->initialize ddr,timer...,and fill gd_t
    |
    relocate_code-->relocate uboot code
    |
    relocate_vectors-->relocate vectors
    |
    board_init_r-->calling board_init_r

In _main, call the finished board_init_f () after the function, the good of DRAM memory allocation, filling gd_t structure member variables, then, is to call relocate_code () function relocation uboot code calls relocate_vectors () function interrupt relocation to the scale, a simple analysis of this article will probably uboot relocation process.

 

2, uboot related variables

 

3, relocate_code function

 

4, relocate_vectors function

 

5. Summary

Guess you like

Origin www.cnblogs.com/Cqlismy/p/12152400.html