reserve_malloc,/*留出malloc的内存位置和ENV的内存大小*/reserve_board,/*留出bd所占用的内存大小(80字节)*/#endifsetup_machine,/*对于i.mx6ul该函数无效*/reserve_global_data,/*留出gd_t结构的内存大小(248字节)*/reserve_fdt,/*留出设备树的内存大小(i.mx6ul没有用)*/reserve_arch,/*空函数*/reserve_...
staticintreserve_fdt(void){#ifndefCONFIG_OF_EMBED// 当使用CONFIG_OF_EMBED方式时,也就是dtb集成在uboot中的时候,relocate uboot过程中也会把dtb一起relocate,所以这里就不需要处理。// 当使用CONFIG_OF_SEPARATE方式时,就需要在这里地方进行relocateif(gd->fdt_blob) { gd->fdt_size =ALIGN(fdt_totalsize(...
/* Get a pointer to the FDT */ gd->fdt_blob = __dtb_dt_begin;//如果使用 # elif defined CONFIG_OF_SEPARATE # ifdef CONFIG_SPL_BUILD /* FDT is at end of BSS unless it is in a different memory region */ if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)) gd->fdt_blob = (ulong *)&_...
if (gd->fdt_blob) { gd->fdt_size = ALIGN(fdt_totalsize(gd->fdt_blob) + 0x1000, 32); gd->start_addr_sp -= gd->fdt_size; gd->new_fdt = map_sysmem(gd->start_addr_sp, gd->fdt_size); debug("Reserving %lu Bytes for FDT at: %08lx\n", gd->fdt_size, gd->start_addr_sp...
board reserve_global_data reserve_fdt reserve_stacks dram_init_banksize sysme...
fdt memory <addr> <size> - Add/Update memory node fdt rsvmem print - Show current mem reserves fdt rsvmem add <addr> <size> - Add a mem reserve fdt rsvmem delete <index> - Delete a mem reserves fdt chosen [<start> <end>] - Add/update the /chosen branch in the tree ...
* reserve memory for U-Boot code, data & bss * round down to next 4 kB limit */addr-=gd->mon_len;// 在前面分析过gd->mon_len=0xae4e0,//所以addr=33FF0000 -0xae4e0=33F41B20,addr&=~(4096-1);//4095=0xfff,4kb对齐, addr=33F41000//所以分配给uboot各个段的重定位地址为33F410...
* reserve memory for U-Boot code, data & bss * round down to next 4 kB limit */ addr -= gd->mon_len; // 在前面分析过gd->mon_len=0xae4e0, //所以addr=33FF0000 -0xae4e0=33F41B20, addr &= ~(4096 - 1); //4095=0xfff,4kb对齐, addr=33F41000 ...
(arch/arm/lib/crt0.S)|-->board_init_f_alloc_reserve(common/init/board_init.c)/*为u-boot的gd结构体分配空间*/|-->board_init_f_init_reserve(common/init/board_init.c)/*将gd结构体清零*/|-->board_init_f(common/board_f.c)|-->initcall_run_list(include/initcall.h)/*初始化序列函数...
/* bootm - boot application image from image in memory */ /***/ intdo_bootm(cmd_tbl_t*cmdtp,intflag,intargc,char*constargv[]) { #ifdefCONFIG_NEEDS_MANUAL_RELOC staticintrelocated=0; if(!relocated){ inti; /* relocate names of sub-command table */ for(i...