25#define FDT_SW_PROBE(fdt) \
28 if ((err = fdt_sw_probe_(fdt)) != 0) \
49#define FDT_SW_PROBE_MEMRSV(fdt) \
52 if ((err = fdt_sw_probe_memrsv_(fdt)) != 0) \
76#define FDT_SW_PROBE_STRUCT(fdt) \
79 if ((err = fdt_sw_probe_struct_(fdt)) != 0) \
97 unsigned int spaceleft;
102 if ((offset + len < offset) || (offset + len > spaceleft))
115 if (bufsize < hdrsize)
150 size_t headsize, tailsize;
151 char *oldtail, *newtail;
165 if ((headsize + tailsize) > (
unsigned)bufsize)
169 newtail = (
char *)buf + bufsize - tailsize;
175 memmove(newtail, oldtail, tailsize);
177 memmove(newtail, oldtail, tailsize);
254 unsigned int len =
strlen(s) + 1;
255 unsigned int struct_top, offset;
257 offset = strtabsize + len;
262 memcpy(strtab - offset, s, len);
339 char *p = (
char *)fdt;
341 int oldstroffset, newstroffset;
343 int offset, nextoffset;
const char * fdt_find_string_(const char *strtab, int tabsize, const char *s)
uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)
static int fdt_sw_probe_struct_(void *fdt)
int fdt_finish_reservemap(void *fdt)
int fdt_create_with_flags(void *buf, int bufsize, uint32_t flags)
#define FDT_SW_PROBE(fdt)
static int fdt_find_add_string_(void *fdt, const char *s, int *allocated)
static void * fdt_grab_space_(void *fdt, size_t len)
int fdt_create(void *buf, int bufsize)
static int fdt_sw_probe_memrsv_(void *fdt)
int fdt_property(void *fdt, const char *name, const void *val, int len)
static int fdt_sw_probe_(void *fdt)
static int fdt_add_string_(void *fdt, const char *s)
int fdt_finish(void *fdt)
int fdt_begin_node(void *fdt, const char *name)
#define FDT_SW_PROBE_STRUCT(fdt)
static uint32_t sw_flags(void *fdt)
int fdt_property_placeholder(void *fdt, const char *name, int len, void **valp)
#define FDT_SW_PROBE_MEMRSV(fdt)
int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
int fdt_resize(void *fdt, void *buf, int bufsize)
int fdt_end_node(void *fdt)
static void fdt_del_last_string_(void *fdt, const char *s)
MOSAPI void * memmove(void *dest, const void *src, size_t n)
static void fdt_set_last_comp_version(void *fdt, uint32_t val)
#define fdt_totalsize(fdt)
static void fdt_set_size_dt_strings(void *fdt, uint32_t val)
static void fdt_set_version(void *fdt, uint32_t val)
#define FDT_CREATE_FLAGS_ALL
static void fdt_set_size_dt_struct(void *fdt, uint32_t val)
#define FDT_LAST_SUPPORTED_VERSION
#define FDT_CREATE_FLAG_NO_NAME_DEDUP
static void fdt_set_totalsize(void *fdt, uint32_t val)
#define fdt_last_comp_version(fdt)
static void fdt_set_off_dt_struct(void *fdt, uint32_t val)
#define fdt_size_dt_struct(fdt)
#define fdt_off_dt_strings(fdt)
#define FDT_LAST_COMPATIBLE_VERSION
#define fdt_size_dt_strings(fdt)
static void fdt_set_off_mem_rsvmap(void *fdt, uint32_t val)
static void fdt_set_off_dt_strings(void *fdt, uint32_t val)
static void fdt_set_magic(void *fdt, uint32_t val)
#define fdt_off_mem_rsvmap(fdt)
#define fdt_off_dt_struct(fdt)
static fdt32_t cpu_to_fdt32(uint32_t x)
static fdt64_t cpu_to_fdt64(uint64_t x)
static uint32_t fdt32_to_cpu(fdt32_t x)
static void * fdt_offset_ptr_w_(void *fdt, int offset)
#define can_assume(_assume)
static void * memcpy(void *s1, const void *s2, size_t n)
static void * memset(void *s, int c, size_t n)
static size_t strlen(const char *s)
unsigned long long uint64_t