/optee_os-3.20.0/core/drivers/crypto/caam/hal/imx_6_7/ |
A D | hal_clk_mx6.c | 17 uint32_t mask = 0; in caam_hal_clk_enable() local 21 mask = BM_CCM_CCGR0_CAAM_WRAPPER_IPG | BM_CCM_CCGR0_CAAM_WRAPPER_ACLK | in caam_hal_clk_enable() 25 reg |= mask; in caam_hal_clk_enable() 27 reg &= ~mask; in caam_hal_clk_enable() 34 mask = BM_CCM_CCGR6_EMI_SLOW; in caam_hal_clk_enable() 37 reg |= mask; in caam_hal_clk_enable() 39 reg &= ~mask; in caam_hal_clk_enable()
|
/optee_os-3.20.0/lib/libutils/isoc/newlib/ |
A D | memchr.c | 113 unsigned long mask; variable 134 mask = d << 8 | d; 135 mask = mask << 16 | mask; 137 mask = (mask << i) | mask; 140 if (DETECTCHAR(*asrc, mask))
|
A D | strchr.c | 103 unsigned long mask,j; variable 136 mask = c; 138 mask = (mask << j) | mask; 141 while (!DETECTNULL (*aligned_addr) && !DETECTCHAR (*aligned_addr, mask))
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_pss_decode.c | 30 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_decode() local 58 mask = XMALLOC(modulus_len); in pkcs_1_pss_decode() 61 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_decode() 65 if (mask != NULL) { in pkcs_1_pss_decode() 66 XFREE(mask); in pkcs_1_pss_decode() 105 DB[y] ^= mask[y]; in pkcs_1_pss_decode() 131 zeromem(mask, 8); in pkcs_1_pss_decode() 141 if ((err = hash_descriptor[hash_idx]->done(&md, mask)) != CRYPT_OK) { in pkcs_1_pss_decode() 146 if (FTMN_CALLEE_DONE_MEMCMP(XMEM_NEQ, mask, hash, hLen) == 0) { in pkcs_1_pss_decode() 154 zeromem(mask, modulus_len); in pkcs_1_pss_decode() [all …]
|
A D | pkcs_1_oaep_decode.c | 31 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_decode() local 57 mask = XMALLOC(modulus_len); in pkcs_1_oaep_decode() 59 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_decode() 63 if (mask != NULL) { in pkcs_1_oaep_decode() 64 XFREE(mask); in pkcs_1_oaep_decode() 97 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_decode() 103 seed[y] ^= mask[y]; in pkcs_1_oaep_decode() 107 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_decode() 113 DB[y] ^= mask[y]; in pkcs_1_oaep_decode() 165 zeromem(mask, modulus_len); in pkcs_1_oaep_decode() [all …]
|
A D | pkcs_1_oaep_encode.c | 32 unsigned char *DB, *seed, *mask; in pkcs_1_oaep_encode() local 60 mask = XMALLOC(modulus_len); in pkcs_1_oaep_encode() 62 if (DB == NULL || mask == NULL || seed == NULL) { in pkcs_1_oaep_encode() 66 if (mask != NULL) { in pkcs_1_oaep_encode() 67 XFREE(mask); in pkcs_1_oaep_encode() 109 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_encode() 115 DB[y] ^= mask[y]; in pkcs_1_oaep_encode() 119 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_encode() 125 seed[y] ^= mask[y]; in pkcs_1_oaep_encode() 150 zeromem(mask, modulus_len); in pkcs_1_oaep_encode() [all …]
|
A D | pkcs_1_pss_encode.c | 31 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_encode() local 59 mask = XMALLOC(modulus_len); in pkcs_1_pss_encode() 62 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_encode() 66 if (mask != NULL) { in pkcs_1_pss_encode() 67 XFREE(mask); in pkcs_1_pss_encode() 114 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_pss_encode() 120 DB[y] ^= mask[y]; in pkcs_1_pss_encode() 151 zeromem(mask, modulus_len); in pkcs_1_pss_encode() 158 XFREE(mask); in pkcs_1_pss_encode()
|
A D | pkcs_1_mgf1.c | 23 unsigned char *mask, unsigned long masklen) in pkcs_1_mgf1() argument 32 LTC_ARGCHK(mask != NULL); in pkcs_1_mgf1() 79 *mask++ = buf[x]; in pkcs_1_mgf1()
|
/optee_os-3.20.0/lib/libutils/ext/include/ |
A D | util.h | 177 static inline uint32_t get_field_u32(uint32_t reg, uint32_t mask) in get_field_u32() argument 179 return (reg & mask) / (mask & ~(mask - 1)); in get_field_u32() 182 static inline uint32_t set_field_u32(uint32_t reg, uint32_t mask, uint32_t val) in set_field_u32() argument 184 return (reg & ~mask) | (val * (mask & ~(mask - 1))); in set_field_u32() 187 static inline uint64_t get_field_u64(uint64_t reg, uint64_t mask) in get_field_u64() argument 189 return (reg & mask) / (mask & ~(mask - 1)); in get_field_u64() 192 static inline uint64_t set_field_u64(uint64_t reg, uint64_t mask, uint64_t val) in set_field_u64() argument 194 return (reg & ~mask) | (val * (mask & ~(mask - 1))); in set_field_u64()
|
/optee_os-3.20.0/lib/libutils/ext/ |
A D | consttime_memcmp.c | 41 volatile unsigned int mask = (1u << CHAR_BIT); in consttime_memcmp() local 44 isLT |= mask & in consttime_memcmp() 46 isGT |= mask & in consttime_memcmp() 48 mask &= ~(isLT | isGT); in consttime_memcmp()
|
/optee_os-3.20.0/core/drivers/ |
A D | stpmic1.c | 675 uint8_t mask = 0; in stpmic1_regulator_voltage_set() local 681 if (!mask) in stpmic1_regulator_voltage_set() 686 mask); in stpmic1_regulator_voltage_set() 733 if (!mask) in stpmic1_bo_voltage_cfg() 738 cfg->mask = mask; in stpmic1_bo_voltage_cfg() 814 if (!mask) in stpmic1_regulator_voltage_get() 923 if (!mask) in stpmic1_lp_set_voltage() 927 mask); in stpmic1_lp_set_voltage() 939 if (!mask) in stpmic1_lp_voltage_cfg() 946 cfg->mask = mask; in stpmic1_lp_voltage_cfg() [all …]
|
A D | gic.c | 276 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_add() local 279 io_write32(gd->gicd_base + GICD_ICENABLER(idx), mask); in gic_it_add() 281 io_write32(gd->gicd_base + GICD_ICPENDR(idx), mask); in gic_it_add() 329 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_enable() local 336 io_write32(base + GICD_ISENABLER(idx), mask); in gic_it_enable() 342 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_disable() local 354 uint32_t mask = BIT32(it % NUM_INTS_PER_REG); in gic_it_set_pending() local 360 io_write32(gd->gicd_base + GICD_ISPENDR(idx), mask); in gic_it_set_pending() 376 io_write32(gd->gicd_base + GICD_SGIR, mask); in gic_it_raise_sgi() 400 uint32_t mask = 1 << (it % NUM_INTS_PER_REG); in gic_it_is_enabled() local [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/ |
A D | copy_or_zeromem.c | 24 unsigned char mask = 0xff; /* initialize mask at all ones */ in copy_or_zeromem() local 31 mask *= 1 - coz; /* mask = ( coz ? 0 : 0xff ) */ in copy_or_zeromem() 43 dest[y] = src[y] & mask; in copy_or_zeromem() 49 mask = 0; in copy_or_zeromem()
|
/optee_os-3.20.0/lib/libunw/ |
A D | unwind_arm32.c | 209 uint32_t mask; in unwind_exec_insn() local 213 if (!unwind_exec_read_byte(state, &mask)) in unwind_exec_insn() 215 mask |= (insn & INSN_STD_DATA_MASK) << 8; in unwind_exec_insn() 218 if (mask == 0) in unwind_exec_insn() 225 for (reg = 4; mask && reg < 16; mask >>= 1, reg++) { in unwind_exec_insn() 226 if (mask & 1) { in unwind_exec_insn() 274 uint32_t mask; in unwind_exec_insn() local 277 if (!unwind_exec_read_byte(state, &mask)) in unwind_exec_insn() 279 if (mask == 0 || (mask & 0xf0) != 0) in unwind_exec_insn() 286 for (reg = 0; mask && reg < 4; mask >>= 1, reg++) { in unwind_exec_insn() [all …]
|
/optee_os-3.20.0/core/arch/arm/plat-rzn1/ |
A D | sm_platform_handler.c | 36 static uint32_t oem_sysreg(uint32_t addr, uint32_t mask, uint32_t *pvalue) in oem_sysreg() argument 47 if (mask) { in oem_sysreg() 49 mask &= auth->wmask; in oem_sysreg() 50 if (!reg || !mask) in oem_sysreg() 53 else if (mask == ~0UL) in oem_sysreg() 56 io_mask32(reg, *pvalue, mask); in oem_sysreg()
|
/optee_os-3.20.0/lib/libutils/ext/arch/arm/ |
A D | memtag.c | 94 size_t mask = dcsz - 1; in set_tags_dc_helper() local 97 if (va & mask) { in set_tags_dc_helper() 98 s = MIN(dcsz - (va & mask), size); in set_tags_dc_helper() 103 s = size & ~mask; in set_tags_dc_helper() 145 size_t mask = dcsz - 1; in clear_mem_dc() local 148 if (va & mask) { in clear_mem_dc() 149 s = MIN(dcsz - (va & mask), size); in clear_mem_dc() 154 s = size & ~mask; in clear_mem_dc()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305.c | 170 ulong32 mask; in poly1305_done() local 208 mask = (g4 >> 31) - 1; in poly1305_done() 209 g0 &= mask; in poly1305_done() 210 g1 &= mask; in poly1305_done() 211 g2 &= mask; in poly1305_done() 212 g3 &= mask; in poly1305_done() 213 g4 &= mask; in poly1305_done() 214 mask = ~mask; in poly1305_done() 215 h0 = (h0 & mask) | g0; in poly1305_done() 216 h1 = (h1 & mask) | g1; in poly1305_done() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/object_identifier/ |
A D | der_encode_object_identifier.c | 22 unsigned long i, x, y, z, t, mask, wordbuf; in der_encode_object_identifier() local 65 mask = 0; in der_encode_object_identifier() 67 out[x++] = (unsigned char)((t & 0x7F) | mask); in der_encode_object_identifier() 69 mask |= 0x80; /* upper bit is set on all but the last byte */ in der_encode_object_identifier()
|
/optee_os-3.20.0/core/include/ |
A D | io.h | 63 static inline void io_mask8(vaddr_t addr, uint8_t val, uint8_t mask) in io_mask8() argument 65 io_write8(addr, (io_read8(addr) & ~mask) | (val & mask)); in io_mask8() 68 static inline void io_mask16(vaddr_t addr, uint16_t val, uint16_t mask) in io_mask16() argument 70 io_write16(addr, (io_read16(addr) & ~mask) | (val & mask)); in io_mask16() 73 static inline void io_mask32(vaddr_t addr, uint32_t val, uint32_t mask) in io_mask32() argument 75 io_write32(addr, (io_read32(addr) & ~mask) | (val & mask)); in io_mask32()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/omac/ |
A D | omac_init.c | 23 int err, x, y, mask, msb, len; in omac_init() local 41 case 8: mask = 0x1B; in omac_init() 44 case 16: mask = 0x87; in omac_init() 71 omac->Lu[x][len - 1] = ((omac->Lu[x][len - 1] << 1) ^ (msb ? mask : 0)) & 255; in omac_init()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/ |
A D | rand_bn.c | 13 unsigned char *buf, mask; in rand_bn_bits() local 22 mask = 0xff >> (bits % 8 == 0 ? 0 : 8 - bits % 8); in rand_bn_bits() 33 buf[0] &= mask; in rand_bn_bits()
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/acipher/ |
A D | rsamgf.c | 22 uint8_t *cur_mask = mgf_data->mask.data; in drvcrypt_rsa_mgf1() 26 mgf_data->mask.length, mgf_data->seed.length); in drvcrypt_rsa_mgf1() 29 lastBlock_size = mgf_data->mask.length % mgf_data->digest_size; in drvcrypt_rsa_mgf1() 42 nbBlock = (mgf_data->mask.length - lastBlock_size) / in drvcrypt_rsa_mgf1()
|
/optee_os-3.20.0/core/drivers/imx/mu/ |
A D | imx_mu_8ulp.c | 24 static TEE_Result mu_wait_for(vaddr_t addr, uint32_t mask) in mu_wait_for() argument 28 while (!(io_read32(addr) & mask)) in mu_wait_for() 32 if (io_read32(addr) & mask) in mu_wait_for()
|
A D | imx_mu_8q.c | 29 static TEE_Result mu_wait_for(vaddr_t addr, uint32_t mask) in mu_wait_for() argument 33 while (!(io_read32(addr) & mask)) in mu_wait_for() 37 if (io_read32(addr) & mask) in mu_wait_for()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | constant_time.c | 144 const size_t mask = mbedtls_ct_size_mask( sub1 ); in mbedtls_ct_size_mask_lt() local 146 return( mask ); in mbedtls_ct_size_mask_lt() 261 unsigned mask = mbedtls_ct_uint_mask( condition ); in mbedtls_ct_uint_if() local 262 return( ( mask & if1 ) | (~mask & if0 ) ); in mbedtls_ct_uint_if() 292 const unsigned mask = condition << 1; in mbedtls_ct_cond_select_sign() local 295 unsigned ur = ( uif0 & ~mask ) | ( uif1 & mask ); in mbedtls_ct_cond_select_sign() 316 const mbedtls_mpi_uint mask = -condition; in mbedtls_ct_mpi_uint_cond_assign() local 323 dest[i] = ( src[i] & mask ) | ( dest[i] & ~mask ); in mbedtls_ct_mpi_uint_cond_assign() 417 const unsigned char mask = (unsigned char) mbedtls_ct_size_mask( equal ); in mbedtls_ct_memcpy_if_eq() local 421 dest[i] = ( src[i] & mask ) | ( dest[i] & ~mask ); in mbedtls_ct_memcpy_if_eq()
|