LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Functions
fdt.c File Reference
#include "libfdt_env.h"
#include "fdt.h"
#include "libfdt.h"
#include "libfdt_internal.h"
Include dependency graph for fdt.c:

Go to the source code of this file.

Functions

int fdt_check_header (const void *fdt)
 
const void * fdt_offset_ptr (const void *fdt, int offset, unsigned int len)
 
uint32_t fdt_next_tag (const void *fdt, int startoffset, int *nextoffset)
 
int _fdt_check_node_offset (const void *fdt, int offset)
 
int _fdt_check_prop_offset (const void *fdt, int offset)
 
int fdt_next_node (const void *fdt, int offset, int *depth)
 
const char * _fdt_find_string (const char *strtab, int tabsize, const char *s)
 
int fdt_move (const void *fdt, void *buf, int bufsize)
 

Function Documentation

◆ _fdt_check_node_offset()

int _fdt_check_node_offset ( const void *  fdt,
int  offset 
)

Definition at line 143 of file fdt.c.

◆ _fdt_check_prop_offset()

int _fdt_check_prop_offset ( const void *  fdt,
int  offset 
)

Definition at line 152 of file fdt.c.

◆ _fdt_find_string()

const char * _fdt_find_string ( const char *  strtab,
int  tabsize,
const char *  s 
)

Definition at line 201 of file fdt.c.

◆ fdt_check_header()

int fdt_check_header ( const void *  fdt)

fdt_check_header - sanity check a device tree or possible device tree @fdt: pointer to data which might be a flattened device tree

fdt_check_header() checks that the given buffer contains what appears to be a flattened device tree with sane information in its header.

returns: 0, if the buffer appears to contain a valid device tree -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, standard meanings, as above

Definition at line 58 of file fdt.c.

◆ fdt_move()

int fdt_move ( const void *  fdt,
void *  buf,
int  bufsize 
)

fdt_move - move a device tree around in memory @fdt: pointer to the device tree to move @buf: pointer to memory where the device is to be moved @bufsize: size of the memory space at buf

fdt_move() relocates, if possible, the device tree blob located at fdt to the buffer at buf of size bufsize. The buffer may overlap with the existing device tree blob at fdt. Therefore, fdt_move(fdt, fdt, fdt_totalsize(fdt)) should always succeed.

returns: 0, on success -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, standard meanings

Definition at line 213 of file fdt.c.

◆ fdt_next_node()

int fdt_next_node ( const void *  fdt,
int  offset,
int *  depth 
)

Definition at line 161 of file fdt.c.

◆ fdt_next_tag()

uint32_t fdt_next_tag ( const void *  fdt,
int  startoffset,
int *  nextoffset 
)

Definition at line 93 of file fdt.c.

◆ fdt_offset_ptr()

const void * fdt_offset_ptr ( const void *  fdt,
int  offset,
unsigned int  len 
)

Definition at line 77 of file fdt.c.