XenevaOS
Loading...
Searching...
No Matches
dtb.h
Go to the documentation of this file.
1
30#ifndef __DTB_H__
31#define __DTB_H__
32
33#include "littleboot.h"
34
38
39typedef struct _fdt_prop_{
43 uint8_t value[];
45
46uint32_t * dtb_find_node_prefix(const char * name);
47uint32_t* find_node_int(const char* name, int (*comp)(const char*, const char*));
48uint32_t * node_find_property_int(uint32_t * node, char * strings, const char * property, uint32_t ** out);
49uint32_t * dtb_node_find_property(uint32_t * node, const char * property);
50uint32_t* find_subnode(uint32_t* node, char* strings, const char* name, uint32_t** node_out,
51int (*cmp)(const char* a, const char* b));
52
53/*
54 * LBDTBGetMemorySize -- gets memory size from
55 * device tree blob
56 * @param memaddr -- address where to put the physical
57 * start address
58 * @param physSize -- total size of the physical memory
59 */
60void LBDTBGetMemorySize(uint64_t *memaddr, size_t *physSize);
61
62/*
63 * LBDeviceTreeInitialize -- initialize device tree
64 * parser
65 * @param dtb -- Pointer to Device tree blob
66 */
67extern void LBDeviceTreeInitialize(uint64_t dtb);
68
69/*
70 * LBDTBGetTotalSize -- returns the
71 * total size of FDT
72 */
74
75#endif
struct _fdt_prop_ fdt_property_t
uint64_t swizzle64(uint64_t from)
Definition dtb.c:60
uint32_t * node_find_property_int(uint32_t *node, char *strings, const char *property, uint32_t **out)
Definition dtb.c:162
uint16_t swizzle16(uint16_t from)
Definition dtb.c:74
uint32_t * dtb_find_node_prefix(const char *name)
Definition dtb.c:147
uint32_t LBDTBGetTotalSize()
Definition dtb.c:251
uint32_t swizzle(uint32_t from)
Definition dtb.c:52
void LBDTBGetMemorySize(uint64_t *memaddr, size_t *physSize)
Definition dtb.c:202
uint32_t * find_subnode(uint32_t *node, char *strings, const char *name, uint32_t **node_out, int(*cmp)(const char *a, const char *b))
Definition dtb.c:84
void LBDeviceTreeInitialize(uint64_t dtb)
Definition dtb.c:234
uint32_t * find_node_int(const char *name, int(*comp)(const char *, const char *))
Definition dtb.c:151
uint32_t * dtb_node_find_property(uint32_t *node, const char *property)
Definition dtb.c:186
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
Definition dtb.h:51
uint32_t len
Definition dtb.h:53
uint32_t tag
Definition dtb.h:52
uint8_t value[]
Definition dtb.h:55
uint32_t nameoff
Definition dtb.h:54