Home
last modified time | relevance | path

Searched refs:shift (Results 1 – 25 of 40) sorted by relevance

12

/optee_os/lib/libutils/isoc/arch/arm/
H A Darm32_aeabi_shift.c11 long long __aeabi_llsl(long long a, int shift);
12 long long __aeabi_llsl(long long a, int shift) in __aeabi_llsl() argument
18 if (shift >= 32) { in __aeabi_llsl()
19 hi = lo << (shift - 32); in __aeabi_llsl()
21 } else if (shift > 0) { in __aeabi_llsl()
22 hi = (hi << shift) | (lo >> (32 - shift)); in __aeabi_llsl()
23 lo = lo << shift; in __aeabi_llsl()
31 long long __aeabi_llsr(long long a, int shift);
32 long long __aeabi_llsr(long long a, int shift) in __aeabi_llsr() argument
38 if (shift >= 32) { in __aeabi_llsr()
[all …]
/optee_os/core/arch/arm/plat-rockchip/
H A Dcommon.h23 #define BITS_WMSK(msk, shift) SHIFT_U32(msk, (shift) + REG_MSK_SHIFT) argument
24 #define BITS_WITH_WMASK(bits, msk, shift) \ argument
25 (SHIFT_U32(bits, shift) | BITS_WMSK(msk, shift))
/optee_os/core/drivers/clk/sam/
H A Dat91_peripheral.c35 int shift = 0; in clk_sam9x5_peripheral_autodiv() local
46 for (shift = 0; shift < PERIPHERAL_MAX_SHIFT; shift++) { in clk_sam9x5_peripheral_autodiv()
47 if (parent_rate >> shift <= periph->range.max) in clk_sam9x5_peripheral_autodiv()
53 periph->div = shift; in clk_sam9x5_peripheral_autodiv()
117 unsigned int shift = 0; in clk_sam9x5_peripheral_set_rate() local
130 for (shift = 0; shift <= PERIPHERAL_MAX_SHIFT; shift++) { in clk_sam9x5_peripheral_set_rate()
131 if (parent_rate >> shift == rate) { in clk_sam9x5_peripheral_set_rate()
133 periph->div = shift; in clk_sam9x5_peripheral_set_rate()
H A Dat91_programmable.c99 int shift = 0; in clk_programmable_set_rate() local
105 shift = div - 1; in clk_programmable_set_rate()
107 if (shift > layout->pres_mask) in clk_programmable_set_rate()
110 shift = flsi(div) - 1; in clk_programmable_set_rate()
112 if (div != (1ULL << shift)) in clk_programmable_set_rate()
115 if (shift >= layout->pres_mask) in clk_programmable_set_rate()
121 shift << layout->pres_shift); in clk_programmable_set_rate()
/optee_os/core/drivers/
H A Dbcm_gpio.c60 unsigned int shift = IPROC_GPIO_SHIFT(gpio); in iproc_set_bit() local
64 io_setbits32(gc->base + offset, BIT(shift)); in iproc_set_bit()
70 unsigned int shift = IPROC_GPIO_SHIFT(gpio); in iproc_clr_bit() local
74 io_clrbits32(gc->base + offset, BIT(shift)); in iproc_clr_bit()
90 unsigned int shift = IPROC_GPIO_SHIFT(gpio); in iproc_gpio_get() local
95 if (io_read32(gc->base + offset) & BIT(shift)) in iproc_gpio_get()
114 unsigned int shift = IPROC_GPIO_SHIFT(gpio); in iproc_gpio_get_dir() local
119 if (io_read32(gc->base + offset) & BIT(shift)) in iproc_gpio_get_dir()
129 unsigned int shift = IPROC_GPIO_SHIFT(gpio); in iproc_gpio_get_itr() local
134 if (io_read32(gc->base + offset) & BIT(shift)) in iproc_gpio_get_itr()
[all …]
/optee_os/core/mm/
H A Dtee_mm.c16 uint8_t shift, uint32_t flags) in tee_mm_init() argument
24 lo = ROUNDUP2(lo, 1 << shift); in tee_mm_init()
26 size = ROUNDDOWN2(size - rounded, 1 << shift); in tee_mm_init()
28 assert(((uint64_t)size >> shift) < (uint64_t)UINT32_MAX); in tee_mm_init()
33 .shift = shift, in tee_mm_init()
44 pool->entry->offset = ((size - 1) >> shift) + 1; in tee_mm_init()
85 return sz << pool->shift; in tee_mm_stats_allocated()
148 psize = ((size - 1) >> pool->shift) + 1; in tee_mm_alloc_flags()
174 if ((entry->offset << pool->shift) < size) { in tee_mm_alloc_flags()
184 pool->shift); in tee_mm_alloc_flags()
[all …]
H A Dcore_mmu.c999 va += BIT64(tbl_info.shift); in dump_xlat_table()
1870 pa += BIT64(tbl_info->shift); in set_region()
1922 size_t granule = BIT(pg_info->shift); in set_pg_region()
1999 block_size = BIT64(tbl_info.shift); in core_mmu_map_region()
2081 if (tbl_info.shift == SMALL_PAGE_SHIFT) in core_mmu_map_pages()
2154 if (tbl_info.shift == SMALL_PAGE_SHIFT) in core_mmu_map_contiguous_pages()
2263 if (tbl_info.shift != SMALL_PAGE_SHIFT) in core_mmu_unmap_pages()
2326 granule = BIT(tbl_info.shift); in core_mmu_remove_mapping()
2410 granule = BIT64(tbl_info.shift); in core_mmu_add_mapping()
2513 paddr_t mask = BIT64(ti.shift) - 1; in check_pa_matches_va()
/optee_os/lib/libutils/isoc/newlib/
H A Dstr-two-way.h355 size_t shift; in two_way_long_needle() local
361 shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; in two_way_long_needle()
362 if (0 < shift) in two_way_long_needle()
364 if (memory && shift < period) in two_way_long_needle()
369 shift = needle_len - period; in two_way_long_needle()
372 j += shift; in two_way_long_needle()
406 size_t shift; in two_way_long_needle() local
413 shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; in two_way_long_needle()
414 if (0 < shift) in two_way_long_needle()
416 j += shift; in two_way_long_needle()
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/
H A Docb3_init.c15 int idx, shift; in s_ocb3_int_calc_offset_zero() local
48 shift = (bottom % 8); in s_ocb3_int_calc_offset_zero()
50 ocb->Offset_current[x] = iStretch[idx+x] << shift; in s_ocb3_int_calc_offset_zero()
51 if (shift > 0) { in s_ocb3_int_calc_offset_zero()
52 ocb->Offset_current[x] |= iStretch[idx+x+1] >> (8-shift); in s_ocb3_int_calc_offset_zero()
/optee_os/lib/libutils/ext/include/
H A Dutil.h192 #define SHIFT_U32(v, shift) ((v) << (shift))
193 #define SHIFT_U64(v, shift) ((v) << (shift))
197 #define SHIFT_U32(v, shift) ((uint32_t)(v) << (shift)) argument
198 #define SHIFT_U64(v, shift) ((uint64_t)(v) << (shift)) argument
/optee_os/lib/libutils/compiler-rt/lib/builtins/
H A Dudivmodti4.c134 si_int shift = in __udivmodti4() local
136 divisor.all <<= shift; in __udivmodti4()
139 for (; shift >= 0; --shift) { in __udivmodti4()
/optee_os/core/drivers/qcom/ramblur/
H A Dramblur_pimem_v3.c59 uint32_t shift) in readback_sync() argument
61 if (shift > 31) in readback_sync()
65 while (val != (in_dword_masked(reg, mask) >> shift)) in readback_sync()
259 uint32_t shift[2] = { in pre_initialize_3_0_0() local
266 readback_sync(regs[i], 0, masks[i], shift[i]); in pre_initialize_3_0_0()
/optee_os/core/include/mm/
H A Dtee_mm.h33 uint8_t shift; /* size shift */ member
66 uint8_t shift, uint32_t flags);
H A Dcore_mmu.h416 uint8_t shift; member
484 return (va - tbl_info->va_base) >> tbl_info->shift; in core_mmu_va2idx()
496 return (idx << tbl_info->shift) + tbl_info->va_base; in core_mmu_idx2va()
508 return pa & ((1 << tbl_info->shift) - 1); in core_mmu_get_block_offset()
/optee_os/core/arch/arm/crypto/
H A Daes_armv8a_ce.c59 static uint32_t ror32(uint32_t val, unsigned int shift) in ror32() argument
61 return (val >> shift) | (val << (32 - shift)); in ror32()
/optee_os/core/crypto/
H A Dsm3.c55 static uint32_t rotl(uint32_t val, int shift) in rotl() argument
57 shift &= 0x1F; in rotl()
59 if (shift == 0) in rotl()
62 return SHL(val, shift) | (val >> (32 - shift)); in rotl()
/optee_os/core/drivers/clk/
H A Dclk-stm32-core.c44 uint32_t mask = MASK_WIDTH_SHIFT(mux->width, mux->shift); in stm32_mux_get_parent()
46 return (io_read32(priv->base + mux->offset) & mask) >> mux->shift; in stm32_mux_get_parent()
53 uint32_t mask = MASK_WIDTH_SHIFT(mux->width, mux->shift); in stm32_mux_set_parent()
56 io_clrsetbits32(address, mask, (sel << mux->shift) & mask); in stm32_mux_set_parent()
293 val = io_read32(priv->base + divider->offset) >> divider->shift; in stm32_div_get_value()
312 mask = MASK_WIDTH_SHIFT(divider->width, divider->shift); in stm32_div_set_value()
313 io_clrsetbits32(address, mask, (value << divider->shift) & mask); in stm32_div_set_value()
H A Dclk-stm32-core.h13 uint8_t shift; member
31 uint8_t shift; member
/optee_os/core/drivers/crypto/hisilicon/
H A Dsec_main.h52 #define SEC_GET_FIELD(val, mask, shift) (((val) & (mask)) >> (shift)) argument
/optee_os/core/arch/arm/kernel/
H A Dcache_helpers_a32.S101 .macro dcsw_op shift, fw, ls
103 ubfx r3, r2, \shift, \fw
H A Dcache_helpers_a64.S93 .macro dcsw_op shift, fw, ls
95 ubfx x3, x9, \shift, \fw
/optee_os/core/drivers/firewall/
H A Dstm32_etzpc.c209 uint32_t shift = (decprot_id % IDS_PER_DECPROT_REGS) << DECPROT_SHIFT; in etzpc_configure_decprot() local
223 ETZPC_DECPROT0_MASK << shift, in etzpc_configure_decprot()
224 masked_decprot << shift); in etzpc_configure_decprot()
232 uint32_t shift = (decprot_id % IDS_PER_DECPROT_REGS) << DECPROT_SHIFT; in etzpc_get_decprot() local
238 value = (io_read32(base + ETZPC_DECPROT0 + offset) >> shift) & in etzpc_get_decprot()
H A Dstm32_rifsc.c530 uint32_t shift = risup->id % _PERIPH_IDS_PER_REG; in stm32_risup_cfg() local
537 offset, BIT(shift), in stm32_risup_cfg()
538 SHIFT_U32(risup->sec, shift)); in stm32_risup_cfg()
543 BIT(shift), in stm32_risup_cfg()
544 SHIFT_U32(risup->priv, shift)); in stm32_risup_cfg()
557 offset, BIT(shift)); in stm32_risup_cfg()
/optee_os/core/lib/libtomcrypt/
H A Dmpi_desc.c168 unsigned int shift = 31; in compare_d() local
169 uint32_t mask = BIT(shift) - 1; in compare_d()
175 v >>= shift; in compare_d()
178 mbedtls_mpi_shift_l(&bn, shift); in compare_d()
/optee_os/core/arch/arm/mm/
H A Dcore_mmu_v7.c548 tbl_info->shift = SECTION_SHIFT; in core_mmu_set_info_table()
551 tbl_info->shift = SMALL_PAGE_SHIFT; in core_mmu_set_info_table()

12