Searched refs:fdt (Results 1 - 25 of 42) sorted by relevance

12

/haiku/headers/libs/libfdt/
H A Dlibfdt.h10 #include <fdt.h>
120 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int checklen);
122 static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen) argument
124 return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen);
127 uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
193 int fdt_next_node(const void *fdt, int offset, int *depth);
197 * @fdt: FDT blob
202 int fdt_first_subnode(const void *fdt, int offset);
206 * @fdt: FDT blob
215 int fdt_next_subnode(const void *fdt, in
398 fdt_get_max_phandle(const void *fdt) argument
715 fdt_get_property_w(void *fdt, int nodeoffset, const char *name, int *lenp) argument
775 fdt_getprop_namelen_w(void *fdt, int nodeoffset, const char *name, int namelen, int *lenp) argument
814 fdt_getprop_w(void *fdt, int nodeoffset, const char *name, int *lenp) argument
1317 fdt_setprop_inplace_u32(void *fdt, int nodeoffset, const char *name, uint32_t val) argument
1352 fdt_setprop_inplace_u64(void *fdt, int nodeoffset, const char *name, uint64_t val) argument
1369 fdt_setprop_inplace_cell(void *fdt, int nodeoffset, const char *name, uint32_t val) argument
1473 fdt_property_u32(void *fdt, const char *name, uint32_t val) argument
1478 fdt_property_u64(void *fdt, const char *name, uint64_t val) argument
1485 fdt_property_cell(void *fdt, const char *name, uint32_t val) argument
1684 fdt_setprop_u32(void *fdt, int nodeoffset, const char *name, uint32_t val) argument
1719 fdt_setprop_u64(void *fdt, int nodeoffset, const char *name, uint64_t val) argument
1737 fdt_setprop_cell(void *fdt, int nodeoffset, const char *name, uint32_t val) argument
1862 fdt_appendprop_u32(void *fdt, int nodeoffset, const char *name, uint32_t val) argument
1897 fdt_appendprop_u64(void *fdt, int nodeoffset, const char *name, uint64_t val) argument
1915 fdt_appendprop_cell(void *fdt, int nodeoffset, const char *name, uint32_t val) argument
[all...]
H A Dlibfdt_internal.h8 #include <fdt.h>
13 int32_t fdt_ro_probe_(const void *fdt);
14 #define FDT_RO_PROBE(fdt) \
17 if ((totalsize_ = fdt_ro_probe_(fdt)) < 0) \
21 int fdt_check_node_offset_(const void *fdt, int offset);
22 int fdt_check_prop_offset_(const void *fdt, int offset);
24 int fdt_node_end_offset_(void *fdt, int nodeoffset);
26 static inline const void *fdt_offset_ptr_(const void *fdt, int offset) argument
28 return (const char *)fdt + fdt_off_dt_struct(fdt)
31 fdt_offset_ptr_w_(void *fdt, int offset) argument
36 fdt_mem_rsv_(const void *fdt, int n) argument
44 fdt_mem_rsv_w_(void *fdt, int n) argument
[all...]
/haiku/src/libs/libfdt/
H A Dfdt_sw.c8 #include <fdt.h>
13 static int fdt_sw_probe_(void *fdt) argument
16 if (fdt_magic(fdt) == FDT_MAGIC)
18 else if (fdt_magic(fdt) != FDT_SW_MAGIC)
25 #define FDT_SW_PROBE(fdt) \
28 if ((err = fdt_sw_probe_(fdt)) != 0) \
38 static int fdt_sw_probe_memrsv_(void *fdt) argument
40 int err = fdt_sw_probe_(fdt);
44 if (!can_assume(VALID_INPUT) && fdt_off_dt_strings(fdt) != 0)
49 #define FDT_SW_PROBE_MEMRSV(fdt) \
64 fdt_sw_probe_struct_(void *fdt) argument
83 sw_flags(void *fdt) argument
94 fdt_grab_space_(void *fdt, size_t len) argument
113 void *fdt = buf; local
148 fdt_resize(void *fdt, void *buf, int bufsize) argument
188 fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size) argument
208 fdt_finish_reservemap(void *fdt) argument
219 fdt_begin_node(void *fdt, const char *name) argument
236 fdt_end_node(void *fdt) argument
250 fdt_add_string_(void *fdt, const char *s) argument
268 fdt_del_last_string_(void *fdt, const char *s) argument
276 fdt_find_add_string_(void *fdt, const char *s, int *allocated) argument
293 fdt_property_placeholder(void *fdt, const char *name, int len, void **valp) argument
325 fdt_property(void *fdt, const char *name, const void *val, int len) argument
337 fdt_finish(void *fdt) argument
[all...]
H A Dfdt_rw.c8 #include <fdt.h>
13 static int fdt_blocks_misordered_(const void *fdt, argument
16 return (fdt_off_mem_rsvmap(fdt) < FDT_ALIGN(sizeof(struct fdt_header), 8))
17 || (fdt_off_dt_struct(fdt) <
18 (fdt_off_mem_rsvmap(fdt) + mem_rsv_size))
19 || (fdt_off_dt_strings(fdt) <
20 (fdt_off_dt_struct(fdt) + struct_size))
21 || (fdt_totalsize(fdt) <
22 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt)));
25 fdt_rw_probe_(void *fdt) argument
49 fdt_data_size_(void *fdt) argument
54 fdt_splice_(void *fdt, void *splicepoint, int oldlen, int newlen) argument
70 fdt_splice_mem_rsv_(void *fdt, struct fdt_reserve_entry *p, int oldn, int newn) argument
83 fdt_splice_struct_(void *fdt, void *p, int oldlen, int newlen) argument
98 fdt_del_last_string_(void *fdt, const char *s) argument
105 fdt_splice_string_(void *fdt, int newlen) argument
127 fdt_find_add_string_(void *fdt, const char *s, int *allocated) argument
155 fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size) argument
172 fdt_del_mem_rsv(void *fdt, int n) argument
184 fdt_resize_property_(void *fdt, int nodeoffset, const char *name, int len, struct fdt_property **prop) argument
202 fdt_add_property_(void *fdt, int nodeoffset, const char *name, int len, struct fdt_property **prop) argument
235 fdt_set_name(void *fdt, int nodeoffset, const char *name) argument
258 fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name, int len, void **prop_data) argument
276 fdt_setprop(void *fdt, int nodeoffset, const char *name, const void *val, int len) argument
291 fdt_appendprop(void *fdt, int nodeoffset, const char *name, const void *val, int len) argument
318 fdt_delprop(void *fdt, int nodeoffset, const char *name) argument
333 fdt_add_subnode_namelen(void *fdt, int parentoffset, const char *name, int namelen) argument
377 fdt_add_subnode(void *fdt, int parentoffset, const char *name) argument
382 fdt_del_node(void *fdt, int nodeoffset) argument
419 fdt_open_into(const void *fdt, void *buf, int bufsize) argument
487 fdt_pack(void *fdt) argument
[all...]
H A Dfdt.c8 #include <fdt.h>
18 int32_t fdt_ro_probe_(const void *fdt) argument
20 uint32_t totalsize = fdt_totalsize(fdt);
26 if ((uintptr_t)fdt & 7)
29 if (fdt_magic(fdt) == FDT_MAGIC) {
32 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
34 if (fdt_last_comp_version(fdt) >
38 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) {
40 if (!can_assume(VALID_INPUT) && fdt_size_dt_struct(fdt) == 0)
83 size_t fdt_header_size(const void *fdt) argument
89 fdt_check_header(const void *fdt) argument
143 fdt_offset_ptr(const void *fdt, int offset, unsigned int len) argument
165 fdt_next_tag(const void *fdt, int startoffset, int *nextoffset) argument
219 fdt_check_node_offset_(const void *fdt, int offset) argument
231 fdt_check_prop_offset_(const void *fdt, int offset) argument
243 fdt_next_node(const void *fdt, int offset, int *depth) argument
283 fdt_first_subnode(const void *fdt, int offset) argument
294 fdt_next_subnode(const void *fdt, int offset) argument
323 fdt_move(const void *fdt, void *buf, int bufsize) argument
[all...]
H A Dfdt_wip.c8 #include <fdt.h>
13 int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset, argument
21 propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen,
33 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, argument
39 propval = fdt_getprop(fdt, nodeoffset, name, &proplen);
46 return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name,
59 int fdt_nop_property(void *fdt, int nodeoffset, const char *name) argument
64 prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
73 int fdt_node_end_offset_(void *fdt, int offset) argument
78 offset = fdt_next_node(fdt, offse
83 fdt_nop_node(void *fdt, int nodeoffset) argument
[all...]
H A Dfdt_ro.c8 #include <fdt.h>
13 static int fdt_nodename_eq_(const void *fdt, int offset, argument
17 const char *p = fdt_get_name(fdt, offset, &olen);
34 const char *fdt_get_string(const void *fdt, int stroffset, int *lenp) argument
43 s = (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
49 totalsize = fdt_ro_probe_(fdt);
55 absoffset = stroffset + fdt_off_dt_strings(fdt);
60 if (fdt_magic(fdt) == FDT_MAGIC) {
63 if (can_assume(LATEST) || fdt_version(fdt) >
100 fdt_string(const void *fdt, int stroffset) argument
105 fdt_string_eq_(const void *fdt, int stroffset, const char *s, int len) argument
114 fdt_find_max_phandle(const void *fdt, uint32_t *phandle) argument
142 fdt_generate_phandle(const void *fdt, uint32_t *phandle) argument
160 fdt_mem_rsv(const void *fdt, int n) argument
175 fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size) argument
189 fdt_num_mem_rsv(const void *fdt) argument
201 nextprop_(const void *fdt, int offset) argument
225 fdt_subnode_offset_namelen(const void *fdt, int offset, const char *name, int namelen) argument
244 fdt_subnode_offset(const void *fdt, int parentoffset, const char *name) argument
250 fdt_path_offset_namelen(const void *fdt, const char *path, int namelen) argument
295 fdt_path_offset(const void *fdt, const char *path) argument
300 fdt_get_name(const void *fdt, int nodeoffset, int *len) argument
338 fdt_first_property_offset(const void *fdt, int nodeoffset) argument
348 fdt_next_property_offset(const void *fdt, int offset) argument
356 fdt_get_property_by_offset_(const void *fdt, int offset, int *lenp) argument
378 fdt_get_property_by_offset(const void *fdt, int offset, int *lenp) argument
394 fdt_get_property_namelen_(const void *fdt, int offset, const char *name, int namelen, int *lenp, int *poffset) argument
425 fdt_get_property_namelen(const void *fdt, int offset, const char *name, int namelen, int *lenp) argument
443 fdt_get_property(const void *fdt, int nodeoffset, const char *name, int *lenp) argument
451 fdt_getprop_namelen(const void *fdt, int nodeoffset, const char *name, int namelen, int *lenp) argument
469 fdt_getprop_by_offset(const void *fdt, int offset, const char **namep, int *lenp) argument
502 fdt_getprop(const void *fdt, int nodeoffset, const char *name, int *lenp) argument
508 fdt_get_phandle(const void *fdt, int nodeoffset) argument
525 fdt_get_alias_namelen(const void *fdt, const char *name, int namelen) argument
537 fdt_get_alias(const void *fdt, const char *name) argument
542 fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen) argument
594 fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset, int supernodedepth, int *nodedepth) argument
632 fdt_node_depth(const void *fdt, int nodeoffset) argument
644 fdt_parent_offset(const void *fdt, int nodeoffset) argument
654 fdt_node_offset_by_prop_value(const void *fdt, int startoffset, const char *propname, const void *propval, int proplen) argument
681 fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle) argument
723 fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property) argument
748 fdt_stringlist_search(const void *fdt, int nodeoffset, const char *property, const char *string) argument
778 fdt_stringlist_get(const void *fdt, int nodeoffset, const char *property, int idx, int *lenp) argument
823 fdt_node_check_compatible(const void *fdt, int nodeoffset, const char *compatible) argument
836 fdt_node_offset_by_compatible(const void *fdt, int startoffset, const char *compatible) argument
[all...]
H A Dfdt_check.c8 #include <fdt.h>
13 int fdt_check_full(const void *fdt, size_t bufsize) argument
26 if (bufsize < fdt_header_size(fdt))
28 err = fdt_check_header(fdt);
31 if (bufsize < fdt_totalsize(fdt))
34 num_memrsv = fdt_num_mem_rsv(fdt);
40 tag = fdt_next_tag(fdt, offset, &nextoffset);
68 name = fdt_get_name(fdt, offset, &len);
83 prop = fdt_getprop_by_offset(fdt, offset, &propname,
H A Dfdt_addresses.c9 #include <fdt.h>
14 static int fdt_cells(const void *fdt, int nodeoffset, const char *name) argument
20 c = fdt_getprop(fdt, nodeoffset, name, &len);
34 int fdt_address_cells(const void *fdt, int nodeoffset) argument
38 val = fdt_cells(fdt, nodeoffset, "#address-cells");
46 int fdt_size_cells(const void *fdt, int nodeoffset) argument
50 val = fdt_cells(fdt, nodeoffset, "#size-cells");
57 int fdt_appendprop_addrrange(void *fdt, int parent, int nodeoffset, argument
63 ret = fdt_address_cells(fdt, parent);
68 ret = fdt_size_cells(fdt, paren
[all...]
H A Dfdt_overlay.c9 #include <fdt.h>
45 * @fdt: Base device tree blob
58 static int overlay_get_target(const void *fdt, const void *fdto, argument
75 ret = fdt_path_offset(fdt, path);
79 ret = fdt_node_offset_by_phandle(fdt, phandle);
104 * @fdt: Base device tree blob
116 static int overlay_phandle_add_offset(void *fdt, int node, argument
123 val = fdt_getprop(fdt, node, name, &len);
138 return fdt_setprop_inplace_u32(fdt, node, name, adj_val);
347 * @fdt
368 overlay_fixup_one_phandle(void *fdt, void *fdto, int symbols_off, const char *path, uint32_t path_len, const char *name, uint32_t name_len, int poffset, const char *label) argument
428 overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off, int property) argument
510 overlay_fixup_phandles(void *fdt, void *fdto) argument
557 overlay_apply_node(void *fdt, int target, void *fdto, int node) argument
619 overlay_merge(void *fdt, void *fdto) argument
651 get_path_len(const void *fdt, int nodeoffset) argument
695 overlay_symbol_update(void *fdt, void *fdto) argument
830 fdt_overlay_apply(void *fdt, void *fdto) argument
[all...]
H A DMakefile.libfdt8 LIBFDT_INCLUDES = fdt.h libfdt.h libfdt_env.h
10 LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c \
H A Dfdt_empty_tree.c8 #include <fdt.h>
/haiku/src/system/boot/platform/riscv/
H A Dfdt.h14 void fdt_init(void* fdt);
H A Dfdt.cpp7 #include "fdt.h"
55 GetReg(const void* fdt, int node, uint32 addressCells, uint32 sizeCells, size_t idx, argument
59 const uint8* prop = (const uint8*)fdt_getprop(fdt, node, "reg", &propSize);
84 GetInterrupt(const void* fdt, int node) argument
86 if (uint32* prop = (uint32*)fdt_getprop(fdt, node, "interrupts-extended", NULL)) {
89 if (uint32* prop = (uint32*)fdt_getprop(fdt, node, "interrupts", NULL)) {
98 HandleFdt(const void* fdt, int node, uint32 addressCells, uint32 sizeCells, argument
103 const char* name = fdt_get_name(fdt, node, NULL);
105 if (uint32* prop = (uint32*)fdt_getprop(fdt, node, "timebase-frequency", NULL))
109 const char* device_type = (const char*)fdt_getprop(fdt, nod
185 fdt_init(void* fdt) argument
[all...]
/haiku/headers/private/kernel/boot/platform/efi/
H A Darch_dtb.h12 void arch_handle_fdt(const void* fdt, int node);
/haiku/src/system/boot/platform/efi/
H A Ddtb.h18 bool dtb_get_reg(const void* fdt, int node, size_t idx, addr_range& range);
19 uint32 dtb_get_interrupt(const void* fdt, int node);
H A Ddtb.cpp55 #define INFO(x...) dprintf("efi/fdt: " x)
56 #define ERROR(x...) dprintf("efi/fdt: " x)
109 dump_fdt(const void *fdt) argument
111 if (!fdt)
114 int err = fdt_check_header(fdt);
116 dprintf("fdt error: %s\n", fdt_strerror(err));
120 dprintf("fdt tree:\n");
124 while ((node = fdt_next_node(fdt, node, &depth)) >= 0 && depth >= 0) {
128 dprintf("node('%s')\n", fdt_get_name(fdt, node, NULL));
130 for (int prop = fdt_first_property_offset(fdt, nod
341 dtb_get_address_cells(const void* fdt, int node) argument
359 dtb_get_size_cells(const void* fdt, int node) argument
377 dtb_get_reg(const void* fdt, int node, size_t idx, addr_range& range) argument
453 dtb_get_interrupt_parent(const void* fdt, int node) argument
471 dtb_get_interrupt_cells(const void* fdt, int node) argument
486 dtb_get_interrupt(const void* fdt, int node) argument
515 dtb_get_clock_frequency(const void* fdt, int node) argument
542 dtb_handle_fdt(const void* fdt, int node) argument
577 dtb_handle_chosen_node(const void *fdt) argument
[all...]
/haiku/src/system/boot/platform/efi/arch/riscv64/
H A Darch_dtb.cpp30 arch_handle_fdt(const void* fdt, int node) argument
32 const char* deviceType = (const char*)fdt_getprop(fdt, node,
35 const char* name = fdt_get_name(fdt, node, NULL);
37 if (uint32* prop = (uint32*)fdt_getprop(fdt, node, "boot-hartid", NULL))
40 if (uint32* prop = (uint32*)fdt_getprop(fdt, node, "timebase-frequency", NULL))
47 if (!(fdt_getprop(fdt, node, "mmu-type", NULL) != NULL))
54 info->id = fdt32_to_cpu(*(uint32*)fdt_getprop(fdt, node,
59 int subNode = fdt_subnode_offset(fdt, node, "interrupt-controller");
63 info->phandle = fdt_get_phandle(fdt, subNode);
69 const char* compatible = (const char*)fdt_getprop(fdt, nod
[all...]
/haiku/src/system/boot/platform/u-boot/
H A Dserial.h16 extern void serial_init(const void *fdt);
H A Dmmu.h21 extern void mmu_init(void* fdt);
/haiku/src/system/boot/platform/efi/arch/arm64/
H A Darch_dtb.cpp38 arch_handle_fdt(const void* fdt, int node) argument
40 const char* deviceType = (const char*)fdt_getprop(fdt, node,
49 info->id = fdt32_to_cpu(*(uint32*)fdt_getprop(fdt, node,
58 const char* compatible = (const char*)fdt_getprop(fdt, node,
73 dtb_get_reg(fdt, node, 0, interrupt_controller.regs1);
74 dtb_get_reg(fdt, node, 1, interrupt_controller.regs2);
/haiku/src/system/boot/platform/efi/arch/arm/
H A Darch_dtb.cpp46 arch_handle_fdt(const void* fdt, int node) argument
48 const char* deviceType = (const char*)fdt_getprop(fdt, node,
57 info->id = fdt32_to_cpu(*(uint32*)fdt_getprop(fdt, node,
66 const char* compatible = (const char*)fdt_getprop(fdt, node,
81 dtb_get_reg(fdt, node, 0, interrupt_controller.regs1);
82 dtb_get_reg(fdt, node, 1, interrupt_controller.regs2);
96 dtb_get_reg(fdt, node, 0, timer.regs);
97 timer.interrupt = dtb_get_interrupt(fdt, node);
/haiku/headers/private/kernel/boot/platform/u-boot/
H A Dplatform_kernel_args.h27 void *fdt; member in struct:__anon34
/haiku/headers/private/kernel/boot/platform/openfirmware/
H A Dplatform_kernel_args.h29 void *fdt; member in struct:__anon1
/haiku/src/system/kernel/arch/arm/
H A Darch_platform.cpp20 gFDT = kernelArgs->arch_args.fdt;

Completed in 138 milliseconds

12