RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
ofw_raw.h 文件参考
#include <libfdt/libfdt.h>
+ ofw_raw.h 的引用(Include)关系图:

浏览该文件的源代码.

宏定义

#define FDT_SIZE_KB   1024
 
#define FDT_SIZE_MB   (1024 * FDT_SIZE_KB)
 
#define FDT_SIZE_MAX   (2 * FDT_SIZE_MB)
 
#define FDT_PADDING_SIZE   (1 * FDT_SIZE_KB)
 
#define fdt_setprop_cstring(fdt, nodeoffset, name, str)
 
#define fdt_prop_cells_ops(ops, fdt, nodeoffset, prop, ...)
 
#define fdt_setprop_cells(fdt, nodeoffset, prop, ...)
 
#define fdt_appendprop_cells(fdt, nodeoffset, prop, ...)
 

类型定义

typedef uint8_t fdt8_t
 

函数

int fdt_add_subnode_possible (void *fdt, int parentoffset, const char *name)
 
int fdt_add_mem_rsv_possible (void *fdt, size_t addr, size_t size)
 
int fdt_setprop_uxx (void *fdt, int nodeoffset, const char *name, uint64_t val, bool is_u64)
 
int fdt_getprop_u8 (void *fdt, int nodeoffset, const char *name, uint8_t *out_value, int *lenp)
 
int fdt_getprop_s8 (void *fdt, int nodeoffset, const char *name, int8_t *out_value, int *lenp)
 
int fdt_getprop_u16 (void *fdt, int nodeoffset, const char *name, uint16_t *out_value, int *lenp)
 
int fdt_getprop_s16 (void *fdt, int nodeoffset, const char *name, int16_t *out_value, int *lenp)
 
int fdt_getprop_u32 (void *fdt, int nodeoffset, const char *name, uint32_t *out_value, int *lenp)
 
int fdt_getprop_s32 (void *fdt, int nodeoffset, const char *name, int32_t *out_value, int *lenp)
 
int fdt_io_addr_cells (void *fdt, int nodeoffset)
 
int fdt_io_size_cells (void *fdt, int nodeoffset)
 
int fdt_install_initrd (void *fdt, char *os_name, size_t initrd_addr, size_t initrd_size)
 

宏定义说明

◆ FDT_SIZE_KB

#define FDT_SIZE_KB   1024

在文件 ofw_raw.h16 行定义.

◆ FDT_SIZE_MB

#define FDT_SIZE_MB   (1024 * FDT_SIZE_KB)

在文件 ofw_raw.h17 行定义.

◆ FDT_SIZE_MAX

#define FDT_SIZE_MAX   (2 * FDT_SIZE_MB)

在文件 ofw_raw.h19 行定义.

◆ FDT_PADDING_SIZE

#define FDT_PADDING_SIZE   (1 * FDT_SIZE_KB)

在文件 ofw_raw.h20 行定义.

◆ fdt_setprop_cstring

#define fdt_setprop_cstring ( fdt,
nodeoffset,
name,
str )
值:
fdt_setprop((fdt), (nodeoffset), (name), (str), sizeof(str))

在文件 ofw_raw.h32 行定义.

32#define fdt_setprop_cstring(fdt, nodeoffset, name, str) \
33 fdt_setprop((fdt), (nodeoffset), (name), (str), sizeof(str))

◆ fdt_prop_cells_ops

#define fdt_prop_cells_ops ( ops,
fdt,
nodeoffset,
prop,
... )
值:
({ \
int ret = 0; \
uint32_t tmp[] = { __VA_ARGS__ }; \
for (int i = 0; i < sizeof(tmp) / sizeof(tmp[0]); ++i) \
{ \
tmp[i] = cpu_to_fdt32(tmp[i]); \
} \
ret += ops(fdt, nodeoffset, prop, tmp, sizeof(tmp)); \
ret; \
})

在文件 ofw_raw.h35 行定义.

35#define fdt_prop_cells_ops(ops, fdt, nodeoffset, prop, ...) \
36({ \
37 int ret = 0; \
38 uint32_t tmp[] = { __VA_ARGS__ }; \
39 for (int i = 0; i < sizeof(tmp) / sizeof(tmp[0]); ++i) \
40 { \
41 tmp[i] = cpu_to_fdt32(tmp[i]); \
42 } \
43 ret += ops(fdt, nodeoffset, prop, tmp, sizeof(tmp)); \
44 ret; \
45})

◆ fdt_setprop_cells

#define fdt_setprop_cells ( fdt,
nodeoffset,
prop,
... )
值:
fdt_prop_cells_ops(fdt_setprop, fdt, nodeoffset, prop, __VA_ARGS__)
#define fdt_prop_cells_ops(ops, fdt, nodeoffset, prop,...)

在文件 ofw_raw.h47 行定义.

47#define fdt_setprop_cells(fdt, nodeoffset, prop, ...) \
48 fdt_prop_cells_ops(fdt_setprop, fdt, nodeoffset, prop, __VA_ARGS__)

◆ fdt_appendprop_cells

#define fdt_appendprop_cells ( fdt,
nodeoffset,
prop,
... )
值:
fdt_prop_cells_ops(fdt_appendprop, fdt, nodeoffset, prop, __VA_ARGS__)

在文件 ofw_raw.h50 行定义.

50#define fdt_appendprop_cells(fdt, nodeoffset, prop, ...) \
51 fdt_prop_cells_ops(fdt_appendprop, fdt, nodeoffset, prop, __VA_ARGS__)

类型定义说明

◆ fdt8_t

typedef uint8_t fdt8_t

在文件 ofw_raw.h22 行定义.

函数说明

◆ fdt_add_subnode_possible()

int fdt_add_subnode_possible ( void * fdt,
int parentoffset,
const char * name )

◆ fdt_add_mem_rsv_possible()

int fdt_add_mem_rsv_possible ( void * fdt,
size_t addr,
size_t size )

◆ fdt_setprop_uxx()

int fdt_setprop_uxx ( void * fdt,
int nodeoffset,
const char * name,
uint64_t val,
bool is_u64 )

◆ fdt_getprop_u8()

int fdt_getprop_u8 ( void * fdt,
int nodeoffset,
const char * name,
uint8_t * out_value,
int * lenp )

◆ fdt_getprop_s8()

int fdt_getprop_s8 ( void * fdt,
int nodeoffset,
const char * name,
int8_t * out_value,
int * lenp )

◆ fdt_getprop_u16()

int fdt_getprop_u16 ( void * fdt,
int nodeoffset,
const char * name,
uint16_t * out_value,
int * lenp )

◆ fdt_getprop_s16()

int fdt_getprop_s16 ( void * fdt,
int nodeoffset,
const char * name,
int16_t * out_value,
int * lenp )

◆ fdt_getprop_u32()

int fdt_getprop_u32 ( void * fdt,
int nodeoffset,
const char * name,
uint32_t * out_value,
int * lenp )

◆ fdt_getprop_s32()

int fdt_getprop_s32 ( void * fdt,
int nodeoffset,
const char * name,
int32_t * out_value,
int * lenp )

◆ fdt_io_addr_cells()

int fdt_io_addr_cells ( void * fdt,
int nodeoffset )

◆ fdt_io_size_cells()

int fdt_io_size_cells ( void * fdt,
int nodeoffset )

◆ fdt_install_initrd()

int fdt_install_initrd ( void * fdt,
char * os_name,
size_t initrd_addr,
size_t initrd_size )