uboot中C语言代码入口函数(start_armboot)的注释
//打印BANK的相关信息display_dram_config,NULL,//用以标识列表数组的结束 };
//------------start_armboot-------------------- //功能:完成uboot第二阶级的一系列的//硬件初始化工作, 然后转入main函数. //备注:该函数是C程序的入口函数,从汇编语//言跳转到此 . //--------------------------------------------- void start_armboot (void){ init_fnc_t **init_fnc_ptr;//init_fnc_t 是各初始化函数的数组 char *s;
#ifndef CFG_NO_FLASH ulong size;#endif#if defined(CONFIG_VFD) || defined(CONFIG_LCD) unsigned long addr;#endif
/* Pointer is writable since we allocated a register for it gd_t:定义在 /include/asm-arm/Global_data.h中,包含一些全局通用的变量. _armboot_start:代码的起始地址,它定义在start.S中的前几行中,定义为 _start当系统第一次加电时,指令是从0x0地址开始执行的,所以此时的 _start值应为0x0;而当uboot经过代码重定位后,指令会从 _TEXT_BASE 处开始执行,此时的 _start值就成了 _TEXT_BASE的值. CFG_MALLOC_LEN:在/include/configs/sm...
>> 阅读全文