函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fdt_check_header

函数原型:int fdt_check_header(const void *fdt)

返回类型:int

参数:

类型参数名称
const void *fdt
72  如果fdt_magic(fdt)不等于4: version, 4: total size 则返回:负FDT_ERR_TRUNCATED: FDT or a sub-block is improperly* terminated (overflows, goes outside allowed bounds, or* isn't properly terminated).
74  hdrsize等于fdt_header_size(fdt)
75  如果fdt_version(fdt)小于FDT_FIRST_SUPPORTED_VERSIONfdt_last_comp_version(fdt)大于FDT_LAST_SUPPORTED_VERSION则返回:负FDT_ERR_BADMAGIC: Given "device tree" appears not to be a* device tree at all - it is missing the flattened device* tree magic number.
78  如果fdt_version(fdt)小于fdt_last_comp_version(fdt)则返回:负FDT_ERR_BADMAGIC: Given "device tree" appears not to be a* device tree at all - it is missing the flattened device* tree magic number.
81  如果fdt_totalsize(fdt)小于hdrsizefdt_totalsize(fdt)大于INT_MAX则返回:负Error codes: codes for bad device tree blobs
86  如果非check_off_(hdrsize, fdt_totalsize(fdt), fdt_off_mem_rsvmap(fdt))则返回:负Error codes: codes for bad device tree blobs
90  如果fdt_version(fdt)小于17则
91  如果非check_off_(hdrsize, fdt_totalsize(fdt), fdt_off_dt_struct(fdt))则返回:负Error codes: codes for bad device tree blobs
94  否则
95  如果非check_block_(hdrsize, fdt_totalsize(fdt), fdt_off_dt_struct(fdt), fdt_size_dt_struct(fdt))则返回:负Error codes: codes for bad device tree blobs
102  如果非check_block_(hdrsize, fdt_totalsize(fdt), fdt_off_dt_strings(fdt), fdt_size_dt_strings(fdt))则返回:负Error codes: codes for bad device tree blobs
106  返回:0
调用者
名称描述
fdt_check_full