reserve_fdt:
static int reserve_fdt(void) { #ifndef CONFIG_OF_EMBED /* * If the device tree is sitting immediately above our image then we * must relocate it. If it is embedded in the data section, then it * will be relocated with other data. */ 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); } #endif
return 0; }
本文介绍U-Boot环境下为设备树(FDT)预留内存的过程。针对不同配置,代码会检查设备树是否需要重新定位,并据此调整内存布局。特别地,如果设备树位于镜像上方,则需要为其预留足够的空间。
2361

被折叠的 条评论
为什么被折叠?



