/freebsd/sys/contrib/libfdt/ |
H A D | libfdt.h | 147 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int checklen); 149 static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen) in fdt_offset_ptr_w() argument 151 return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen); in fdt_offset_ptr_w() 154 uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset); 160 int fdt_next_node(const void *fdt, int offset, int *depth); 169 int fdt_first_subnode(const void *fdt, int offset); 182 int fdt_next_subnode(const void *fdt, int offset); 207 #define fdt_for_each_subnode(node, fdt, parent) \ argument 208 for (node = fdt_first_subnode(fdt, parent); \ 210 node = fdt_next_subnode(fdt, node)) [all …]
|
H A D | fdt_rw.c | 58 static int fdt_blocks_misordered_(const void *fdt, in fdt_blocks_misordered_() argument 61 return (fdt_off_mem_rsvmap(fdt) < FDT_ALIGN(sizeof(struct fdt_header), 8)) in fdt_blocks_misordered_() 62 || (fdt_off_dt_struct(fdt) < in fdt_blocks_misordered_() 63 (fdt_off_mem_rsvmap(fdt) + mem_rsv_size)) in fdt_blocks_misordered_() 64 || (fdt_off_dt_strings(fdt) < in fdt_blocks_misordered_() 65 (fdt_off_dt_struct(fdt) + struct_size)) in fdt_blocks_misordered_() 66 || (fdt_totalsize(fdt) < in fdt_blocks_misordered_() 67 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt))); in fdt_blocks_misordered_() 70 static int fdt_rw_check_header_(void *fdt) in fdt_rw_check_header_() argument 72 FDT_CHECK_HEADER(fdt); in fdt_rw_check_header_() [all …]
|
H A D | fdt_sw.c | 58 static int fdt_sw_check_header_(void *fdt) in fdt_sw_check_header_() argument 60 if (fdt_magic(fdt) != FDT_SW_MAGIC) in fdt_sw_check_header_() 66 #define FDT_SW_CHECK_HEADER(fdt) \ argument 69 if ((err = fdt_sw_check_header_(fdt)) != 0) \ 73 static void *fdt_grab_space_(void *fdt, size_t len) in fdt_grab_space_() argument 75 int offset = fdt_size_dt_struct(fdt); in fdt_grab_space_() 78 spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt) in fdt_grab_space_() 79 - fdt_size_dt_strings(fdt); in fdt_grab_space_() 84 fdt_set_size_dt_struct(fdt, offset + len); in fdt_grab_space_() 85 return fdt_offset_ptr_w_(fdt, offset); in fdt_grab_space_() [all …]
|
H A D | fdt_ro.c | 58 static int fdt_nodename_eq_(const void *fdt, int offset, in fdt_nodename_eq_() argument 62 const char *p = fdt_get_name(fdt, offset, &olen); in fdt_nodename_eq_() 79 const char *fdt_string(const void *fdt, int stroffset) in fdt_string() argument 81 return (const char *)fdt + fdt_off_dt_strings(fdt) + stroffset; in fdt_string() 84 static int fdt_string_eq_(const void *fdt, int stroffset, in fdt_string_eq_() argument 87 const char *p = fdt_string(fdt, stroffset); in fdt_string_eq_() 92 uint32_t fdt_get_max_phandle(const void *fdt) in fdt_get_max_phandle() argument 97 for (offset = fdt_next_node(fdt, -1, NULL);; in fdt_get_max_phandle() 98 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_get_max_phandle() 107 phandle = fdt_get_phandle(fdt, offset); in fdt_get_max_phandle() [all …]
|
H A D | fdt.c | 58 int fdt_check_header(const void *fdt) in fdt_check_header() argument 60 if (fdt_magic(fdt) == FDT_MAGIC) { in fdt_check_header() 62 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION) in fdt_check_header() 64 if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION) in fdt_check_header() 66 } else if (fdt_magic(fdt) == FDT_SW_MAGIC) { in fdt_check_header() 68 if (fdt_size_dt_struct(fdt) == 0) in fdt_check_header() 77 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len) in fdt_offset_ptr() argument 79 unsigned absoffset = offset + fdt_off_dt_struct(fdt); in fdt_offset_ptr() 83 || (absoffset + len) > fdt_totalsize(fdt)) in fdt_offset_ptr() 86 if (fdt_version(fdt) >= 0x11) in fdt_offset_ptr() [all …]
|
H A D | libfdt_internal.h | 58 #define FDT_CHECK_HEADER(fdt) \ argument 61 if ((err_ = fdt_check_header(fdt)) != 0) \ 65 int fdt_check_node_offset_(const void *fdt, int offset); 66 int fdt_check_prop_offset_(const void *fdt, int offset); 68 int fdt_node_end_offset_(void *fdt, int nodeoffset); 70 static inline const void *fdt_offset_ptr_(const void *fdt, int offset) in fdt_offset_ptr_() argument 72 return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; in fdt_offset_ptr_() 75 static inline void *fdt_offset_ptr_w_(void *fdt, int offset) in fdt_offset_ptr_w_() argument 77 return (void *)(uintptr_t)fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr_w_() 80 static inline const struct fdt_reserve_entry *fdt_mem_rsv_(const void *fdt, int n) in fdt_mem_rsv_() argument [all …]
|
H A D | fdt_overlay.c | 103 static int overlay_get_target(const void *fdt, const void *fdto, in overlay_get_target() argument 120 ret = fdt_path_offset(fdt, path); in overlay_get_target() 124 ret = fdt_node_offset_by_phandle(fdt, phandle); in overlay_get_target() 161 static int overlay_phandle_add_offset(void *fdt, int node, in overlay_phandle_add_offset() argument 168 val = fdt_getprop(fdt, node, name, &len); in overlay_phandle_add_offset() 183 return fdt_setprop_inplace_u32(fdt, node, name, adj_val); in overlay_phandle_add_offset() 412 static int overlay_fixup_one_phandle(void *fdt, void *fdto, in overlay_fixup_one_phandle() argument 427 symbol_path = fdt_getprop(fdt, symbols_off, label, in overlay_fixup_one_phandle() 432 symbol_off = fdt_path_offset(fdt, symbol_path); in overlay_fixup_one_phandle() 436 phandle = fdt_get_phandle(fdt, symbol_off); in overlay_fixup_one_phandle() [all …]
|
H A D | fdt_wip.c | 58 int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset, in fdt_setprop_inplace_namelen_partial() argument 66 propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen, in fdt_setprop_inplace_namelen_partial() 78 int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, in fdt_setprop_inplace() argument 84 propval = fdt_getprop(fdt, nodeoffset, name, &proplen); in fdt_setprop_inplace() 91 return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name, in fdt_setprop_inplace() 104 int fdt_nop_property(void *fdt, int nodeoffset, const char *name) in fdt_nop_property() argument 109 prop = fdt_get_property_w(fdt, nodeoffset, name, &len); in fdt_nop_property() 118 int fdt_node_end_offset_(void *fdt, int offset) in fdt_node_end_offset_() argument 123 offset = fdt_next_node(fdt, offset, &depth); in fdt_node_end_offset_() 128 int fdt_nop_node(void *fdt, int nodeoffset) in fdt_nop_node() argument [all …]
|
H A D | fdt_addresses.c | 58 int fdt_address_cells(const void *fdt, int nodeoffset) in fdt_address_cells() argument 64 ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len); in fdt_address_cells() 78 int fdt_size_cells(const void *fdt, int nodeoffset) in fdt_size_cells() argument 84 sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len); in fdt_size_cells()
|
/freebsd/usr.sbin/bhyve/riscv/ |
H A D | fdt.c | 66 assign_phandle(void *fdt) in assign_phandle() argument 73 fdt_property_u32(fdt, "phandle", phandle); in assign_phandle() 79 set_single_reg(void *fdt, uint64_t start, uint64_t len) in set_single_reg() argument 83 fdt_property_placeholder(fdt, "reg", 2 * sizeof(uint64_t), ®); in set_single_reg() 89 add_cpu(void *fdt, int cpuid, const char *isa, uint32_t *intc_phandle) in add_cpu() argument 95 fdt_begin_node(fdt, node_name); in add_cpu() 96 fdt_property_string(fdt, "device_type", "cpu"); in add_cpu() 97 fdt_property_string(fdt, "compatible", "riscv"); in add_cpu() 98 fdt_property_u32(fdt, "reg", cpuid); in add_cpu() 99 fdt_property_string(fdt, "riscv,isa", isa); in add_cpu() [all …]
|
/freebsd/sys/conf/ |
H A D | files.arm64 | 18 arm/arm/gic_fdt.c optional fdt 22 arm/arm/pmu_fdt.c optional fdt 52 arm64/arm64/gicv3_its.c optional intrng fdt 55 arm64/arm64/gic_v3_fdt.c optional fdt 68 arm64/arm64/ofw_machdep.c optional fdt 69 arm64/arm64/pl031_rtc.c optional fdt pl031 93 arm64/coresight/coresight_fdt.c optional fdt 96 arm64/coresight/coresight_cpu_debug.c optional fdt 99 arm64/coresight/coresight_etm4x_fdt.c optional fdt 102 arm64/coresight/coresight_funnel_fdt.c optional fdt [all …]
|
H A D | files.riscv | 7 dev/cpufreq/cpufreq_dt.c optional cpufreq fdt 8 dev/ofw/ofw_cpu.c optional fdt 9 dev/ofw/ofw_pcib.c optional pci fdt 10 dev/pci/pci_dw.c optional pci fdt 11 dev/pci/pci_dw_if.m optional pci fdt 13 dev/pci/pci_host_generic_fdt.c optional pci fdt 14 dev/uart/uart_cpu_fdt.c optional uart fdt 17 dev/usb/controller/generic_ehci_fdt.c optional ehci fdt 18 dev/usb/controller/generic_ohci.c optional ohci fdt 19 dev/usb/controller/generic_usb_if.m optional ohci fdt [all …]
|
H A D | files.arm | 7 arm/arm/bus_space_base.c optional fdt 32 arm/arm/gic_fdt.c optional gic fdt 50 arm/arm/ofw_machdep.c optional fdt 58 arm/arm/pmu_fdt.c optional fdt pmu | fdt hwpmc 88 dev/cpufreq/cpufreq_dt.c optional cpufreq fdt 90 dev/fdt/fdt_arm_platform.c optional platform fdt 95 dev/ofw/ofw_pcib.c optional fdt pci 97 dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt 101 dev/uart/uart_cpu_fdt.c optional uart fdt 103 dev/usb/controller/dwc3/dwc3.c optional fdt dwc3 [all …]
|
/freebsd/sys/riscv/allwinner/ |
H A D | files.allwinner | 2 arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt 5 arm/allwinner/aw_timer.c optional aw_timer fdt 6 arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt 11 dev/clk/allwinner/aw_ccung.c optional aw_ccu fdt 12 dev/clk/allwinner/aw_clk_frac.c optional aw_ccu fdt 13 dev/clk/allwinner/aw_clk_m.c optional aw_ccu fdt 14 dev/clk/allwinner/aw_clk_mipi.c optional aw_ccu fdt 15 dev/clk/allwinner/aw_clk_nkmp.c optional aw_ccu fdt 16 dev/clk/allwinner/aw_clk_nm.c optional aw_ccu fdt 17 dev/clk/allwinner/aw_clk_nmm.c optional aw_ccu fdt [all …]
|
/freebsd/usr.sbin/fdformat/ |
H A D | fdformat.c | 142 struct fd_type fdt, newft, *fdtp; in main() local 248 if(ioctl(fd, FD_GTYPE, &fdt) < 0) in main() 259 fdt = *fdtp; in main() 262 parse_fmt(fmtstring, type, fdt, &newft); in main() 263 fdt = newft; in main() 265 if (ioctl(fd, FD_STYPE, &fdt) < 0) in main() 273 bytes_per_track = fdt.sectrac * (128 << fdt.secsize); in main() 276 tracks_per_dot = (fdt.tracks * fdt.heads + 20) / 40; in main() 281 fdt.tracks * fdt.heads * bytes_per_track / 1024, in main() 286 fdt.tracks * fdt.heads * bytes_per_track / 1024, in main() [all …]
|
/freebsd/usr.sbin/fdwrite/ |
H A D | fdwrite.c | 71 struct fd_type fdt; in main() 130 if(ioctl(fd, FD_GTYPE, &fdt) < 0) in main() 133 bpt = fdt.sectrac * (1<<fdt.secsize) * 128; in main() 146 fdt.tracks,fdt.heads,fdt.sectrac,(1<<fdt.secsize) * 128, in main() 147 fdt.tracks*bpt*fdt in main() 72 struct fd_type fdt; main() local [all...] |
/freebsd/stand/fdt/ |
H A D | help.fdt | 4 fdt <subcommand> <arguments> 9 # Tfdt Saddr Dload fdt from an address in memory 11 fdt addr <address> 19 fdt alias <address> 26 fdt cd <path> 35 fdt header 42 fdt ls <path> 50 fdt mknode <name> 57 fdt mkprop <name> <value> ... 65 fdt mres [all …]
|
/freebsd/usr.sbin/fdread/ |
H A D | fdread.c | 165 struct fd_type fdt; in doread() local 167 if (ioctl(fd, FD_GTYPE, &fdt) == -1) in doread() 170 secsize = 128 << fdt.secsize; in doread() 171 tracksize = fdt.sectrac * secsize; in doread() 172 mediasize = tracksize * fdt.tracks * fdt.heads; in doread() 178 fdt.tracks, fdt.heads, fdt.sectrac, secsize, _devname); in doread() 308 struct fd_type fdt; in doreadid() local 310 if (ioctl(fd, FD_GTYPE, &fdt) == -1) in doreadid() 314 info.cyl = trackno / fdt.heads; in doreadid() 315 info.head = fdt.heads > 1? trackno % fdt.heads: 0; in doreadid()
|
/freebsd/stand/ |
H A D | Makefile | 19 S.${MK_FDT}+= fdt 51 SUBDIR_DEPEND_${MACHINE}+= fdt 82 SUBDIR_DEPEND_efi+= fdt 83 SUBDIR_DEPEND_kboot+= fdt 88 SUBDIR_DEPEND_uboot+= fdt
|
/freebsd/contrib/ntp/ntpd/ |
H A D | refclock_gpsdjson.c | 336 int fdt; /* current connecting socket */ member 527 up->fdt = -1; in gpsd_start() 644 if (up->fdt != -1) in gpsd_shutdown() 645 close(up->fdt); in gpsd_shutdown() 860 } else if (-1 != up->fdt) { in timer_primary() 868 else if (-1 != up->fdt) in timer_primary() 875 if (-1 == pp->io.fd && -1 != up->fdt) in timer_primary() 1883 up->fdt = socket( in gpsd_init_socket() 1885 if (-1 == up->fdt) { in gpsd_init_socket() 1897 rc = fcntl(up->fdt, F_SETFL, O_NONBLOCK, 1); in gpsd_init_socket() [all …]
|
/freebsd/lib/libfdt/ |
H A D | Makefile | 1 LIB= fdt 9 fdt.c \ 20 fdt.h \
|
/freebsd/sys/arm/mv/armada38x/ |
H A D | files.armada38x | 3 arm/mv/armada/thermal.c optional fdt 4 arm/mv/armada/wdt.c optional fdt 9 arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt
|
/freebsd/sys/arm/mv/ |
H A D | files.arm7 | 7 arm/mv/mv_pci_ctrl.c optional pci | fdt 12 arm/mv/armada/thermal.c optional fdt 13 arm/mv/armada/wdt.c optional fdt 27 dev/neta/if_mvneta_fdt.c optional neta fdt
|
/freebsd/sys/arm/ti/am335x/ |
H A D | files.am335x | 17 arm/ti/am335x/am335x_musb.c optional musb fdt 18 arm/ti/am335x/am335x_usb_phy.c optional musb fdt 19 arm/ti/am335x/am3359_cppi41.c optional musb fdt
|
/freebsd/sys/powerpc/ofw/ |
H A D | ofw_machdep.c | 52 #include <dev/fdt/fdt_common.h> 76 static void *fdt; variable 445 if (fdt != NULL) { in excise_fdt_reserved() 446 fdtmap[j].mr_start = (vm_offset_t)fdt & ~PAGE_MASK; in excise_fdt_reserved() 447 fdtmap[j].mr_size = round_page(fdt_totalsize(fdt)); in excise_fdt_reserved() 595 fdt = fdt_ptr; in OF_initial_setup() 622 if (fdt != NULL) { in OF_bootstrap() 637 tmp_fdt_ptr = pmap_early_io_map((vm_paddr_t)fdt, PAGE_SIZE); in OF_bootstrap() 655 bus_space_map(fdt_bt, (vm_paddr_t)fdt, fdt_size, 0, &fdt_va); in OF_bootstrap() 659 err = OF_init(fdt); in OF_bootstrap() [all...] |