函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:scripts\dtc\libfdt\fdt_rw.c Create Date:2022-07-27 07:16:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:fdt_open_into

函数原型:int fdt_open_into(const void *fdt, void *buf, int bufsize)

返回类型:int

参数:

类型参数名称
const void *fdt
void *buf
intbufsize
405  fdtstart等于fdt
406  fdtend等于fdtstartfdt_totalsize(fdt)
411  mem_rsv_size等于fdt_num_mem_rsv(fdt)加1的和乘sizeof(structfdt_reserve_entry)
414  如果fdt_version(fdt)大于等于17则
415  struct_size等于fdt_size_dt_struct(fdt)
416  否则
417  struct_size等于0
418 fdt_next_tag(fdt, struct_size, & struct_size)不等于FDT_END循环
420  如果struct_size小于0则返回:struct_size
424  如果非fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)则
426  err等于fdt_move(fdt, buf, bufsize)
427  如果err则返回:err
429  fdt_set_version(buf, 17)
430  fdt_set_size_dt_struct(buf, struct_size)
431  fdt_set_totalsize(buf, bufsize)
432  返回:0
436  newsize等于FDT_ALIGN(sizeof(structfdt_header), 8)加mem_rsv_sizestruct_sizefdt_size_dt_strings(fdt)
439  如果bufsize小于newsize则返回:负FDT_ERR_EXISTS: Attempted to create a node or property which* already exists
443  tmp等于buf
445  如果tmpnewsize大于fdtstarttmp小于fdtend
447  tmp等于fdtend
448  如果tmpnewsize大于bufbufsize则返回:负FDT_ERR_EXISTS: Attempted to create a node or property which* already exists
452  fdt_packblocks_(fdt, tmp, mem_rsv_size, struct_size)
453  Not static to avoid a conflict with the prototype in the Linux headers.
455  fdt_set_magic(buf, 4: version, 4: total size )
456  fdt_set_totalsize(buf, bufsize)
457  fdt_set_version(buf, 17)
458  fdt_set_last_comp_version(buf, 16)
459  fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt))
461  返回:0
调用者
名称描述
fdt_create_empty_tree