示例2: fdt_get_mem_rsv ▲点赞 6▼ intfdt_get_mem_rsv(constvoid*fdt,intn,uint64_t*address,uint64_t*size){ CHECK_HEADER(fdt); *address =fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address); *size =fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->size);return0; } 开发者ID:ForayJones,项目名...
}if(prop ==NULL&& offset == fdt_path_offset(fdtp,"/chosen")) {if(strcmp(propname,"fdtbootcpu") ==0)return(sizeof(cell_t));if(strcmp(propname,"fdtmemreserv") ==0)return(sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp)); }if(prop ==NULL)return(-1);return(len); } 开发者ID:...
static int fdt_sw_probe_memrsv_(void *fdt) { int err = fdt_sw_probe_(fdt); if (err) return err; if (fdt_off_dt_strings(fdt) != 0) return -FDT_ERR_BADSTATE; return 0; } #define FDT_SW_PROBE_MEMRSV(fdt) \ { \ int err; \ if ((err = fdt_sw_probe_memrsv_(fdt)) ...
fdtdec_get_int(blob, node, "nand-width", 8); //to get nand-width parameter. In the end, before boot kernel we can reserved the fdt memory by "boot_fdt_add_mem_rsv_regions" in bootm.c(MIPS)
can_assume(VALID_DTB)) { if ((fdt_totalsize(fdt) < hdrsize) || (fdt_totalsize(fdt) > INT_MAX)) return -FDT_ERR_TRUNCATED; /* Bounds check memrsv block */ if (!check_off_(hdrsize, fdt_totalsize(fdt), fdt_off_mem_rsvmap(fdt))) return -FDT_ERR_TRUNCATED; /* Bounds check ...
用于管理镜像的内存。...接着,uboot会把DTB镜像reload一次,使得DTB镜像所在的物理内存归lmb所管理:①boot_fdt_add_mem_rsv_regions会将原先的内存DTB镜像所在的内存置为reserve...因而,不建议设置fdt_high参数。接下来,do_bootm会根据内核的类型调用对应的启动函数。与linux对应的是do_bootm_linux。 5.5K30...
off_mem_rsvmap version …… 其中,magic是一个固定的值,0xd00dfeed(大端)或者0xedfe0dd0(小端)。 以s5pv210-tiny210.dtb为例: 执行”hexdump -C s5pv210-tiny210.dtb | more”命令 @:dts$ hexdump -C s5pv210-tiny210.dtb | more00000000d00d fe ed00005a cc0000003800005814|...Z...8..X.|00000...
defined(CONFIG_SILENT_U_BOOT_ONLY) if (images->os.os == IH_OS_LINUX) fixup_silent_linux();#endif...ret && (states & BOOTM_STATE_FDT)) { boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr);...ret = boot_relocate_fdt(&images->lmb, &images->ft_addr, &images->ft_...
printk(KERN_WARNING "End of tree marker overwritten: %08x/n", ((u32 *)mem)[size / 4] ); *allnextp = NULL; /* Get pointer to OF "/chosen" node for use everywhere */ of_chosen = of_find_node_by_path("/chosen"); if (of_chosen == NULL)...
CHECK(fdt_add_mem_rsv(fdt, TEST_ADDR_2, TEST_SIZE_2)); CHECK(fdt_setprop_string(fdt,0,"compatible","test_tree1")); CHECK(fdt_setprop_cell(fdt,0,"prop-int", TEST_VALUE_1)); CHECK(fdt_setprop_string(fdt,0,"prop-str", TEST_STRING_1)); ...