/optee_os/core/lib/libfdt/ |
A D | fdt_ro.c | 111 offset = fdt_next_node(fdt, offset, NULL); in fdt_find_max_phandle() 220 offset = fdt_next_node(fdt, offset, &depth)) in fdt_subnode_offset_namelen() 326 int offset; in fdt_first_property_offset() local 533 (offset >= 0) && (offset <= nodeoffset); in fdt_get_path() 534 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_get_path() 565 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_get_path() 585 (offset >= 0) && (offset <= nodeoffset); in fdt_supernode_atdepth_offset() 586 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_supernode_atdepth_offset() 647 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_prop_value() 674 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_phandle() [all …]
|
A D | fdt.c | 124 if (((offset + len) < offset) in fdt_offset_ptr() 165 offset += 4; in fdt_next_tag() 186 if ((offset < 0) || (offset % FDT_TAGSIZE) in fdt_check_node_offset_() 190 return offset; in fdt_check_node_offset_() 195 if ((offset < 0) || (offset % FDT_TAGSIZE) in fdt_check_prop_offset_() 196 || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP)) in fdt_check_prop_offset_() 199 return offset; in fdt_check_prop_offset_() 239 return offset; in fdt_next_node() 246 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode() 250 return offset; in fdt_first_subnode() [all …]
|
A D | fdt_sw.c | 92 int offset = fdt_size_dt_struct(fdt); in fdt_grab_space_() local 98 if ((offset + len < offset) || (offset + len > spaceleft)) in fdt_grab_space_() 183 int offset; in fdt_add_reservemap_entry() local 187 offset = fdt_off_dt_struct(fdt); in fdt_add_reservemap_entry() 247 int struct_top, offset; in fdt_add_string_() local 249 offset = -strtabsize - len; in fdt_add_string_() 254 memcpy(strtab + offset, s, len); in fdt_add_string_() 256 return offset; in fdt_add_string_() 335 int offset, nextoffset; in fdt_finish() local 352 offset = 0; in fdt_finish() [all …]
|
A D | libfdt_internal.h | 21 int fdt_check_node_offset_(const void *fdt, int offset); 22 int fdt_check_prop_offset_(const void *fdt, int offset); 26 static inline const void *fdt_offset_ptr_(const void *fdt, int offset) in fdt_offset_ptr_() argument 28 return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; in fdt_offset_ptr_() 31 static inline void *fdt_offset_ptr_w_(void *fdt, int offset) in fdt_offset_ptr_w_() argument 33 return (void *)(uintptr_t)fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr_w_()
|
A D | fdt_wip.c | 73 int fdt_node_end_offset_(void *fdt, int offset) in fdt_node_end_offset_() argument 77 while ((offset >= 0) && (depth >= 0)) in fdt_node_end_offset_() 78 offset = fdt_next_node(fdt, offset, &depth); in fdt_node_end_offset_() 80 return offset; in fdt_node_end_offset_()
|
/optee_os/core/drivers/ |
A D | pl061_gpio.c | 48 unsigned int offset; in pl061_get_direction() local 55 if (data & BIT(offset)) in pl061_get_direction() 64 unsigned int offset; in pl061_set_direction() local 88 unsigned int offset; in pl061_get_value() local 108 unsigned int offset; in pl061_set_value() local 115 io_write8(base_addr + BIT(offset + 2), BIT(offset)); in pl061_set_value() 125 unsigned int offset; in pl061_get_interrupt() local 132 if (data & BIT(offset)) in pl061_get_interrupt() 142 unsigned int offset; in pl061_set_interrupt() local 191 unsigned int offset; in pl061_get_mode_control() local [all …]
|
A D | stm32_etzpc.c | 105 size_t offset = 4U * (decprot_id / IDS_PER_DECPROT_REGS); in etzpc_configure_decprot() local 112 io_clrsetbits32(base + ETZPC_DECPROT0 + offset, in etzpc_configure_decprot() 126 size_t offset = 4U * (decprot_id / IDS_PER_DECPROT_REGS); in etzpc_get_decprot() local 147 io_write32(base + offset + ETZPC_DECPROT_LOCK0, mask); in etzpc_lock_decprot() 166 size_t offset = sizeof(uint32_t) * tzma_id; in etzpc_configure_tzma() local 171 io_write32(base + ETZPC_TZMA0_SIZE + offset, tzma_value); in etzpc_configure_tzma() 181 size_t offset = sizeof(uint32_t) * tzma_id; in etzpc_get_tzma() local 186 return io_read32(base + ETZPC_TZMA0_SIZE + offset); in etzpc_get_tzma() 191 size_t offset = sizeof(uint32_t) * tzma_id; in etzpc_lock_tzma() local 204 size_t offset = sizeof(uint32_t) * tzma_id; in etzpc_get_lock_tzma() local [all …]
|
A D | bcm_gpio.c | 59 unsigned int offset = IPROC_GPIO_REG(gpio, reg); in iproc_set_bit() local 64 io_setbits32(gc->base + offset, BIT(shift)); in iproc_set_bit() 69 unsigned int offset = IPROC_GPIO_REG(gpio, reg); in iproc_clr_bit() local 74 io_clrbits32(gc->base + offset, BIT(shift)); in iproc_clr_bit() 89 unsigned int offset = IPROC_GPIO_REG(gpio, IPROC_GPIO_DATA_IN_OFFSET); in iproc_gpio_get() local 95 if (io_read32(gc->base + offset) & BIT(shift)) in iproc_gpio_get() 113 unsigned int offset = IPROC_GPIO_REG(gpio, IPROC_GPIO_OUT_EN_OFFSET); in iproc_gpio_get_dir() local 119 if (io_read32(gc->base + offset) & BIT(shift)) in iproc_gpio_get_dir() 128 unsigned int offset = IPROC_GPIO_REG(gpio, IPROC_GPIO_INT_MSK_OFFSET); in iproc_gpio_get_itr() local 134 if (io_read32(gc->base + offset) & BIT(shift)) in iproc_gpio_get_itr()
|
A D | zynqmp_pm.c | 70 uint32_t offset; member 79 .offset = ZYNQMP_EFUSE_##__x##_OFFSET, \ 84 uint32_t offset; member 117 efuse.offset = efuse_tbl[id].offset; in efuse_op()
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | chacha20.c | 255 size_t offset = 0U; in mbedtls_chacha20_update() local 265 output[offset] = input[offset] in mbedtls_chacha20_update() 269 offset++; in mbedtls_chacha20_update() 282 output[offset + i ] = input[offset + i ] ^ ctx->keystream8[i ]; in mbedtls_chacha20_update() 283 output[offset + i+1] = input[offset + i+1] ^ ctx->keystream8[i+1]; in mbedtls_chacha20_update() 284 output[offset + i+2] = input[offset + i+2] ^ ctx->keystream8[i+2]; in mbedtls_chacha20_update() 285 output[offset + i+3] = input[offset + i+3] ^ ctx->keystream8[i+3]; in mbedtls_chacha20_update() 286 output[offset + i+4] = input[offset + i+4] ^ ctx->keystream8[i+4]; in mbedtls_chacha20_update() 287 output[offset + i+5] = input[offset + i+5] ^ ctx->keystream8[i+5]; in mbedtls_chacha20_update() 288 output[offset + i+6] = input[offset + i+6] ^ ctx->keystream8[i+6]; in mbedtls_chacha20_update() [all …]
|
A D | poly1305.c | 110 size_t offset = 0U; in poly1305_process() local 132 d0 = BYTES_TO_U32_LE( input, offset + 0 ); in poly1305_process() 133 d1 = BYTES_TO_U32_LE( input, offset + 4 ); in poly1305_process() 134 d2 = BYTES_TO_U32_LE( input, offset + 8 ); in poly1305_process() 135 d3 = BYTES_TO_U32_LE( input, offset + 12 ); in poly1305_process() 192 offset += POLY1305_BLOCK_SIZE_BYTES; in poly1305_process() 328 size_t offset = 0U; in mbedtls_poly1305_update() local 363 offset += queue_free_len; in mbedtls_poly1305_update() 372 poly1305_process( ctx, nblocks, &input[offset], 1U ); in mbedtls_poly1305_update() 374 offset += nblocks * POLY1305_BLOCK_SIZE_BYTES; in mbedtls_poly1305_update() [all …]
|
/optee_os/core/arch/arm/plat-imx/drivers/ |
A D | imx_csu.c | 102 vaddr_t offset; in csu_init() local 126 for (offset = CSU_CSL_START; offset < CSU_CSL_END; offset += 4) in csu_init() 127 io_write32(csu_base + offset, CSU_ACCESS_ALL); in csu_init() 142 for (offset = CSU_CSL_START; offset < CSU_CSL_END; offset += 4) { in csu_init() 143 io_write32(csu_base + offset, in csu_init() 144 io_read32(csu_base + offset) | CSU_SETTING_LOCK); in csu_init()
|
/optee_os/core/arch/arm/mm/ |
A D | tee_mm.c | 63 pool->entry->offset = ((size - 1) >> shift) + 1; in tee_mm_init() 168 (entry->offset - entry->next->offset - in tee_mm_alloc() 173 (entry->next->offset - entry->size - entry->offset)) in tee_mm_alloc() 189 if ((entry->offset << pool->shift) < size) { in tee_mm_alloc() 211 nn->offset = entry->offset - psize; in tee_mm_alloc() 213 nn->offset = entry->offset + entry->size; in tee_mm_alloc() 231 if (offshi > e->offset || in fit_in_gap() 238 if (offslo < (e->offset + e->size) || in fit_in_gap() 290 mm->offset = offslo; in tee_mm_alloc2() 379 if ((offset >= entry->offset) && in tee_mm_find() [all …]
|
/optee_os/core/arch/arm/plat-stm32mp1/drivers/ |
A D | stm32mp1_rcc.c | 38 size_t offset = reset_id2reg_offset(id); in stm32_reset_assert() local 42 io_write32(rcc_base + offset, bitmsk); in stm32_reset_assert() 47 while (!(io_read32(rcc_base + offset) & bitmsk)) in stm32_reset_assert() 51 if (!(io_read32(rcc_base + offset) & bitmsk)) in stm32_reset_assert() 60 size_t offset = reset_id2reg_offset(id) + RCC_MP_RSTCLRR_OFFSET; in stm32_reset_deassert() local 64 io_write32(rcc_base + offset, bitmsk); in stm32_reset_deassert() 69 while ((io_read32(rcc_base + offset) & bitmsk)) in stm32_reset_deassert() 73 if (io_read32(rcc_base + offset) & bitmsk) in stm32_reset_deassert()
|
/optee_os/core/arch/arm/plat-bcm/ |
A D | bcm_elog.c | 14 uint32_t offset = 0, len = 0; in bcm_elog_putchar() local 19 offset = io_read32(base + BCM_ELOG_OFF_OFFSET); in bcm_elog_putchar() 21 io_write8(base + offset, ch); in bcm_elog_putchar() 22 offset++; in bcm_elog_putchar() 25 if (offset >= elog->max_size) in bcm_elog_putchar() 26 offset = BCM_ELOG_HEADER_LEN; in bcm_elog_putchar() 32 io_write32(base + BCM_ELOG_OFF_OFFSET, offset); in bcm_elog_putchar()
|
/optee_os/core/drivers/crypto/caam/utils/ |
A D | utils_sgt_v1.c | 26 SGT_TRACE("SGT[%d]->offset = %" PRIx32, idx, sgt->sgt[idx].v1.offset); in sgt_entry_trace() 29 void sgt_entry_offset(union caamsgt *sgt, unsigned int offset) in sgt_entry_offset() argument 36 len_f_e = (ENTRY_LEN(len_f_e) - offset) | (len_f_e & BS_ENTRY_FINAL); in sgt_entry_offset() 39 caam_write_val32(&sgt->v1.offset, offset); in sgt_entry_offset() 43 unsigned int offset, bool final_e) in caam_sgt_set_entry() argument 59 caam_write_val32(&sgt->v1.offset, offset); in caam_sgt_set_entry()
|
A D | utils_sgt_v2.c | 23 void sgt_entry_offset(union caamsgt *sgt, unsigned int offset) in sgt_entry_offset() argument 36 off += offset; in sgt_entry_offset() 40 len = (offset > len) ? 0 : len - offset; in sgt_entry_offset() 46 w2 |= BV_SGT_V2_OFFSET(offset) | BV_SGT_V2_AVAIL_LENGTH(len); in sgt_entry_offset() 52 unsigned int offset, bool final_e) in caam_sgt_set_entry() argument 60 w2 = (final_e ? BM_SGT_V2_F : 0) | BV_SGT_V2_OFFSET(offset) | in caam_sgt_set_entry()
|
A D | utils_mem.c | 199 struct caambuf *src, size_t offset) in caam_cpy_block_src() argument 221 cpy_size = MIN(cpy_size, src->length - offset); in caam_cpy_block_src() 223 memcpy(&block->buf.data[block->filled], &src->data[offset], cpy_size); in caam_cpy_block_src() 331 size_t offset = 0; in caam_mem_cpy_ltrim_buf() local 335 while (!src->data[offset] && offset < src->length) in caam_mem_cpy_ltrim_buf() 336 offset++; in caam_mem_cpy_ltrim_buf() 338 if (offset >= src->length) in caam_mem_cpy_ltrim_buf() 339 offset = src->length - 1; in caam_mem_cpy_ltrim_buf() 341 cpy_size = MIN(dst->length, (src->length - offset)); in caam_mem_cpy_ltrim_buf() 343 src->length, offset); in caam_mem_cpy_ltrim_buf() [all …]
|
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
A D | der_decode_asn1_length.c | 27 unsigned long real_len, decoded_len, offset, i; in der_decode_asn1_length() local 40 offset = 1; in der_decode_asn1_length() 53 offset = 1 + real_len; in der_decode_asn1_length() 60 if (decoded_len > (*inlen - offset)) return CRYPT_OVERFLOW; in der_decode_asn1_length() 61 *inlen = offset; in der_decode_asn1_length()
|
/optee_os/core/pta/bcm/ |
A D | elog.c | 63 uint32_t offset = 0; in pta_elog_load_nitro_fw() local 83 offset = params[1].value.a; in pta_elog_load_nitro_fw() 91 if (ADD_OVERFLOW(sz, offset, &end_offs) || in pta_elog_load_nitro_fw() 97 src_vaddr = (vaddr_t)phys_to_virt((uintptr_t)src_paddr + offset, in pta_elog_load_nitro_fw() 142 uint32_t offset = 0; in pta_elog_nitro_crash_dump() local 154 offset = params[1].value.a; in pta_elog_nitro_crash_dump() 160 if (offset > MAX_NITRO_CRASH_DUMP_MEM_SIZE - DEFAULT_ELOG_BUFFER_SIZE) { in pta_elog_nitro_crash_dump() 166 src_vaddr = (vaddr_t)phys_to_virt((uintptr_t)src_paddr + offset, in pta_elog_nitro_crash_dump()
|
/optee_os/lib/libmbedtls/core/ |
A D | rsa.c | 251 unsigned long offset = 0; in crypto_acipher_rsanopad_encrypt() local 279 offset = 0; in crypto_acipher_rsanopad_encrypt() 280 while ((offset < rsa.len - 1) && (buf[offset] == 0)) in crypto_acipher_rsanopad_encrypt() 281 offset++; in crypto_acipher_rsanopad_encrypt() 284 *dst_len = rsa.len - offset; in crypto_acipher_rsanopad_encrypt() 288 *dst_len = rsa.len - offset; in crypto_acipher_rsanopad_encrypt() 309 unsigned long offset = 0; in crypto_acipher_rsanopad_decrypt() local 332 offset = 0; in crypto_acipher_rsanopad_decrypt() 333 while ((offset < rsa.len - 1) && (buf[offset] == 0)) in crypto_acipher_rsanopad_decrypt() 334 offset++; in crypto_acipher_rsanopad_decrypt() [all …]
|
/optee_os/core/kernel/ |
A D | console.c | 45 int offset = 0; in find_chosen_node() local 50 offset = fdt_path_offset(fdt, "/secure-chosen"); in find_chosen_node() 52 if (offset < 0) in find_chosen_node() 53 offset = fdt_path_offset(fdt, "/chosen"); in find_chosen_node() 55 return offset; in find_chosen_node()
|
/optee_os/core/drivers/clk/sam/ |
A D | at91_peripheral.c | 63 io_write32(periph->base + periph->layout->offset, in clk_sam9x5_peripheral_enable() 65 io_clrsetbits32(periph->base + periph->layout->offset, in clk_sam9x5_peripheral_enable() 82 io_write32(periph->base + periph->layout->offset, in clk_sam9x5_peripheral_disable() 84 io_clrsetbits32(periph->base + periph->layout->offset, in clk_sam9x5_peripheral_disable() 99 io_write32(periph->base + periph->layout->offset, in clk_sam9x5_peripheral_get_rate() 101 status = io_read32(periph->base + periph->layout->offset); in clk_sam9x5_peripheral_get_rate()
|
A D | at91_generated.c | 35 io_write32(gck->base + gck->layout->offset, in clk_generated_enable() 37 io_clrsetbits32(gck->base + gck->layout->offset, in clk_generated_enable() 53 io_write32(gck->base + gck->layout->offset, in clk_generated_disable() 55 io_clrsetbits32(gck->base + gck->layout->offset, AT91_PMC_PCR_GCKEN, in clk_generated_disable() 130 io_write32(gck->base + gck->layout->offset, in clk_generated_startup() 132 tmp = io_read32(gck->base + gck->layout->offset); in clk_generated_startup()
|
/optee_os/core/drivers/crypto/se050/core/ |
A D | rsa.c | 286 size_t offset = 0; in decrypt_nopad() local 320 offset = 0; in decrypt_nopad() 321 while ((offset < blen - 1) && (buf[offset] == 0)) in decrypt_nopad() 322 offset++; in decrypt_nopad() 325 *dst_len = blen - offset; in decrypt_nopad() 330 *dst_len = blen - offset; in decrypt_nopad() 350 size_t offset = 0; in encrypt_nopad() local 382 offset = 0; in encrypt_nopad() 383 while ((offset < blen - 1) && (buf[offset] == 0)) in encrypt_nopad() 384 offset++; in encrypt_nopad() [all …]
|