/freebsd/contrib/elftoolchain/elfcopy/ |
H A D | segments.c | 39 static void insert_to_inseg_list(struct segment *seg, struct section *sec); 56 struct segment *seg; in add_to_inseg_list() local 74 STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) { in add_to_inseg_list() 75 if (s->off < seg->off || (s->vma < seg->vaddr && !s->pseudo)) in add_to_inseg_list() 77 if (s->off + s->sz > seg->off + seg->fsz && in add_to_inseg_list() 80 if (s->vma + s->sz > seg->vaddr + seg->msz) in add_to_inseg_list() 82 if (seg->type == PT_TLS && ((s->flags & SHF_TLS) == 0)) in add_to_inseg_list() 85 insert_to_inseg_list(seg, s); in add_to_inseg_list() 86 if (seg->type == PT_LOAD) in add_to_inseg_list() 87 s->seg = seg; in add_to_inseg_list() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/ |
H A D | JITLinkMemoryManager.cpp | 32 auto &Seg = Segments[{Sec.getMemProt(), Sec.getMemLifetime()}]; in BasicLayout() local 35 Seg.ContentBlocks.push_back(B); in BasicLayout() 37 Seg.ZeroFillBlocks.push_back(B); in BasicLayout() 52 auto &Seg = KV.second; in BasicLayout() local 54 llvm::sort(Seg.ContentBlocks, CompareBlocks); in BasicLayout() 55 llvm::sort(Seg.ZeroFillBlocks, CompareBlocks); in BasicLayout() 57 for (auto *B : Seg.ContentBlocks) { in BasicLayout() 58 Seg.ContentSize = alignToBlock(Seg.ContentSize, *B); in BasicLayout() 59 Seg.ContentSize += B->getSize(); in BasicLayout() 60 Seg.Alignment = std::max(Seg.Alignment, Align(B->getAlignment())); in BasicLayout() [all …]
|
/freebsd/sys/amd64/vmm/amd/ |
H A D | vmcb.c | 64 struct vmcb_segment *seg; in vmcb_segptr() local 70 seg = &state->cs; in vmcb_segptr() 74 seg = &state->ds; in vmcb_segptr() 78 seg = &state->es; in vmcb_segptr() 82 seg = &state->fs; in vmcb_segptr() 86 seg = &state->gs; in vmcb_segptr() 90 seg = &state->ss; in vmcb_segptr() 94 seg = &state->gdt; in vmcb_segptr() 98 seg = &state->idt; in vmcb_segptr() 102 seg = &state->ldt; in vmcb_segptr() [all …]
|
/freebsd/tools/bus_space/ |
H A D | busdma.c | 65 struct obj *seg[3]; member 75 } seg; member 254 struct obj *seg; in bd_md_add_seg() local 256 seg = obj_alloc(OBJ_TYPE_SEG); in bd_md_add_seg() 257 if (seg == NULL) in bd_md_add_seg() 259 seg->refcnt = 1; in bd_md_add_seg() 260 seg->parent = md; in bd_md_add_seg() 261 seg->u.seg.address = addr; in bd_md_add_seg() 262 seg->u.seg.size = size; in bd_md_add_seg() 264 md->u.md.seg[type] = seg; in bd_md_add_seg() [all …]
|
/freebsd/sys/vm/ |
H A D | vm_phys.c | 174 "Phys Seg Info"); 323 struct vm_phys_seg *seg; in sysctl_vm_phys_segs() local 332 seg = &vm_phys_segs[segind]; in sysctl_vm_phys_segs() 334 (uintmax_t)seg->start); in sysctl_vm_phys_segs() 336 (uintmax_t)seg->end); in sysctl_vm_phys_segs() 337 sbuf_printf(&sbuf, "domain: %d\n", seg->domain); in sysctl_vm_phys_segs() 338 sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues); in sysctl_vm_phys_segs() 420 struct vm_phys_seg *seg; in _vm_phys_create_seg() local 426 seg = &vm_phys_segs[vm_phys_nsegs++]; in _vm_phys_create_seg() 427 while (seg > vm_phys_segs && (seg - 1)->start >= end) { in _vm_phys_create_seg() [all …]
|
/freebsd/sys/dev/firewire/ |
H A D | fwdma.h | 55 struct fwdma_seg seg[0]; member 64 return ((caddr_t)am->seg[offset / ssize].v_addr + (offset % ssize)); in fwdma_v_addr() 73 return (am->seg[offset / ssize].bus_addr + (offset % ssize)); in fwdma_bus_addr() 86 struct fwdma_seg *seg, *eseg; in fwdma_sync_multiseg() local 88 seg = &am->seg[am->esize * start / am->ssize]; in fwdma_sync_multiseg() 89 eseg = &am->seg[am->esize * end / am->ssize]; in fwdma_sync_multiseg() 90 for (; seg <= eseg; seg++) in fwdma_sync_multiseg() 91 bus_dmamap_sync(am->dma_tag, seg->dma_map, op); in fwdma_sync_multiseg() 97 struct fwdma_seg *seg; in fwdma_sync_multiseg_all() local 100 seg = &am->seg[0]; in fwdma_sync_multiseg_all() [all …]
|
H A D | fwdma.c | 149 struct fwdma_seg *seg; in fwdma_malloc_multiseg() local 186 for (seg = &am->seg[0]; nseg--; seg++) { in fwdma_malloc_multiseg() 187 seg->v_addr = fwdma_malloc_size(am->dma_tag, &seg->dma_map, in fwdma_malloc_multiseg() 188 ssize, &seg->bus_addr, flag); in fwdma_malloc_multiseg() 189 if (seg->v_addr == NULL) { in fwdma_malloc_multiseg() 203 struct fwdma_seg *seg; in fwdma_free_multiseg() local 205 for (seg = &am->seg[0]; am->nseg--; seg++) { in fwdma_free_multiseg() 206 fwdma_free_size(am->dma_tag, seg->dma_map, in fwdma_free_multiseg() 207 seg->v_addr, am->ssize); in fwdma_free_multiseg()
|
/freebsd/contrib/ofed/libmlx5/ |
H A D | mlx5dv.h | 450 * seg - control segment to be filled 467 void mlx5dv_set_ctrl_seg(struct mlx5_wqe_ctrl_seg *seg, uint16_t pi, in mlx5dv_set_ctrl_seg() argument 472 seg->opmod_idx_opcode = htobe32(((uint32_t)opmod << 24) | ((uint32_t)pi << 8) | opcode); in mlx5dv_set_ctrl_seg() 473 seg->qpn_ds = htobe32((qp_num << 8) | ds); in mlx5dv_set_ctrl_seg() 474 seg->fm_ce_se = fm_ce_se; in mlx5dv_set_ctrl_seg() 475 seg->signature = signature; in mlx5dv_set_ctrl_seg() 482 seg->imm = imm; in mlx5dv_set_ctrl_seg() 494 void mlx5dv_x86_set_ctrl_seg(struct mlx5_wqe_ctrl_seg *seg, uint16_t pi, in mlx5dv_x86_set_ctrl_seg() argument 511 *(__m128i *) seg = _mm_shuffle_epi8(val, mask); in mlx5dv_x86_set_ctrl_seg() 520 * seg - datagram segment to be filled. [all …]
|
H A D | qp.c | 273 struct mlx5_wqe_inline_seg *seg; in set_data_inl_seg() local 282 seg = wqe; in set_data_inl_seg() 283 wqe += sizeof *seg; in set_data_inl_seg() 305 seg->byte_count = htobe32(inl | MLX5_INLINE_SEG); in set_data_inl_seg() 306 *sz = align(inl + sizeof seg->byte_count, 16) / 16; in set_data_inl_seg() 423 uint32_t qpn, void **seg, int *size) in set_umr_data_seg() argument 428 } *data = *seg; in set_umr_data_seg() 437 *seg += sizeof(*data); in set_umr_data_seg() 443 uint32_t qpn, void **seg, int *size) in set_umr_mkey_seg() argument 445 struct mlx5_wqe_mkey_context_seg *mkey = *seg; in set_umr_mkey_seg() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/TargetProcess/ |
H A D | SimpleExecutorMemoryManager.cpp | 51 for (auto &Seg : FR.Segments) in finalize() local 52 Base = std::min(Base, Seg.Addr); in finalize() 110 for (auto &Seg : FR.Segments) { in finalize() local 113 if (LLVM_UNLIKELY(Seg.Size < Seg.Content.size())) in finalize() 117 Seg.Addr.getValue(), Seg.Content.size(), Seg.Size), in finalize() 119 ExecutorAddr SegEnd = Seg.Addr + ExecutorAddrDiff(Seg.Size); in finalize() 120 if (LLVM_UNLIKELY(Seg.Addr < Base || SegEnd > AllocEnd)) in finalize() 124 Seg.Addr.getValue(), SegEnd.getValue(), Base.getValue(), in finalize() 128 char *Mem = Seg.Addr.toPtr<char *>(); in finalize() 129 if (!Seg.Content.empty()) in finalize() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/ |
H A D | MachOBuilder.h | 350 for (auto &Seg : Segments) { 351 Seg.cmdsize += 352 Seg.Sections.size() * sizeof(typename MachOTraits::Section); 353 Seg.nsects = Seg.Sections.size(); 354 Offset += Seg.cmdsize; 363 for (auto &Seg : Segments) { 364 Seg.vmaddr = SegVMAddr; 365 Seg.fileoff = Offset; 366 for (auto &Sec : Seg.Sections) { 371 Sec->addr = SegVMAddr + Sec->offset - Seg.fileoff; [all …]
|
/freebsd/tools/bus_space/C/ |
H A D | lang.c | 192 busdma_seg_t seg; in busdma_md_first_seg() local 194 seg = bd_md_first_seg(md, space); in busdma_md_first_seg() 195 return (seg); in busdma_md_first_seg() 199 busdma_md_next_seg(busdma_md_t md, busdma_seg_t seg) in busdma_md_next_seg() argument 202 seg = bd_md_next_seg(md, seg); in busdma_md_next_seg() 203 return (seg); in busdma_md_next_seg() 207 busdma_seg_get_addr(busdma_seg_t seg) in busdma_seg_get_addr() argument 212 error = bd_seg_get_addr(seg, &addr); in busdma_seg_get_addr() 217 busdma_seg_get_size(busdma_seg_t seg) in busdma_seg_get_size() argument 222 error = bd_seg_get_size(seg, &size); in busdma_seg_get_size()
|
/freebsd/sys/dev/xdma/ |
H A D | xdma_sg.c | 62 struct bus_dma_segment *seg; member 374 struct bus_dma_segment *seg; in xdma_dmamap_cb() local 378 seg = slr->seg; in xdma_dmamap_cb() 388 seg[i].ds_addr = segs[i].ds_addr; in xdma_dmamap_cb() 389 seg[i].ds_len = segs[i].ds_len; in xdma_dmamap_cb() 395 struct bus_dma_segment *seg) in _xdma_load_data_busdma() argument 411 xr->buf.map, xr->m, seg, &nsegs, BUS_DMA_NOWAIT); in _xdma_load_data_busdma() 416 slr.seg = seg; in _xdma_load_data_busdma() 442 slr.seg = seg; in _xdma_load_data_busdma() 483 struct bus_dma_segment *seg) in _xdma_load_data() argument [all …]
|
/freebsd/sys/dev/dpaa2/ |
H A D | dpaa2_buf.h | 46 bus_dma_segment_t seg; member 60 (__buf)->seg.ds_addr = 0; \ 61 (__buf)->seg.ds_len = 0; \ 84 KASSERT((__buf)->seg.ds_addr == 0, ("%s: already mapped?", __func__)); \ 85 KASSERT((__buf)->seg.ds_len == 0, ("%s: already mapped?", __func__)); \ 94 KASSERT((__sgt)->seg.ds_addr == 0, ("%s: S/G mapped?", __func__)); \ 95 KASSERT((__sgt)->seg.ds_len == 0, ("%s: S/G mapped?", __func__)); \ 108 KASSERT((__buf)->seg.ds_addr == 0, ("%s: already mapped?", __func__)); \ 109 KASSERT((__buf)->seg.ds_len == 0, ("%s: already mapped?", __func__)); \ 118 KASSERT((__sgt)->seg.ds_addr == 0, ("%s: S/G mapped?", __func__)); \ [all …]
|
/freebsd/sys/amd64/vmm/io/ |
H A D | ppt.c | 229 struct pptseg *seg; in ppt_unmap_all_mmio() local 232 seg = &ppt->mmio[i]; in ppt_unmap_all_mmio() 233 if (seg->len == 0) in ppt_unmap_all_mmio() 235 (void)vm_unmap_mmio(vm, seg->gpa, seg->len); in ppt_unmap_all_mmio() 236 bzero(seg, sizeof(struct pptseg)); in ppt_unmap_all_mmio() 353 struct pptseg *seg; in ppt_is_mmio() local 360 seg = &ppt->mmio[i]; in ppt_is_mmio() 361 if (seg->len == 0) in ppt_is_mmio() 363 if (gpa >= seg->gpa && gpa < seg->gpa + seg->len) in ppt_is_mmio() 488 struct pptseg *seg; in ppt_map_mmio() local [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
H A D | WebAssemblyInstrBulkMemory.td | 41 (ins i32imm_op:$seg, i32imm_op:$idx, rc:$dest, 43 (outs), (ins i32imm_op:$seg, i32imm_op:$idx), 45 "memory.init\t$seg, $idx, $dest, $offset, $size", 46 "memory.init\t$seg, $idx", 0x08>; 50 BULK_I<(outs), (ins i32imm_op:$seg), (outs), (ins i32imm_op:$seg), 52 "data.drop\t$seg", "data.drop\t$seg", 0x09>;
|
/freebsd/sys/dev/mlx5/mlx5_ib/ |
H A D | mlx5_ib_qp.c | 3063 void *seg = eseg; in set_eth_seg() local 3071 seg += sizeof(struct mlx5_wqe_eth_seg); in set_eth_seg() 3092 memcpy(seg - size_of_inl_hdr_start, pdata, copysz); in set_eth_seg() 3095 seg += ALIGN(copysz - size_of_inl_hdr_start, 16); in set_eth_seg() 3100 seg = mlx5_get_send_wqe(qp, 0); in set_eth_seg() 3103 memcpy(seg, pdata, left); in set_eth_seg() 3104 seg += ALIGN(left, 16); in set_eth_seg() 3109 return seg; in set_eth_seg() 3315 static void set_reg_mkey_seg(struct mlx5_mkey_seg *seg, in set_reg_mkey_seg() argument 3321 memset(seg, 0, sizeof(*seg)); in set_reg_mkey_seg() [all …]
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | buffer.c | 153 static int evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg); 2967 struct evbuffer_file_segment *seg = in evbuffer_file_segment_new() local 2969 if (!seg) in evbuffer_file_segment_new() 2971 seg->refcnt = 1; in evbuffer_file_segment_new() 2972 seg->fd = fd; in evbuffer_file_segment_new() 2973 seg->flags = flags; in evbuffer_file_segment_new() 2974 seg->file_offset = offset; in evbuffer_file_segment_new() 2975 seg->cleanup_cb = NULL; in evbuffer_file_segment_new() 2976 seg->cleanup_cb_arg = NULL; in evbuffer_file_segment_new() 2994 seg->length = length; in evbuffer_file_segment_new() [all …]
|
/freebsd/contrib/libevent/ |
H A D | buffer.c | 153 static int evbuffer_file_segment_materialize(struct evbuffer_file_segment *seg); 2967 struct evbuffer_file_segment *seg = in evbuffer_file_segment_new() local 2969 if (!seg) in evbuffer_file_segment_new() 2971 seg->refcnt = 1; in evbuffer_file_segment_new() 2972 seg->fd = fd; in evbuffer_file_segment_new() 2973 seg->flags = flags; in evbuffer_file_segment_new() 2974 seg->file_offset = offset; in evbuffer_file_segment_new() 2975 seg->cleanup_cb = NULL; in evbuffer_file_segment_new() 2976 seg->cleanup_cb_arg = NULL; in evbuffer_file_segment_new() 2994 seg->length = length; in evbuffer_file_segment_new() [all …]
|
/freebsd/sys/dev/ice/ |
H A D | ice_ddp_common.c | 177 struct ice_generic_seg_hdr *seg; in ice_find_seg_in_pkg() local 179 seg = (struct ice_generic_seg_hdr *) in ice_find_seg_in_pkg() 182 if (LE32_TO_CPU(seg->seg_type) == seg_type) in ice_find_seg_in_pkg() 183 return seg; in ice_find_seg_in_pkg() 197 struct ice_generic_seg_hdr *seg = NULL; in ice_get_pkg_seg_by_idx() local 200 seg = (struct ice_generic_seg_hdr *) in ice_get_pkg_seg_by_idx() 204 return seg; in ice_get_pkg_seg_by_idx() 214 struct ice_generic_seg_hdr *seg; in ice_is_signing_seg_at_idx() local 217 seg = ice_get_pkg_seg_by_idx(pkg_hdr, idx); in ice_is_signing_seg_at_idx() 218 if (seg) in ice_is_signing_seg_at_idx() 240 struct ice_sign_seg *seg; ice_is_signing_seg_type_at_idx() local 520 ice_download_pkg_sig_seg(struct ice_hw * hw,struct ice_sign_seg * seg) ice_download_pkg_sig_seg() argument 547 struct ice_seg *seg; ice_download_pkg_config_seg() local 579 struct ice_sign_seg *seg; ice_dwnld_sign_and_cfg_segs() local 1051 struct ice_generic_seg_hdr *seg; ice_verify_pkg() local 1117 ice_chk_pkg_compat(struct ice_hw * hw,struct ice_pkg_hdr * ospkg,struct ice_seg ** seg) ice_chk_pkg_compat() argument 1325 struct ice_seg *seg; ice_init_pkg() local 2390 struct ice_run_time_cfg_seg *seg; ice_cfg_tx_topo() local [all...] |
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/ |
H A D | EPCGenericRTDyldMemoryManager.cpp | 71 auto &Seg = Unmapped.back().CodeAllocs; in allocateCodeSection() local 72 Seg.emplace_back(Size, Alignment); in allocateCodeSection() 74 alignAddr(Seg.back().Contents.get(), Align(Alignment))); in allocateCodeSection() 88 auto &Seg = in allocateDataSection() local 91 Seg.emplace_back(Size, Alignment); in allocateDataSection() 93 alignAddr(Seg.back().Contents.get(), Align(Alignment))); in allocateDataSection() 237 auto &Seg = FR.Segments.back(); in finalizeMemory() local 238 Seg.RAG = SegMemProts[I]; in finalizeMemory() 239 Seg.Addr = RemoteAddrs[I]->Start; in finalizeMemory() 241 Seg.Size = alignTo(Seg.Size, SecAlloc.Align); in finalizeMemory() [all …]
|
H A D | EPCGenericJITLinkMemoryManager.cpp | 151 auto &Seg = KV.second; in completeAllocation() local 153 Seg.Addr = NextSegAddr; in completeAllocation() 154 KV.second.WorkingMem = BL.getGraph().allocateBuffer(Seg.ContentSize).data(); in completeAllocation() 156 alignTo(Seg.ContentSize + Seg.ZeroFillSize, EPC.getPageSize())); in completeAllocation() 159 SegInfo.ContentSize = Seg.ContentSize; in completeAllocation() 160 SegInfo.ZeroFillSize = Seg.ZeroFillSize; in completeAllocation() 161 SegInfo.Addr = Seg.Addr; in completeAllocation() 162 SegInfo.WorkingMem = Seg.WorkingMem; in completeAllocation()
|
H A D | MapperJITLinkMemoryManager.cpp | 89 auto &Seg = KV.second; in allocate() local 91 auto TotalSize = Seg.ContentSize + Seg.ZeroFillSize; in allocate() 93 Seg.Addr = NextSegAddr; in allocate() 94 Seg.WorkingMem = Mapper->prepare(NextSegAddr, TotalSize); in allocate() 99 SI.Offset = Seg.Addr - Result->Start; in allocate() 100 SI.ContentSize = Seg.ContentSize; in allocate() 101 SI.ZeroFillSize = Seg.ZeroFillSize; in allocate() 103 SI.WorkingMem = Seg.WorkingMem; in allocate()
|
/freebsd/contrib/llvm-project/clang/lib/Driver/ |
H A D | MultilibBuilder.cpp | 22 StringRef seg = Segment; in normalizePathSegment() local 26 StringRef last = llvm::sys::path::filename(seg); in normalizePathSegment() 29 seg = llvm::sys::path::parent_path(seg); in normalizePathSegment() 32 if (seg.empty() || seg == "/") { in normalizePathSegment() 38 if (seg.front() != '/') { in normalizePathSegment() 39 Segment = "/" + seg.str(); in normalizePathSegment() 41 Segment = std::string(seg); in normalizePathSegment()
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/ |
H A D | WasmDumper.cpp | 177 const wasm::WasmDataSegment &Seg = Segment.Data; in printSectionHeaders() local 179 if (!Seg.Name.empty()) in printSectionHeaders() 180 W.printString("Name", Seg.Name); in printSectionHeaders() 181 W.printNumber("Size", static_cast<uint64_t>(Seg.Content.size())); in printSectionHeaders() 182 if (Seg.Offset.Extended) in printSectionHeaders() 184 else if (Seg.Offset.Inst.Opcode == wasm::WASM_OPCODE_I32_CONST) in printSectionHeaders() 185 W.printNumber("Offset", Seg.Offset.Inst.Value.Int32); in printSectionHeaders() 186 else if (Seg.Offset.Inst.Opcode == wasm::WASM_OPCODE_I64_CONST) in printSectionHeaders() 187 W.printNumber("Offset", Seg.Offset.Inst.Value.Int64); in printSectionHeaders() 188 else if (Seg in printSectionHeaders() [all...] |