26 if ((uintptr_t)fdt & 7)
46 if (totalsize < INT32_MAX)
54 return (off >= hdrsize) && (off <= totalsize);
62 if ((base +
size) < base)
73 else if (version <= 2)
75 else if (version <= 3)
77 else if (version <= 16)
94 if ((uintptr_t)fdt & 7)
142 unsigned int uoffset = offset;
149 if ((absoffset < uoffset)
150 || ((absoffset + len) < absoffset)
155 if (((uoffset + len) < uoffset)
166 int offset = startoffset;
182 }
while (p && (*p !=
'\0'));
195 (INT_MAX <= sum || sum < (
uint32_t) offset))
203 ((offset -
len) % 8) != 0)
271 if (depth && ((--(*depth)) < 0))
276 if ((nextoffset >= 0)
292 if (offset < 0 || depth != 1)
308 if (offset < 0 || depth < 1)
318 const char *last = strtab + tabsize -
len;
321 for (p = strtab; p <= last; p++)
327int fdt_move(
const void *fdt,
void *buf,
int bufsize)
int fdt_first_subnode(const void *fdt, int offset)
const char * fdt_find_string_(const char *strtab, int tabsize, const char *s)
int fdt_move(const void *fdt, void *buf, int bufsize)
int fdt_check_header(const void *fdt)
int fdt_check_prop_offset_(const void *fdt, int offset)
const void * fdt_offset_ptr(const void *fdt, int offset, unsigned int len)
int fdt_next_node(const void *fdt, int offset, int *depth)
int32_t fdt_ro_probe_(const void *fdt)
int fdt_check_node_offset_(const void *fdt, int offset)
static int check_block_(uint32_t hdrsize, uint32_t totalsize, uint32_t base, uint32_t size)
size_t fdt_header_size_(uint32_t version)
int fdt_next_subnode(const void *fdt, int offset)
uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)
static int check_off_(uint32_t hdrsize, uint32_t totalsize, uint32_t off)
size_t fdt_header_size(const void *fdt)
MOSAPI int memcmp(const void *s1, const void *s2, size_t n)
MOSAPI void * memmove(void *dest, const void *src, size_t n)
#define fdt_totalsize(fdt)
#define FDT_ERR_TRUNCATED
#define FDT_ERR_ALIGNMENT
#define FDT_LAST_SUPPORTED_VERSION
#define FDT_ERR_BADOFFSET
#define fdt_last_comp_version(fdt)
#define fdt_size_dt_struct(fdt)
#define fdt_off_dt_strings(fdt)
#define fdt_size_dt_strings(fdt)
#define FDT_FIRST_SUPPORTED_VERSION
#define FDT_ERR_BADVERSION
#define fdt_off_mem_rsvmap(fdt)
#define fdt_off_dt_struct(fdt)
#define FDT_ERR_BADSTRUCTURE
static uint32_t fdt32_to_cpu(fdt32_t x)
static const void * fdt_offset_ptr_(const void *fdt, int offset)
#define FDT_RO_PROBE(fdt)
#define can_assume(_assume)
static size_t strlen(const char *s)