MOS Source Code
Loading...
Searching...
No Matches
fdt_sw.c File Reference
#include "libfdt_env.h"
#include <fdt.h>
#include <libfdt.h>
#include "libfdt_internal.h"
+ Include dependency graph for fdt_sw.c:

Go to the source code of this file.

Macros

#define FDT_SW_PROBE(fdt)
 
#define FDT_SW_PROBE_MEMRSV(fdt)
 
#define FDT_SW_PROBE_STRUCT(fdt)
 

Functions

static int fdt_sw_probe_ (void *fdt)
 
static int fdt_sw_probe_memrsv_ (void *fdt)
 
static int fdt_sw_probe_struct_ (void *fdt)
 
static uint32_t sw_flags (void *fdt)
 
static voidfdt_grab_space_ (void *fdt, size_t len)
 
int fdt_create_with_flags (void *buf, int bufsize, uint32_t flags)
 
int fdt_create (void *buf, int bufsize)
 
int fdt_resize (void *fdt, void *buf, int bufsize)
 
int fdt_add_reservemap_entry (void *fdt, uint64_t addr, uint64_t size)
 
int fdt_finish_reservemap (void *fdt)
 
int fdt_begin_node (void *fdt, const char *name)
 
int fdt_end_node (void *fdt)
 
static int fdt_add_string_ (void *fdt, const char *s)
 
static void fdt_del_last_string_ (void *fdt, const char *s)
 
static int fdt_find_add_string_ (void *fdt, const char *s, int *allocated)
 
int fdt_property_placeholder (void *fdt, const char *name, int len, void **valp)
 
int fdt_property (void *fdt, const char *name, const void *val, int len)
 
int fdt_finish (void *fdt)
 

Macro Definition Documentation

◆ FDT_SW_PROBE

#define FDT_SW_PROBE ( fdt)
Value:
{ \
int err; \
if ((err = fdt_sw_probe_(fdt)) != 0) \
return err; \
}
static int fdt_sw_probe_(void *fdt)
Definition fdt_sw.c:13

Definition at line 25 of file fdt_sw.c.

Referenced by fdt_resize().

◆ FDT_SW_PROBE_MEMRSV

#define FDT_SW_PROBE_MEMRSV ( fdt)
Value:
{ \
int err; \
if ((err = fdt_sw_probe_memrsv_(fdt)) != 0) \
return err; \
}
static int fdt_sw_probe_memrsv_(void *fdt)
Definition fdt_sw.c:38

Definition at line 49 of file fdt_sw.c.

Referenced by fdt_add_reservemap_entry().

◆ FDT_SW_PROBE_STRUCT

#define FDT_SW_PROBE_STRUCT ( fdt)
Value:
{ \
int err; \
if ((err = fdt_sw_probe_struct_(fdt)) != 0) \
return err; \
}
static int fdt_sw_probe_struct_(void *fdt)
Definition fdt_sw.c:64

Definition at line 76 of file fdt_sw.c.

Referenced by fdt_begin_node(), fdt_end_node(), fdt_finish(), and fdt_property_placeholder().

Function Documentation

◆ fdt_sw_probe_()

static int fdt_sw_probe_ ( void * fdt)
static

Definition at line 13 of file fdt_sw.c.

Referenced by fdt_sw_probe_memrsv_(), and fdt_sw_probe_struct_().

◆ fdt_sw_probe_memrsv_()

static int fdt_sw_probe_memrsv_ ( void * fdt)
static

Definition at line 38 of file fdt_sw.c.

+ Here is the call graph for this function:

◆ fdt_sw_probe_struct_()

static int fdt_sw_probe_struct_ ( void * fdt)
static

Definition at line 64 of file fdt_sw.c.

+ Here is the call graph for this function:

◆ sw_flags()

static uint32_t sw_flags ( void * fdt)
inlinestatic

Definition at line 83 of file fdt_sw.c.

Referenced by fdt_property_placeholder().

◆ fdt_grab_space_()

static void * fdt_grab_space_ ( void * fdt,
size_t len )
static

Definition at line 94 of file fdt_sw.c.

Referenced by fdt_begin_node(), fdt_end_node(), fdt_finish(), and fdt_property_placeholder().

+ Here is the call graph for this function:

◆ fdt_create_with_flags()

int fdt_create_with_flags ( void * buf,
int bufsize,
uint32_t flags )

fdt_create_with_flags - begin creation of a new fdt @buf: pointer to memory allocated where fdt will be created @bufsize: size of the memory space at fdt @flags: a valid combination of FDT_CREATE_FLAG_ flags, or 0.

fdt_create_with_flags() begins the process of creating a new fdt with the sequential write interface.

fdt creation process must end with fdt_finished() to produce a valid fdt.

returns: 0, on success -FDT_ERR_NOSPACE, bufsize is insufficient for a minimal fdt -FDT_ERR_BADFLAGS, flags is not valid

Definition at line 109 of file fdt_sw.c.

Referenced by fdt_create().

+ Here is the call graph for this function:

◆ fdt_create()

int fdt_create ( void * buf,
int bufsize )

fdt_create - begin creation of a new fdt @buf: pointer to memory allocated where fdt will be created @bufsize: size of the memory space at fdt

fdt_create() is equivalent to fdt_create_with_flags() with flags=0.

returns: 0, on success -FDT_ERR_NOSPACE, bufsize is insufficient for a minimal fdt

Definition at line 143 of file fdt_sw.c.

Referenced by fdt_create_empty_tree().

+ Here is the call graph for this function:

◆ fdt_resize()

int fdt_resize ( void * fdt,
void * buf,
int bufsize )

Definition at line 148 of file fdt_sw.c.

+ Here is the call graph for this function:

◆ fdt_add_reservemap_entry()

int fdt_add_reservemap_entry ( void * fdt,
uint64_t addr,
uint64_t size )

Definition at line 188 of file fdt_sw.c.

Referenced by fdt_finish_reservemap().

+ Here is the call graph for this function:

◆ fdt_finish_reservemap()

int fdt_finish_reservemap ( void * fdt)

Definition at line 208 of file fdt_sw.c.

Referenced by fdt_create_empty_tree().

+ Here is the call graph for this function:

◆ fdt_begin_node()

int fdt_begin_node ( void * fdt,
const char * name )

Definition at line 219 of file fdt_sw.c.

Referenced by fdt_create_empty_tree().

+ Here is the call graph for this function:

◆ fdt_end_node()

int fdt_end_node ( void * fdt)

Definition at line 236 of file fdt_sw.c.

Referenced by fdt_create_empty_tree().

+ Here is the call graph for this function:

◆ fdt_add_string_()

static int fdt_add_string_ ( void * fdt,
const char * s )
static

Definition at line 250 of file fdt_sw.c.

Referenced by fdt_find_add_string_(), and fdt_property_placeholder().

+ Here is the call graph for this function:

◆ fdt_del_last_string_()

static void fdt_del_last_string_ ( void * fdt,
const char * s )
static

Definition at line 268 of file fdt_sw.c.

Referenced by fdt_property_placeholder().

+ Here is the call graph for this function:

◆ fdt_find_add_string_()

static int fdt_find_add_string_ ( void * fdt,
const char * s,
int * allocated )
static

Definition at line 276 of file fdt_sw.c.

Referenced by fdt_property_placeholder().

+ Here is the call graph for this function:

◆ fdt_property_placeholder()

int fdt_property_placeholder ( void * fdt,
const char * name,
int len,
void ** valp )

Definition at line 293 of file fdt_sw.c.

Referenced by fdt_property().

+ Here is the call graph for this function:

◆ fdt_property()

int fdt_property ( void * fdt,
const char * name,
const void * val,
int len )

Definition at line 325 of file fdt_sw.c.

Referenced by fdt_property_u32(), and fdt_property_u64().

+ Here is the call graph for this function:

◆ fdt_finish()

int fdt_finish ( void * fdt)

Definition at line 337 of file fdt_sw.c.

Referenced by fdt_create_empty_tree().

+ Here is the call graph for this function: