Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 169) sorted by relevance

1234567

/optee_os/core/lib/libfdt/
H A Dfdt.c114 const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int len) in fdt_offset_ptr() argument
116 unsigned absoffset = offset + fdt_off_dt_struct(fdt); in fdt_offset_ptr()
118 if ((absoffset < offset) in fdt_offset_ptr()
124 if (((offset + len) < offset) in fdt_offset_ptr()
125 || ((offset + len) > fdt_size_dt_struct(fdt))) in fdt_offset_ptr()
128 return fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr()
135 int offset = startoffset; in fdt_next_tag() local
139 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE); in fdt_next_tag()
143 offset += FDT_TAGSIZE; in fdt_next_tag()
150 p = fdt_offset_ptr(fdt, offset++, 1); in fdt_next_tag()
[all …]
H A Dfdt_ro.c14 static int fdt_nodename_eq_(const void *fdt, int offset, in fdt_nodename_eq_() argument
18 const char *p = fdt_get_name(fdt, offset, &olen); in fdt_nodename_eq_()
107 int offset = -1; in fdt_find_max_phandle() local
112 offset = fdt_next_node(fdt, offset, NULL); in fdt_find_max_phandle()
113 if (offset < 0) { in fdt_find_max_phandle()
114 if (offset == -FDT_ERR_NOTFOUND) in fdt_find_max_phandle()
117 return offset; in fdt_find_max_phandle()
120 value = fdt_get_phandle(fdt, offset); in fdt_find_max_phandle()
152 int offset = n * sizeof(struct fdt_reserve_entry); in fdt_mem_rsv() local
153 int absoffset = fdt_off_mem_rsvmap(fdt) + offset; in fdt_mem_rsv()
[all …]
H A Dfdt_sw.c92 int offset = fdt_size_dt_struct(fdt); in fdt_grab_space_() local
98 if ((offset + len < offset) || (offset + len > spaceleft)) in fdt_grab_space_()
101 fdt_set_size_dt_struct(fdt, offset + len); in fdt_grab_space_()
102 return fdt_offset_ptr_w_(fdt, offset); 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()
188 if ((offset + sizeof(*re)) > fdt_totalsize(fdt)) in fdt_add_reservemap_entry()
191 re = (struct fdt_reserve_entry *)((char *)fdt + offset); in fdt_add_reservemap_entry()
195 fdt_set_off_dt_struct(fdt, offset + sizeof(*re)); in fdt_add_reservemap_entry()
247 int struct_top, offset; in fdt_add_string_() local
[all …]
H A Dlibfdt_internal.h21 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_()
H A Dfdt_wip.c73 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/lib/libmbedtls/mbedtls/library/
H A Dalignment.h412 #define MBEDTLS_GET_UINT32_BE(data, offset) \ argument
414 ? mbedtls_get_unaligned_uint32((data) + (offset)) \
415 : MBEDTLS_BSWAP32(mbedtls_get_unaligned_uint32((data) + (offset))) \
427 #define MBEDTLS_PUT_UINT32_BE(n, data, offset) \ argument
431 mbedtls_put_unaligned_uint32((data) + (offset), (uint32_t) (n)); \
435 mbedtls_put_unaligned_uint32((data) + (offset), MBEDTLS_BSWAP32((uint32_t) (n))); \
448 #define MBEDTLS_GET_UINT32_LE(data, offset) \ argument
450 ? MBEDTLS_BSWAP32(mbedtls_get_unaligned_uint32((data) + (offset))) \
451 : mbedtls_get_unaligned_uint32((data) + (offset)) \
464 #define MBEDTLS_PUT_UINT32_LE(n, data, offset) \ argument
[all …]
H A Dchacha20.c135 size_t offset = i * 4U; in chacha20_block() local
137 MBEDTLS_PUT_UINT32_LE(working_state[i], keystream, offset); in chacha20_block()
206 size_t offset = 0U; in mbedtls_chacha20_update() local
210 output[offset] = input[offset] in mbedtls_chacha20_update()
214 offset++; in mbedtls_chacha20_update()
224 mbedtls_xor(output + offset, input + offset, ctx->keystream8, 64U); in mbedtls_chacha20_update()
226 offset += CHACHA20_BLOCK_SIZE_BYTES; in mbedtls_chacha20_update()
236 mbedtls_xor(output + offset, input + offset, ctx->keystream8, size); in mbedtls_chacha20_update()
H A Dccm.c124 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument
143 mbedtls_xor(output, input, tmp_buf + offset, use_len); in mbedtls_ccm_crypt()
295 size_t use_len, offset; in mbedtls_ccm_update_ad() local
323 offset = (ctx->processed + 2) % 16; /* account for y[0] and y[1] in mbedtls_ccm_update_ad()
325 use_len = 16 - offset; in mbedtls_ccm_update_ad()
331 mbedtls_xor(ctx->y + offset, ctx->y + offset, add, use_len); in mbedtls_ccm_update_ad()
337 if (use_len + offset == 16 || ctx->processed == ctx->add_len) { in mbedtls_ccm_update_ad()
366 size_t use_len, offset; in mbedtls_ccm_update() local
392 offset = ctx->processed % 16; in mbedtls_ccm_update()
394 use_len = 16 - offset; in mbedtls_ccm_update()
[all …]
/optee_os/core/drivers/
H A Dpl061_gpio.c48 unsigned int offset; in pl061_get_direction() local
53 offset = gpio_pin % GPIOS_PER_PL061; in pl061_get_direction()
55 if (data & BIT(offset)) in pl061_get_direction()
64 unsigned int offset; in pl061_set_direction() local
69 offset = gpio_pin % GPIOS_PER_PL061; in pl061_set_direction()
71 io_setbits8(base_addr + GPIODIR, BIT(offset)); in pl061_set_direction()
73 io_clrbits8(base_addr + GPIODIR, BIT(offset)); in pl061_set_direction()
88 unsigned int offset; in pl061_get_value() local
93 offset = gpio_pin % GPIOS_PER_PL061; in pl061_get_value()
94 if (io_read8(base_addr + BIT(offset + 2))) in pl061_get_value()
[all …]
H A Dimx_csu.c105 vaddr_t offset; in csu_configure() local
129 for (offset = CSU_CSL_START; offset < CSU_CSL_END; offset += 4) in csu_configure()
130 io_write32(csu_base + offset, CSU_ACCESS_ALL); in csu_configure()
145 for (offset = CSU_CSL_START; offset < CSU_CSL_END; offset += 4) { in csu_configure()
146 io_write32(csu_base + offset, in csu_configure()
147 io_read32(csu_base + offset) | CSU_SETTING_LOCK); in csu_configure()
H A Datmel_rtc.c98 static uint32_t atmel_rtc_read(unsigned int offset) in atmel_rtc_read() argument
100 return io_read32(rtc_base + offset); in atmel_rtc_read()
103 static void atmel_rtc_write(unsigned int offset, uint32_t val) in atmel_rtc_write() argument
105 return io_write32(rtc_base + offset, val); in atmel_rtc_write()
200 static TEE_Result atmel_rtc_get_offset(struct rtc *rtc __unused, long *offset) in atmel_rtc_get_offset() argument
206 *offset = 0; in atmel_rtc_get_offset()
220 *offset = val; in atmel_rtc_get_offset()
225 static TEE_Result atmel_rtc_set_offset(struct rtc *rtc __unused, long offset) in atmel_rtc_set_offset() argument
230 if (offset > ATMEL_RTC_CORR_DIVIDEND / 2) in atmel_rtc_set_offset()
232 if (offset < -ATMEL_RTC_CORR_DIVIDEND / 2) in atmel_rtc_set_offset()
[all …]
H A Dbcm_gpio.c59 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()
/optee_os/core/drivers/rstctrl/
H A Dstm32mp1_rstctrl.c26 size_t offset = (id & RESET_ID_MASK) >> RESET_ID_SHIFT; in reset_id2reg_offset() local
28 assert(offset < RESET_OFFSET_MAX); in reset_id2reg_offset()
29 return offset * sizeof(uint32_t); in reset_id2reg_offset()
45 size_t offset = 0; in reset_assert() local
66 offset = reset_id2reg_offset(id); in reset_assert()
69 io_write32(rcc_base + offset, bit_mask); in reset_assert()
74 if (IO_READ32_POLL_TIMEOUT(rcc_base + offset, value, in reset_assert()
90 size_t offset = 0; in reset_deassert() local
110 offset = reset_id2reg_offset(id) + RCC_MP_RSTCLRR_OFFSET; in reset_deassert()
113 io_write32(rcc_base + offset, bit_mask); in reset_deassert()
[all …]
/optee_os/core/arch/arm/plat-bcm/
H A Dbcm_elog.c14 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/
H A Dutils_sgt_v1.c26 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()
H A Dutils_sgt_v2.c23 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()
H A Dutils_mem.c200 struct caambuf *src, size_t offset) in caam_cpy_block_src() argument
222 cpy_size = MIN(cpy_size, src->length - offset); in caam_cpy_block_src()
224 memcpy(&block->buf.data[block->filled], &src->data[offset], cpy_size); in caam_cpy_block_src()
367 size_t offset = 0; in caam_mem_cpy_ltrim_buf() local
371 while (!src->data[offset] && offset < src->length) in caam_mem_cpy_ltrim_buf()
372 offset++; in caam_mem_cpy_ltrim_buf()
374 if (offset >= src->length) in caam_mem_cpy_ltrim_buf()
375 offset = src->length - 1; in caam_mem_cpy_ltrim_buf()
377 cpy_size = MIN(dst->length, (src->length - offset)); in caam_mem_cpy_ltrim_buf()
379 src->length, offset); in caam_mem_cpy_ltrim_buf()
[all …]
/optee_os/core/mm/
H A Dtee_mm.c44 pool->entry->offset = ((size - 1) >> shift) + 1; in tee_mm_init()
153 (entry->offset - entry->next->offset - in tee_mm_alloc_flags()
158 (entry->next->offset - entry->size - entry->offset)) in tee_mm_alloc_flags()
174 if ((entry->offset << pool->shift) < size) { in tee_mm_alloc_flags()
183 remaining -= ((entry->offset + entry->size) << in tee_mm_alloc_flags()
196 nn->offset = entry->offset - psize; in tee_mm_alloc_flags()
198 nn->offset = entry->offset + entry->size; in tee_mm_alloc_flags()
216 if (offshi > e->offset || in fit_in_gap()
218 (offslo < e->next->offset + e->next->size)) || in fit_in_gap()
223 if (offslo < (e->offset + e->size) || in fit_in_gap()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/
H A Dder_decode_asn1_length.c20 unsigned long real_len, decoded_len, offset, i; in der_decode_asn1_length() local
33 offset = 1; in der_decode_asn1_length()
46 offset = 1 + real_len; in der_decode_asn1_length()
53 if (decoded_len > (*inlen - offset)) return CRYPT_OVERFLOW; in der_decode_asn1_length()
54 *inlen = offset; in der_decode_asn1_length()
/optee_os/core/arch/arm/plat-telechips/drivers/
H A Dtcc_otp.c74 TEE_Result tcc_otp_read_128(uint32_t offset, uint32_t *buf) in tcc_otp_read_128() argument
80 if (!IS_16BYTE_ALIGNED(offset) || offset >= OTPROM_128_LIMIT || in tcc_otp_read_128()
81 offset < OTPROM_128_START || !buf || !reg) { in tcc_otp_read_128()
87 io_write32(reg + OTP_ADDRESS, offset); in tcc_otp_read_128()
112 TEE_Result tcc_otp_write_128(uint32_t offset, const uint32_t *buf) in tcc_otp_write_128() argument
117 if (!IS_16BYTE_ALIGNED(offset) || offset >= OTPROM_128_LIMIT || in tcc_otp_write_128()
118 offset < OTPROM_128_START || !buf || !reg) { in tcc_otp_write_128()
130 io_write32(reg + OTP_ADDRESS, offset); in tcc_otp_write_128()
/optee_os/core/drivers/qcom/ramblur/
H A Dramblur_pimem_v3.c29 static inline uint16_t in_word(uint32_t offset) in in_word() argument
31 return io_read16(ramblur_va + (vaddr_t)offset); in in_word()
34 static inline uint32_t in_dword(uint32_t offset) in in_dword() argument
36 return io_read32(ramblur_va + (vaddr_t)offset); in in_dword()
39 static inline void out_dword(uint32_t offset, uint32_t val) in out_dword() argument
41 io_write32(ramblur_va + (vaddr_t)offset, val); in out_dword()
44 static inline uint32_t in_dword_masked(uint32_t offset, uint32_t mask) in in_dword_masked() argument
46 return in_dword(offset) & mask; in in_dword_masked()
49 static inline void out_dword_masked_ns(uint32_t offset, uint32_t mask, in out_dword_masked_ns() argument
55 out_dword(offset, new_val); in out_dword_masked_ns()
[all …]
/optee_os/core/pta/bcm/
H A Delog.c63 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/core/drivers/amd/
H A Dps_gpio_driver.c57 uint32_t offset = 0; in ps_gpio_set_value() local
65 offset = DATA_LSW_OFFSET(bank); in ps_gpio_set_value()
68 offset = DATA_MSW_OFFSET(bank); in ps_gpio_set_value()
80 io_write32(ps->vbase + offset, lvl); in ps_gpio_set_value()
147 uint32_t offset = 0; in ps_gpio_set_intr() local
161 offset = INTEN_OFFSET(bank); in ps_gpio_set_intr()
163 offset = INTDIS_OFFSET(bank); in ps_gpio_set_intr()
170 io_setbits32(ps->vbase + offset, BIT(pin)); in ps_gpio_set_intr()
/optee_os/core/drivers/pm/imx/
H A Dgpcv2.c23 static void imx_gpcv2_set_core_pgc(bool enable, uint32_t offset) in imx_gpcv2_set_core_pgc() argument
28 io_setbits32(va + offset, GPC_PGC_PCG_MASK); in imx_gpcv2_set_core_pgc()
30 io_clrbits32(va + offset, GPC_PGC_PCG_MASK); in imx_gpcv2_set_core_pgc()
/optee_os/core/drivers/crypto/caam/hal/common/
H A Dhal_cfg.c52 if (!jrcfg->offset) { in caam_hal_cfg_get_conf()
53 jrcfg->offset = (CFG_JR_INDEX + 1) * JRX_BLOCK_SIZE; in caam_hal_cfg_get_conf()
70 caam_hal_jr_prepare_backup(jrcfg->base, jrcfg->offset); in caam_hal_cfg_get_conf()
104 if (jr_offset == jrcfg->offset) { in caam_hal_cfg_setup_nsjobring()

1234567