Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:scripts\dtc\libfdt\fdt.c Create Date:2022-07-28 06:18:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Minimal sanity check for a read-only tree. fdt_ro_probe_() checks* that the given buffer contains what appears to be a flattened* device tree with sane information in its header.

Proto:int fdt_ro_probe_(const void *fdt)

Type:int

Parameter:

TypeParameterName
const void *fdt
20  If fdt_magic(fdt) == 4: version, 4: total size Then
22  If fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION Then Return -FDT_ERR_BADMAGIC: Given "device tree" appears not to be a* device tree at all - it is missing the flattened device* tree magic number.
24  If fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION Then Return -FDT_ERR_BADMAGIC: Given "device tree" appears not to be a* device tree at all - it is missing the flattened device* tree magic number.
26  Else if fdt_magic(fdt) == FDT_SW_MAGIC Then
28  If fdt_size_dt_struct(fdt) == 0 Then Return -FDT_ERR_BADPHANDLE: Function was passed an invalid phandle.* This can be caused either by an invalid phandle property* length, or the phandle value was either 0 or -1, which are* not permitted.
30  Else
31  Return -FDT_ERR_TRUNCATED: FDT or a sub-block is improperly* terminated (overflows, goes outside allowed bounds, or* isn't properly terminated).
34  Return 0