/freebsd/sys/amd64/vmm/intel/ |
H A D | ept.c | 45 #define EPT_SUPPORTS_EXEC_ONLY(cap) ((cap) & (1UL << 0)) argument 46 #define EPT_PWL4(cap) ((cap) & (1UL << 6)) argument 47 #define EPT_MEMORY_TYPE_WB(cap) ((cap) & (1UL << 14)) argument 48 #define EPT_PDE_SUPERPAGE(cap) ((cap) & (1UL << 16)) /* 2MB pages */ argument 49 #define EPT_PDPTE_SUPERPAGE(cap) ((cap) & (1UL << 17)) /* 1GB pages */ argument 50 #define INVEPT_SUPPORTED(cap) ((cap) & (1UL << 20)) argument 51 #define AD_BITS_SUPPORTED(cap) ((cap) & (1UL << 21)) argument 52 #define INVVPID_SUPPORTED(cap) ((cap) & (1UL << 32)) argument 55 #define INVVPID_ALL_TYPES_SUPPORTED(cap) \ argument 56 (((cap) & INVVPID_ALL_TYPES_MASK) == INVVPID_ALL_TYPES_MASK) [all …]
|
H A D | vtd.c | 55 volatile uint64_t cap; member 63 #define VTD_CAP_SAGAW(cap) (((cap) >> 8) & 0x1F) argument 64 #define VTD_CAP_ND(cap) ((cap) & 0x7) argument 65 #define VTD_CAP_CM(cap) (((cap) >> 7) & 0x1) argument 66 #define VTD_CAP_SPS(cap) (((cap) >> 34) & 0xF) argument 67 #define VTD_CAP_RWBF(cap) (((cap) >> 4) & 0x1) argument 132 nd = VTD_CAP_ND(vtdmap->cap); in vtd_max_domains() 246 if (VTD_CAP_RWBF(vtdmap->cap)) { in vtd_wbflush() 372 if (VTD_CAP_CM(vtdmap->cap) != 0) in vtd_init() 673 tmp &= VTD_CAP_SAGAW(vtdmap->cap); in vtd_create_domain() [all …]
|
/freebsd/sys/dev/mlx5/ |
H A D | device.h | 1050 #define MLX5_CAP_GEN(mdev, cap) \ argument 1051 MLX5_GET(cmd_hca_cap, mdev->hca_caps_cur[MLX5_CAP_GENERAL], cap) 1053 #define MLX5_CAP_GEN_64(mdev, cap) \ argument 1054 MLX5_GET64(cmd_hca_cap, mdev->hca_caps_cur[MLX5_CAP_GENERAL], cap) 1056 #define MLX5_CAP_GEN_MAX(mdev, cap) \ argument 1057 MLX5_GET(cmd_hca_cap, mdev->hca_caps_max[MLX5_CAP_GENERAL], cap) 1059 #define MLX5_CAP_GEN_2(mdev, cap) \ argument 1060 MLX5_GET(cmd_hca_cap_2, mdev->hca_caps_cur[MLX5_CAP_GENERAL_2], cap) 1062 #define MLX5_CAP_ETH(mdev, cap) \ argument 1064 mdev->hca_caps_cur[MLX5_CAP_ETHERNET_OFFLOADS], cap) [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/lua_core/ |
H A D | tst.lib_base.lua | 127 return function (...) cap = {[0] = op, ...} ; return (...) end 139 assert(cap[0] == "add" and cap[1] == b and cap[2] == 5 and cap[3]==nil) 141 assert(cap[0] == "add" and cap[1] == b and cap[2] == '5' and cap[3]==nil) 143 assert(cap[0] == "add" and cap[1] == 5 and cap[2] == b and cap[3]==nil) 145 assert(cap[0] == "add" and cap[1] == '5' and cap[2] == b and cap[3]==nil) 148 assert(cap[0] == "sub" and cap[1] == 5 and cap[2] == a and cap[3]==nil) 150 assert(cap[0] == "sub" and cap[1] == '5' and cap[2] == a and cap[3]==nil) 152 assert(cap[0] == "mul" and cap[1] == a and cap[2] == a and cap[3]==nil) 154 assert(cap[0] == "div" and cap[1] == a and cap[2] == 0 and cap[3]==nil) 156 assert(cap[0] == "mod" and cap[1] == a and cap[2] == 2 and cap[3]==nil) [all …]
|
/freebsd/sys/opencrypto/ |
H A D | crypto.c | 133 struct cryptocap *cap; member 215 static int crypto_invoke(struct cryptocap *cap, struct cryptop *crp, int hint); 272 cap_ref(struct cryptocap *cap) in cap_ref() argument 275 refcount_acquire(&cap->cc_refs); in cap_ref() 276 return (cap); in cap_ref() 280 cap_rele(struct cryptocap *cap) in cap_rele() argument 283 if (refcount_release(&cap->cc_refs) == 0) in cap_rele() 286 KASSERT(cap->cc_sessions == 0, in cap_rele() 289 free(cap, M_CRYPTO_DATA); in cap_rele() 471 return (crypto_session->cap->cc_hid); in crypto_ses2hid() [all …]
|
/freebsd/contrib/bmake/ |
H A D | buf.c | 84 buf->cap += buf->cap > 16 ? buf->cap : 16; in Buf_Expand() 85 buf->data = bmake_realloc(buf->data, buf->cap); in Buf_Expand() 95 if (old_len + bytes_len >= buf->cap) { in Buf_AddBytes() 97 buf->cap += buf->cap > minIncr ? buf->cap : minIncr; in Buf_AddBytes() 98 buf->data = bmake_realloc(buf->data, buf->cap); in Buf_AddBytes() 143 Buf_InitSize(Buffer *buf, size_t cap) in Buf_InitSize() argument [all...] |
/freebsd/contrib/wpa/src/ap/ |
H A D | ieee802_11_vht.c | 26 struct ieee80211_vht_capabilities *cap; in hostapd_eid_vht_capabilities() local 47 *pos++ = sizeof(*cap); in hostapd_eid_vht_capabilities() 49 cap = (struct ieee80211_vht_capabilities *) pos; in hostapd_eid_vht_capabilities() 50 os_memset(cap, 0, sizeof(*cap)); in hostapd_eid_vht_capabilities() 51 cap->vht_capabilities_info = host_to_le32( in hostapd_eid_vht_capabilities() 57 hapd_nsts = le_to_host32(cap->vht_capabilities_info); in hostapd_eid_vht_capabilities() 59 cap->vht_capabilities_info &= in hostapd_eid_vht_capabilities() 62 cap->vht_capabilities_info |= in hostapd_eid_vht_capabilities() 67 os_memcpy(&cap->vht_supported_mcs_set, mode->vht_mcs_set, 8); in hostapd_eid_vht_capabilities() 69 pos += sizeof(*cap); in hostapd_eid_vht_capabilities() [all …]
|
H A D | ieee802_11_he.c | 68 struct ieee80211_he_capabilities *cap; in ieee80211_invalid_he_cap_size() local 72 cap = (struct ieee80211_he_capabilities *) buf; in ieee80211_invalid_he_cap_size() 73 cap_len = sizeof(*cap) - sizeof(cap->optional); in ieee80211_invalid_he_cap_size() 77 cap_len += ieee80211_he_mcs_set_size(cap->he_phy_capab_info); in ieee80211_invalid_he_cap_size() 83 cap->he_phy_capab_info); in ieee80211_invalid_he_cap_size() 92 struct ieee80211_he_capabilities *cap; in hostapd_eid_he_capab() local 101 ie_size = sizeof(*cap) - sizeof(cap->optional); in hostapd_eid_he_capab() 130 cap = (struct ieee80211_he_capabilities *) pos; in hostapd_eid_he_capab() 131 os_memset(cap, 0, sizeof(*cap)); in hostapd_eid_he_capab() 133 os_memcpy(cap->he_mac_capab_info, mode->he_capab[opmode].mac_cap, in hostapd_eid_he_capab() [all …]
|
H A D | ieee802_11_ht.c | 26 struct ieee80211_ht_capabilities *cap; in hostapd_eid_ht_capabilities() local 34 *pos++ = sizeof(*cap); in hostapd_eid_ht_capabilities() 36 cap = (struct ieee80211_ht_capabilities *) pos; in hostapd_eid_ht_capabilities() 37 os_memset(cap, 0, sizeof(*cap)); in hostapd_eid_ht_capabilities() 38 cap->ht_capabilities_info = host_to_le16(hapd->iconf->ht_capab); in hostapd_eid_ht_capabilities() 39 cap->a_mpdu_params = hapd->iface->current_mode->a_mpdu_params; in hostapd_eid_ht_capabilities() 40 os_memcpy(cap->supported_mcs_set, hapd->iface->current_mode->mcs_set, in hostapd_eid_ht_capabilities() 47 pos += sizeof(*cap); in hostapd_eid_ht_capabilities() 497 u16 cap; in hostapd_get_ht_capab() local 502 cap = le_to_host16(neg_ht_cap->ht_capabilities_info); in hostapd_get_ht_capab() [all …]
|
/freebsd/crypto/openssl/crypto/ |
H A D | s390xcap.c | 39 if (sscanf(tok[0] + off, "%llx", &cap->NAME[0]) != 1) \ 42 cap->NAME[0] = ~cap->NAME[0]; \ 45 if (sscanf(tok[1] + off, "%llx", &cap->NAME[1]) != 1) \ 48 cap->NAME[1] = ~cap->NAME[1]; \ 56 memcpy(cap, &NAME, sizeof(*cap)); \ 70 static int parse_env(struct OPENSSL_s390xcap_st *cap); 82 struct OPENSSL_s390xcap_st cap; in OPENSSL_cpuid_setup() local 143 if (!parse_env(&cap)) in OPENSSL_cpuid_setup() 148 OPENSSL_s390xcap_P.stfle[0] &= cap.stfle[0]; in OPENSSL_cpuid_setup() 149 OPENSSL_s390xcap_P.stfle[1] &= cap.stfle[1]; in OPENSSL_cpuid_setup() [all …]
|
/freebsd/usr.sbin/pciconf/ |
H A D | cap.c | 53 uint16_t cap, status; in cap_power() local 55 cap = read_config(fd, &p->pc_sel, ptr + PCIR_POWER_CAP, 2); in cap_power() 58 cap & PCIM_PCAP_SPEC, in cap_power() 59 cap & PCIM_PCAP_D1SUPP ? " D1" : "", in cap_power() 60 cap & PCIM_PCAP_D2SUPP ? " D2" : "", in cap_power() 312 printf(" Intel cap %d version %d", version >> 4, version & 0xf); in cap_vendor() 554 slot_power(uint32_t cap) in cap_express() 558 mwatts = (cap & PCIEM_SLOT_CAP_SPLV) >> 7; in cap_express() 559 switch (cap & PCIEM_SLOT_CAP_SPLS) { in cap_express() 578 uint32_t cap; in cap_msix() 442 slot_power(uint32_t cap) slot_power() argument 466 uint32_t cap; cap_express() local 613 uint8_t cap; cap_pciaf() local 761 uint8_t ptr, cap; list_caps() local 1019 check_avail_and_state(u_int cap,u_int capbit,u_int ctl,u_int ctlbit) check_avail_and_state() argument 1184 uint8_t ptr, cap; pci_find_cap() local [all...] |
/freebsd/lib/libc/rpc/ |
H A D | pmap_rmt.c | 115 xdr_rmtcall_args(XDR *xdrs, struct rmtcallargs *cap) in xdr_rmtcall_args() argument 120 assert(cap != NULL); in xdr_rmtcall_args() 122 if (xdr_u_long(xdrs, &(cap->prog)) && in xdr_rmtcall_args() 123 xdr_u_long(xdrs, &(cap->vers)) && in xdr_rmtcall_args() 124 xdr_u_long(xdrs, &(cap->proc))) { in xdr_rmtcall_args() 126 if (! xdr_u_long(xdrs, &(cap->arglen))) in xdr_rmtcall_args() 129 if (! (*(cap->xdr_args))(xdrs, cap->args_ptr)) in xdr_rmtcall_args() 132 cap->arglen = (u_long)position - (u_long)argposition; in xdr_rmtcall_args() 134 if (! xdr_u_long(xdrs, &(cap->arglen))) in xdr_rmtcall_args()
|
/freebsd/lib/libutil/ |
H A D | login_cap.c | 459 login_getcapstr(login_cap_t *lc, const char *cap, const char *def, const char *error) in login_getcapstr() argument 464 if (lc == NULL || cap == NULL || lc->lc_cap == NULL || *cap == '\0') in login_getcapstr() 467 if ((ret = cgetstr(lc->lc_cap, cap, &res)) == -1) in login_getcapstr() 481 login_getcaplist(login_cap_t *lc, const char *cap, const char *chars) in login_getcaplist() argument 487 if ((lstring = login_getcapstr(lc, cap, NULL, NULL)) != NULL) in login_getcaplist() 502 login_getpath(login_cap_t *lc, const char *cap, const char *error) in login_getpath() argument 508 str = login_getcapstr(lc, cap, NULL, NULL); in login_getpath() 634 login_getcaptime(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) in login_getcaptime() argument 650 if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) in login_getcaptime() 674 lc->lc_class, cap, oval); in login_getcaptime() [all …]
|
/freebsd/contrib/ldns/ |
H A D | edns.c | 302 size_t cap; in ldns_edns_option_list_push() local 311 cap = option_list->_option_capacity; in ldns_edns_option_list_push() 315 if (option_count+1 > cap) { in ldns_edns_option_list_push() 319 if (cap == 0) { in ldns_edns_option_list_push() 320 cap = LDNS_OPTIONLIST_INIT; /* initial list size */ in ldns_edns_option_list_push() 322 cap *= 2; in ldns_edns_option_list_push() 326 ldns_edns_option *, cap); in ldns_edns_option_list_push() 333 option_list->_option_capacity = cap; in ldns_edns_option_list_push() 349 size_t cap; in ldns_edns_option_list_pop() local 353 cap = option_list->_option_capacity; in ldns_edns_option_list_pop() [all …]
|
/freebsd/crypto/openssl/crypto/pkcs7/ |
H A D | pk7_attr.c | 21 STACK_OF(X509_ALGOR) *cap) in PKCS7_add_attrib_smimecap() 29 seq->length = ASN1_item_i2d((ASN1_VALUE *)cap, &seq->data, in PKCS7_add_attrib_smimecap() 41 ASN1_TYPE *cap; in STACK_OF() local 44 cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities); in STACK_OF() 45 if (cap == NULL || (cap->type != V_ASN1_SEQUENCE)) in STACK_OF() 47 p = cap->value.sequence->data; in STACK_OF() 49 ASN1_item_d2i(NULL, &p, cap->value.sequence->length, in STACK_OF()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_vector.h | 104 uptr cap = cap0 * 5 / 4; // 25% growth in EnsureSize() local 105 if (cap == 0) in EnsureSize() 106 cap = 16; in EnsureSize() 107 if (cap < size) in EnsureSize() 108 cap = size; in EnsureSize() 109 T *p = (T*)InternalAlloc(cap * sizeof(T)); in EnsureSize() 116 last_ = begin_ + cap; in EnsureSize()
|
/freebsd/crypto/openssl/crypto/rsa/ |
H A D | rsa_mp.c | 102 int cap = 5; in ossl_rsa_multip_cap() local 105 cap = 2; in ossl_rsa_multip_cap() 107 cap = 3; in ossl_rsa_multip_cap() 109 cap = 4; in ossl_rsa_multip_cap() 111 if (cap > RSA_MAX_PRIME_NUM) in ossl_rsa_multip_cap() 112 cap = RSA_MAX_PRIME_NUM; in ossl_rsa_multip_cap() 114 return cap; in ossl_rsa_multip_cap()
|
/freebsd/sys/dev/acpica/ |
H A D | acpi_battery.c | 104 bst->cap != ACPI_BATT_UNKNOWN && bst->volt != ACPI_BATT_UNKNOWN); in acpi_battery_bst_valid() 200 bst[i].cap = (bst[i].cap * bix->dvol) / 1000; in acpi_battery_get_battinfo() 217 if (bst[i].cap > bix->lfcap) in acpi_battery_get_battinfo() 218 bst[i].cap = bix->lfcap; in acpi_battery_get_battinfo() 221 bi[i].cap = (100 * bst[i].cap) / bix->lfcap; in acpi_battery_get_battinfo() 224 if (bi[i].cap != -1) { in acpi_battery_get_battinfo() 225 total_cap += bst[i].cap; in acpi_battery_get_battinfo() 257 bi[i].min = (60 * bst[i].cap) / valid_rat in acpi_battery_get_battinfo() [all...] |
/freebsd/sbin/camcontrol/ |
H A D | persist.c | 238 persist_print_cap(struct scsi_per_res_cap *cap, uint32_t valid_len) in persist_print_cap() argument 244 length = scsi_2btoul(cap->length); in persist_print_cap() 246 type_mask = scsi_2btoul(cap->type_mask); in persist_print_cap() 257 (cap->flags1 & SPRI_RLR_C) ? 1 : 0); in persist_print_cap() 259 (cap->flags1 & SPRI_CRH) ? 1 : 0); in persist_print_cap() 261 (cap->flags1 & SPRI_SIP_C) ? 1 : 0); in persist_print_cap() 263 (cap->flags1 & SPRI_ATP_C) ? 1 : 0); in persist_print_cap() 265 (cap->flags1 & SPRI_PTPL_C) ? 1 : 0); in persist_print_cap() 267 (cap->flags2 & SPRI_ALLOW_CMD_MASK) >> SPRI_ALLOW_CMD_SHIFT); in persist_print_cap() 274 switch (cap->flags2 & SPRI_ALLOW_CMD_MASK) { in persist_print_cap() [all …]
|
/freebsd/sys/dev/mlx5/mlx5_ib/ |
H A D | mlx5_ib_gsi.c | 42 struct ib_qp_cap cap; member 77 wr = &gsi->outstanding_wrs[index % gsi->cap.max_send_wr]; in generate_completions() 141 gsi->outstanding_wrs = kcalloc(init_attr->cap.max_send_wr, in mlx5_ib_gsi_create_qp() 162 gsi->cap = init_attr->cap; in mlx5_ib_gsi_create_qp() 167 gsi->cq = ib_alloc_cq(pd->device, gsi, init_attr->cap.max_send_wr, 0, in mlx5_ib_gsi_create_qp() 179 hw_init_attr.cap.max_send_wr = 0; in mlx5_ib_gsi_create_qp() 180 hw_init_attr.cap.max_send_sge = 0; in mlx5_ib_gsi_create_qp() 181 hw_init_attr.cap.max_inline_data = 0; in mlx5_ib_gsi_create_qp() 255 .cap = { in create_gsi_ud_qp() 256 .max_send_wr = gsi->cap.max_send_wr, in create_gsi_ud_qp() [all …]
|
/freebsd/contrib/ofed/librdmacm/examples/ |
H A D | rdma_client.c | 64 attr.cap.max_send_wr = attr.cap.max_recv_wr = 1; in run() 65 attr.cap.max_send_sge = attr.cap.max_recv_sge = 1; in run() 66 attr.cap.max_inline_data = 16; in run() 71 if (attr.cap.max_inline_data >= 16) in run()
|
H A D | rdma_server.c | 65 init_attr.cap.max_send_wr = init_attr.cap.max_recv_wr = 1; in run() 66 init_attr.cap.max_send_sge = init_attr.cap.max_recv_sge = 1; in run() 67 init_attr.cap.max_inline_data = 16; in run() 95 if (init_attr.cap.max_inline_data >= 16) in run()
|
/freebsd/contrib/bc/src/ |
H A D | vector.c | 48 size_t cap, len; in bc_vec_grow() local 53 cap = v->cap; in bc_vec_grow() 57 if (len > SIZE_MAX / 2) cap = len; in bc_vec_grow() 61 while (cap < len) in bc_vec_grow() 63 cap += cap; in bc_vec_grow() 69 v->v = bc_vm_realloc(v->v, bc_vm_arraySize(cap, v->size)); in bc_vec_grow() 70 v->cap = cap; in bc_vec_grow() [all...] |
/freebsd/contrib/ofed/libmlx4/ |
H A D | verbs.c | 803 if (attr->cap.max_send_wr > ctx->max_qp_wr || in mlx4_create_qp_ex() 804 attr->cap.max_recv_wr > ctx->max_qp_wr || in mlx4_create_qp_ex() 805 attr->cap.max_send_sge > ctx->max_sge || in mlx4_create_qp_ex() 806 attr->cap.max_recv_sge > ctx->max_sge) in mlx4_create_qp_ex() 809 if (attr->cap.max_send_wr > 65536 || in mlx4_create_qp_ex() 810 attr->cap.max_recv_wr > 65536 || in mlx4_create_qp_ex() 811 attr->cap.max_send_sge > 64 || in mlx4_create_qp_ex() 812 attr->cap.max_recv_sge > 64) in mlx4_create_qp_ex() 815 if (attr->cap.max_inline_data > 1024) in mlx4_create_qp_ex() 826 attr->cap.max_send_wr = qp->sq.wqe_cnt = 0; in mlx4_create_qp_ex() [all …]
|
/freebsd/contrib/ncurses/ncurses/tty/ |
H A D | lib_mvcur.c | 185 static int normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt); 195 trace_cost_of(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt) in trace_cost_of() argument 197 int result = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx cap, affcnt); in trace_cost_of() 199 ("CostOf %s %d %s", capname, result, _nc_visbuf(cap))); in trace_cost_of() 202 #define CostOf(cap,affcnt) trace_cost_of(NCURSES_SP_ARGx #cap, cap, affcnt) argument 205 trace_normalized_cost(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt) in trace_normalized_cost() argument 207 int result = normalized_cost(NCURSES_SP_ARGx cap, affcnt); in trace_normalized_cost() 209 ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap))); in trace_normalized_cost() 212 #define NormalizedCost(cap,affcnt) trace_normalized_cost(NCURSES_SP_ARGx #cap, cap, affcnt) argument 216 #define CostOf(cap,affcnt) NCURSES_SP_NAME(_nc_msec_cost)(NCURSES_SP_ARGx cap, affcnt) argument [all …]
|