/xen/xen/include/xen/libfdt/ |
A D | libfdt.h | 165 #define fdt_magic(fdt) (fdt_get_header(fdt, magic)) argument 166 #define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize)) argument 167 #define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct)) argument 168 #define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings)) argument 169 #define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap)) argument 170 #define fdt_version(fdt) (fdt_get_header(fdt, version)) argument 171 #define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version)) argument 172 #define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys)) argument 173 #define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings)) argument 174 #define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct)) argument [all …]
|
/xen/xen/common/libfdt/ |
A D | fdt_rw.c | 65 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt))); in _fdt_blocks_misordered() 92 return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt); in _fdt_data_size() 117 fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta); in _fdt_splice_mem_rsv() 118 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta); in _fdt_splice_mem_rsv() 131 fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta); in _fdt_splice_struct() 132 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta); in _fdt_splice_struct() 139 + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt); in _fdt_splice_string() 151 char *strtab = (char *)fdt + fdt_off_dt_strings(fdt); in _fdt_find_add_string() 178 re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt)); in fdt_add_mem_rsv() 487 _fdt_packblocks(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt)); in fdt_pack() [all …]
|
A D | fdt_sw.c | 76 spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt) in _fdt_grab_space() 88 void *fdt = buf; in fdt_create() local 102 fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt)); in fdt_create() 113 FDT_SW_CHECK_HEADER(fdt); in fdt_add_reservemap_entry() 168 char *strtab = (char *)fdt + fdt_totalsize(fdt); in _fdt_find_add_string() 180 struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); in _fdt_find_add_string() 211 int fdt_finish(void *fdt) in fdt_finish() argument 213 char *p = (char *)fdt; in fdt_finish() 228 oldstroffset = fdt_totalsize(fdt) - fdt_size_dt_strings(fdt); in fdt_finish() 229 newstroffset = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt); in fdt_finish() [all …]
|
A D | fdt_ro.c | 78 return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset; in fdt_string() 91 FDT_CHECK_HEADER(fdt); in fdt_get_mem_rsv() 135 FDT_CHECK_HEADER(fdt); in fdt_subnode_offset_namelen() 161 FDT_CHECK_HEADER(fdt); in fdt_path_offset() 226 return _nextprop(fdt, offset); in fdt_first_property_offset() 234 return _nextprop(fdt, offset); in fdt_next_property_offset() 361 FDT_CHECK_HEADER(fdt); in fdt_get_path() 413 FDT_CHECK_HEADER(fdt); in fdt_supernode_atdepth_offset() 472 FDT_CHECK_HEADER(fdt); in fdt_node_offset_by_prop_value() 498 FDT_CHECK_HEADER(fdt); in fdt_node_offset_by_phandle() [all …]
|
A D | fdt.c | 56 int fdt_check_header(const void *fdt) in fdt_check_header() argument 58 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_check_header() 64 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) { in fdt_check_header() 66 if (fdt_size_dt_struct(fdt) == 0) in fdt_check_header() 84 if (fdt_version(fdt) >= 0x11) in fdt_offset_ptr() 89 return _fdt_offset_ptr(fdt, offset); in fdt_offset_ptr() 111 p = fdt_offset_ptr(fdt, offset++, 1); in fdt_next_tag() 204 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode() 242 FDT_CHECK_HEADER(fdt); in fdt_move() 244 if (fdt_totalsize(fdt) > bufsize) in fdt_move() [all …]
|
A D | libfdt_internal.h | 56 #define FDT_CHECK_HEADER(fdt) \ argument 59 if ((err = fdt_check_header(fdt)) != 0) \ 63 int _fdt_check_node_offset(const void *fdt, int offset); 64 int _fdt_check_prop_offset(const void *fdt, int offset); 66 int _fdt_node_end_offset(void *fdt, int nodeoffset); 68 static inline const void *_fdt_offset_ptr(const void *fdt, int offset) in _fdt_offset_ptr() argument 70 return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; in _fdt_offset_ptr() 73 static inline void *_fdt_offset_ptr_w(void *fdt, int offset) in _fdt_offset_ptr_w() argument 75 return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset); in _fdt_offset_ptr_w() 82 ((const char *)fdt + fdt_off_mem_rsvmap(fdt)); in _fdt_mem_rsv() [all …]
|
A D | fdt_wip.c | 56 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, in fdt_setprop_inplace() argument 62 propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen); in fdt_setprop_inplace() 81 int fdt_nop_property(void *fdt, int nodeoffset, const char *name) in fdt_nop_property() argument 86 prop = fdt_get_property_w(fdt, nodeoffset, name, &len); in fdt_nop_property() 95 int _fdt_node_end_offset(void *fdt, int offset) in _fdt_node_end_offset() argument 100 offset = fdt_next_node(fdt, offset, &depth); in _fdt_node_end_offset() 105 int fdt_nop_node(void *fdt, int nodeoffset) in fdt_nop_node() argument 109 endoffset = _fdt_node_end_offset(fdt, nodeoffset); in fdt_nop_node() 113 _fdt_nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), in fdt_nop_node()
|
A D | Makefile.libfdt | 7 LIBFDT_INCLUDES = fdt.h libfdt.h libfdt_env.h 9 LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c
|
/xen/tools/libxl/ |
A D | libxl_arm.c | 345 res = fdt_end_node(fdt); in make_chosen_node() 391 res = fdt_end_node(fdt); in make_cpus_node() 417 res = fdt_end_node(fdt); in make_psci_node() 440 res = fdt_end_node(fdt); in make_optee_node() 443 res = fdt_end_node(fdt); in make_optee_node() 515 res = fdt_end_node(fdt); in make_gicv2_node() 690 rc = libxl_write_exactly(CTX, fd, fdt, fdt_totalsize(fdt), dtb, "dtb"); in debug_dump_fdt() 771 r = fdt_end_node(fdt); in copy_node() 857 void *fdt = NULL; in libxl__prepare_dtb() local 925 fdt = libxl__realloc(gc, fdt, fdt_size); in libxl__prepare_dtb() [all …]
|
A D | libxl_libfdt_compat.h | 67 _hidden int fdt_first_subnode(const void *fdt, int offset); 71 _hidden int fdt_next_subnode(const void *fdt, int offset); 75 static inline int fdt_property_u32(void *fdt, const char *name, uint32_t val) in fdt_property_u32() argument 78 return fdt_property(fdt, name, &tmp, sizeof(tmp)); in fdt_property_u32()
|
A D | libxl_libfdt_compat.c | 65 _hidden int fdt_first_subnode(const void *fdt, int offset) in fdt_first_subnode() argument 69 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode() 78 _hidden int fdt_next_subnode(const void *fdt, int offset) in fdt_next_subnode() argument 87 offset = fdt_next_node(fdt, offset, &depth); in fdt_next_subnode()
|
/xen/xen/arch/arm/ |
A D | bootfdt.c | 25 name = fdt_get_name(fdt, node, NULL); in device_tree_node_matches() 43 prop = fdt_getprop(fdt, node, "compatible", &len); in device_tree_node_compatible() 130 node = fdt_next_node(fdt, node, &depth); in device_tree_for_each_node() 156 prop = fdt_get_property(fdt, node, "reg", NULL); in process_memory_node() 199 return device_tree_for_each_node(fdt, node, in process_reserved_memory() 219 parent_node = fdt_parent_offset(fdt, node); in process_multiboot_node() 227 prop = fdt_get_property(fdt, node, "reg", &len); in process_multiboot_node() 330 static int __init early_scan_node(const void *fdt, in early_scan_node() argument 408 ret = fdt_check_header(fdt); in boot_fdt_info() 417 return fdt_totalsize(fdt); in boot_fdt_info() [all …]
|
A D | domain_build.c | 737 void *fdt = kinfo->fdt; in make_hypervisor_node() local 1021 void *fdt = kinfo->fdt; in make_timer_node() local 1110 void *fdt = kinfo->fdt; in make_chosen_node() local 1613 void *fdt = kinfo->fdt; in make_gicv2_domU_node() local 1663 void *fdt = kinfo->fdt; in make_gicv3_domU_node() local 1727 void *fdt = kinfo->fdt; in make_vpl011_uart_node() local 1872 void *fdt = kinfo->fdt; in handle_prop_pfdt() local 1952 void *fdt = kinfo->fdt; in scan_pfdt_node() local 2167 xfree(kinfo->fdt); in prepare_dtb_domU() 2175 const void *fdt; in prepare_dtb_hwdom() local [all …]
|
A D | gic-v2.c | 762 void *fdt) in gicv2m_make_dt_node() argument 782 res = fdt_property(fdt, "ranges", prop, len); in gicv2m_make_dt_node() 794 res = fdt_begin_node(fdt, v2m->name); in gicv2m_make_dt_node() 802 res = fdt_property(fdt, "msi-controller", NULL, 0); in gicv2m_make_dt_node() 808 res = fdt_property_cell(fdt, "phandle", v2m->phandle); in gicv2m_make_dt_node() 822 res = fdt_property(fdt, "reg", prop, len); in gicv2m_make_dt_node() 847 fdt_end_node(fdt); in gicv2m_make_dt_node() 855 void *fdt) in gicv2_make_hwdom_dt_node() argument 869 res = fdt_property(fdt, "compatible", compatible, len); in gicv2_make_hwdom_dt_node() 888 res = fdt_property(fdt, "reg", regs, len); in gicv2_make_hwdom_dt_node() [all …]
|
A D | gic-v3-its.c | 923 void *fdt) in gicv3_its_make_hwdom_dt_nodes() argument 942 res = fdt_property(fdt, "ranges", prop, len); in gicv3_its_make_hwdom_dt_nodes() 950 res = fdt_begin_node(fdt, its->name); in gicv3_its_make_hwdom_dt_nodes() 954 res = fdt_property_string(fdt, "compatible", "arm,gic-v3-its"); in gicv3_its_make_hwdom_dt_nodes() 958 res = fdt_property(fdt, "msi-controller", NULL, 0); in gicv3_its_make_hwdom_dt_nodes() 964 res = fdt_property_cell(fdt, "phandle", its->phandle); in gicv3_its_make_hwdom_dt_nodes() 978 res = fdt_property(fdt, "reg", prop, len); in gicv3_its_make_hwdom_dt_nodes() 982 fdt_end_node(fdt); in gicv3_its_make_hwdom_dt_nodes()
|
A D | gic.c | 439 void *fdt) in gic_make_hwdom_dt_node() argument 443 return gic_hw_ops->make_hwdom_dt_node(d, gic, fdt); in gic_make_hwdom_dt_node()
|
/xen/xen/arch/arm/efi/ |
A D | efi-boot.h | 18 static void __initdata *fdt; variable 111 void *fdt = NULL; in lookup_fdt_config_table() local 119 fdt = tables[i].VendorTable; in lookup_fdt_config_table() 123 return fdt; in lookup_fdt_config_table() 220 fdt_del_node(fdt, node); in fdt_add_uefi_nodes() 231 num_rsv = fdt_num_mem_rsv(fdt); in fdt_add_uefi_nodes() 233 fdt_del_mem_rsv(fdt, num_rsv); in fdt_add_uefi_nodes() 375 efi_xen_start(fdt, fdt_totalsize(fdt)); in efi_arch_post_exit_boot() 394 if ( !fdt ) in efi_arch_cfg_file_early() 576 dtbfile.ptr = fdt; in efi_arch_use_config_file() [all …]
|
A D | efi-dom0.c | 140 int __init acpi_make_efi_nodes(void *fdt, struct membank tbl_add[]) in acpi_make_efi_nodes() argument 144 res = fdt_begin_node(fdt, "uefi"); in acpi_make_efi_nodes() 148 res = fdt_property_u64(fdt, "xen,uefi-system-table", in acpi_make_efi_nodes() 153 res = fdt_property_u64(fdt, "xen,uefi-mmap-start", in acpi_make_efi_nodes() 158 res = fdt_property_u32(fdt, "xen,uefi-mmap-size", in acpi_make_efi_nodes() 163 res = fdt_property_u32(fdt, "xen,uefi-mmap-desc-size", in acpi_make_efi_nodes() 168 res = fdt_property_u32(fdt, "xen,uefi-mmap-desc-ver", 1); in acpi_make_efi_nodes() 172 res = fdt_end_node(fdt); in acpi_make_efi_nodes()
|
/xen/xen/arch/arm/acpi/ |
A D | domain_build.c | 97 void *fdt = kinfo->fdt; in acpi_make_hypervisor_node() local 102 res = fdt_begin_node(fdt, "hypervisor"); in acpi_make_hypervisor_node() 111 res = acpi_make_efi_nodes(fdt, tbl_add); in acpi_make_hypervisor_node() 115 res = fdt_end_node(fdt); in acpi_make_hypervisor_node() 134 kinfo->fdt = xmalloc_bytes(new_size); in create_acpi_dtb() 136 if ( kinfo->fdt == NULL ) in create_acpi_dtb() 140 ret = fdt_create(kinfo->fdt, new_size); in create_acpi_dtb() 148 ret = fdt_begin_node(kinfo->fdt, ""); in create_acpi_dtb() 169 ret = fdt_end_node(kinfo->fdt); in create_acpi_dtb() 173 ret = fdt_finish(kinfo->fdt); in create_acpi_dtb() [all …]
|
/xen/xen/include/asm-arm/ |
A D | setup.h | 93 int acpi_make_efi_nodes(void *fdt, struct membank tbl_add[]); 102 size_t boot_fdt_info(const void *fdt, paddr_t paddr); 103 const char *boot_fdt_cmdline(const void *fdt); 122 u32 device_tree_get_u32(const void *fdt, int node,
|
A D | gic_v3_its.h | 170 void *fdt); 267 void *fdt) in gicv3_its_make_hwdom_dt_nodes() argument
|
A D | kernel.h | 19 void *fdt; /* flat device tree */ member
|
A D | gic.h | 380 const struct dt_device_node *gic, void *fdt); 437 void *fdt);
|
/xen/xen/common/ |
A D | device_tree.c | 1712 static unsigned long __init unflatten_dt_node(const void *fdt, in unflatten_dt_node() argument 1832 if ( fdt_version(fdt) < 0x10 ) in unflatten_dt_node() 1835 pname = fdt_string(fdt, noff); in unflatten_dt_node() 1957 static void __init __unflatten_device_tree(const void *fdt, in __unflatten_device_tree() argument 1966 dt_dprintk("magic: %#08x\n", fdt_magic(fdt)); in __unflatten_device_tree() 1967 dt_dprintk("size: %#08x\n", fdt_totalsize(fdt)); in __unflatten_device_tree() 1968 dt_dprintk("version: %#08x\n", fdt_version(fdt)); in __unflatten_device_tree() 1971 start = ((unsigned long)fdt) + fdt_off_dt_struct(fdt); in __unflatten_device_tree() 1972 size = unflatten_dt_node(fdt, 0, &start, NULL, NULL, 0); in __unflatten_device_tree() 1985 start = ((unsigned long)fdt) + fdt_off_dt_struct(fdt); in __unflatten_device_tree() [all …]
|
/xen/xen/include/xen/ |
A D | device_tree.h | 161 typedef int (*device_tree_node_func)(const void *fdt, 168 int device_tree_for_each_node(const void *fdt, int node,
|