| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
| H A D | der_decode_asn1_identifier.c | 59 int der_decode_asn1_identifier(const unsigned char *in, unsigned long *inlen, ltc_asn1_list *id) in der_decode_asn1_identifier() argument 65 LTC_ARGCHK(id != NULL); in der_decode_asn1_identifier() 74 id->klass = (in[0] >> 6) & 0x3; in der_decode_asn1_identifier() 75 id->pc = (in[0] >> 5) & 0x1; in der_decode_asn1_identifier() 76 id->tag = in[0] & 0x1f; in der_decode_asn1_identifier() 79 if (id->tag == 0x1f) { in der_decode_asn1_identifier() 80 id->tag = 0; in der_decode_asn1_identifier() 87 id->tag <<= 7; in der_decode_asn1_identifier() 88 id->tag |= in[tag_len] & 0x7f; in der_decode_asn1_identifier() 95 } else if (id->tag < 0x1f) { in der_decode_asn1_identifier() [all …]
|
| H A D | der_encode_asn1_identifier.c | 18 int der_encode_asn1_identifier(const ltc_asn1_list *id, unsigned char *out, unsigned long *outlen) in der_encode_asn1_identifier() argument 23 LTC_ARGCHK(id != NULL); in der_encode_asn1_identifier() 26 if (id->type != LTC_ASN1_CUSTOM_TYPE) { in der_encode_asn1_identifier() 27 if ((unsigned)id->type >= der_asn1_type_to_identifier_map_sz) { in der_encode_asn1_identifier() 30 if (der_asn1_type_to_identifier_map[id->type] == -1) { in der_encode_asn1_identifier() 34 *out = der_asn1_type_to_identifier_map[id->type]; in der_encode_asn1_identifier() 39 if (id->klass < LTC_ASN1_CL_UNIVERSAL || id->klass > LTC_ASN1_CL_PRIVATE) { in der_encode_asn1_identifier() 42 if (id->pc < LTC_ASN1_PC_PRIMITIVE || id->pc > LTC_ASN1_PC_CONSTRUCTED) { in der_encode_asn1_identifier() 45 if (id->tag > (ULONG_MAX >> (8 + 7))) { in der_encode_asn1_identifier() 54 out[0] = id->klass << 6 | id->pc << 5; in der_encode_asn1_identifier() [all …]
|
| /optee_os/core/drivers/clk/sam/ |
| H A D | sama5d2_clk.c | 24 uint8_t id; member 64 { .n = "ddrck", .id = 2 }, 65 { .n = "lcdck", .id = 3 }, 66 { .n = "uhpck", .id = 6 }, 67 { .n = "udpck", .id = 7 }, 68 { .n = "pck0", .id = 8 }, 69 { .n = "pck1", .id = 9 }, 70 { .n = "pck2", .id = 10 }, 71 { .n = "iscck", .id = 18 }, 79 .clk = { .n = "macb0_clk", .id = 5 }, [all …]
|
| H A D | sama7g5_clk.c | 297 uint8_t id; member 304 .id = 1, 313 .id = 2, 321 .id = 3, 331 .id = 4, 343 uint8_t id; member 345 { .name = "pck0", .parent = "prog0", .id = 8, }, 346 { .name = "pck1", .parent = "prog1", .id = 9, }, 347 { .name = "pck2", .parent = "prog2", .id = 10, }, 348 { .name = "pck3", .parent = "prog3", .id = 11, }, [all …]
|
| H A D | at91_system.c | 21 uint8_t id; member 24 static bool is_pck(int id) in is_pck() argument 26 return (id >= 8) && (id <= 15); in is_pck() 29 static bool clk_system_ready(vaddr_t base, int id) in clk_system_ready() argument 33 return status & BIT(id); in clk_system_ready() 40 io_write32(sys->base + AT91_PMC_SCER, 1 << sys->id); in clk_system_enable() 42 if (!is_pck(sys->id)) in clk_system_enable() 45 while (!clk_system_ready(sys->base, sys->id)) in clk_system_enable() 55 io_write32(sys->base + AT91_PMC_SCDR, 1 << sys->id); in clk_system_disable() 65 struct clk *parent, uint8_t id) in at91_clk_register_system() argument [all …]
|
| H A D | phy-sama7-utmi-clk.c | 23 uint8_t id; member 29 uint8_t id = utmi->id; in sama7_utmi_clk_enable() local 31 sam_rstc_usb_por(id, true); in sama7_utmi_clk_enable() 32 io_clrbits32(utmi->base + SAMA7_SFR_UTMI0R(id), in sama7_utmi_clk_enable() 34 sam_rstc_usb_por(id, false); in sama7_utmi_clk_enable() 45 uint8_t id = utmi->id; in sama7_utmi_clk_disable() local 47 sam_rstc_usb_por(id, true); in sama7_utmi_clk_disable() 48 io_setbits32(utmi->base + SAMA7_SFR_UTMI0R(id), in sama7_utmi_clk_disable() 59 uint8_t id) in sama7_utmi_clk_register() argument 75 utmi_clk->id = id; in sama7_utmi_clk_register()
|
| H A D | at91_pll.c | 16 #define PLL_STATUS_MASK(id) BIT(1 + (id)) argument 17 #define PLL_REG(id) (AT91_CKGR_PLLAR + ((id) * 4)) argument 30 #define PLL_ICPR_SHIFT(id) ((id) * 16) argument 31 #define PLL_ICPR_MASK(id) (0xffff << PLL_ICPR_SHIFT(id)) argument 39 uint8_t id; member 47 static bool clk_pll_ready(vaddr_t base, int id) in clk_pll_ready() argument 51 return status & PLL_STATUS_MASK(id); in clk_pll_ready() 59 uint8_t id = pll->id; in clk_pll_enable() local 60 uint32_t mask = PLL_STATUS_MASK(id); in clk_pll_enable() 61 int offset = PLL_REG(id); in clk_pll_enable() [all …]
|
| H A D | clk-sam9x60-pll.c | 20 #define PLL_STATUS_MASK(id) BIT(1 + (id)) argument 21 #define PLL_REG(id) (AT91_CKGR_PLLAR + ((id) * 4)) argument 34 #define PLL_ICPR_SHIFT(id) ((id) * 16) argument 35 #define PLL_ICPR_MASK(id) SHIFT_U64(0xffff, PLL_ICPR_SHIFT(id)) argument 45 uint8_t id; member 75 static bool sam9x60_pll_ready(vaddr_t base, int id) in sam9x60_pll_ready() argument 77 return io_read32(base + AT91_PMC_PLL_ISR0) & BIT(id); in sam9x60_pll_ready() 80 static bool sam9x60_frac_pll_ready(vaddr_t regmap, uint8_t id) in sam9x60_frac_pll_ready() argument 82 return sam9x60_pll_ready(regmap, id); in sam9x60_frac_pll_ready() 104 AT91_PMC_PLL_UPDT_ID_MASK, core->id); in sam9x60_frac_pll_set() [all …]
|
| H A D | at91_peripheral.c | 17 #define PERIPHERAL_MASK(id) BIT((id) & PERIPHERAL_ID_MASK) argument 24 uint32_t id; member 60 if (periph->id < PERIPHERAL_ID_MIN) in clk_sam9x5_peripheral_enable() 64 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_enable() 79 if (periph->id < PERIPHERAL_ID_MIN) in clk_sam9x5_peripheral_disable() 83 (periph->id & periph->layout->pid_mask)); in clk_sam9x5_peripheral_disable() 96 if (periph->id < PERIPHERAL_ID_MIN) in clk_sam9x5_peripheral_get_rate() 100 periph->id & periph->layout->pid_mask); in clk_sam9x5_peripheral_get_rate() 120 if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) { in clk_sam9x5_peripheral_set_rate() 152 uint32_t id, const struct clk_range *range) in at91_clk_register_sam9x5_periph() argument [all …]
|
| H A D | at91_programmable.c | 17 #define PROG_STATUS_MASK(id) (1 << ((id) + 8)) argument 28 uint8_t id; member 37 unsigned int pckr = io_read32(prog->base + AT91_PMC_PCKR(prog->id)); in clk_programmable_get_rate() 65 io_clrsetbits32(prog->base + AT91_PMC_PCKR(prog->id), mask, pckr); in clk_programmable_set_parent() 74 unsigned int pckr = io_read32(prog->base + AT91_PMC_PCKR(prog->id)); in clk_programmable_get_parent() 119 io_clrsetbits32(prog->base + AT91_PMC_PCKR(prog->id), in clk_programmable_set_rate() 136 uint8_t num_parents, uint8_t id, in at91_clk_register_programmable() argument 142 assert(id <= PROG_ID_MAX); in at91_clk_register_programmable() 149 prog->id = id; in at91_clk_register_programmable() 162 pmc_register_pck(id); in at91_clk_register_programmable()
|
| /optee_os/core/drivers/ |
| H A D | stm32_tamp.c | 101 #define _TAMP_CR1_ITAMP(id) BIT((id) - INT_TAMP1 + U(16)) argument 102 #define _TAMP_CR1_ETAMP(id) BIT((id) - EXT_TAMP1) argument 105 #define _TAMP_CR2_ETAMPTRG(id) BIT((id) - EXT_TAMP1 + U(24)) argument 109 #define _TAMP_CR2_ETAMPMSK(id) BIT((id) - EXT_TAMP1 + U(16)) argument 110 #define _TAMP_CR2_ETAMPNOER(id) BIT((id) - EXT_TAMP1) argument 114 #define _TAMP_CR3_ITAMPNOER(id) BIT((id) - INT_TAMP1) argument 133 #define _TAMP_ATCR1_ETAMPAM(id) BIT((id) - EXT_TAMP1) argument 134 #define _TAMP_ATCR1_ATOSEL_MASK(id) \ argument 136 typeof(id) _id = (id); \ 141 #define _TAMP_ATCR1_ATOSEL(id, od) \ argument [all …]
|
| H A D | imsic.c | 118 uint32_t id = base_id; in imsic_local_eix_update() local 121 while (id < last_id) { in imsic_local_eix_update() 122 isel = ROUNDDOWN(id, RISCV_XLEN_BITS) / IMSIC_EIPx_BITS; in imsic_local_eix_update() 126 for (i = id & (RISCV_XLEN_BITS - 1); in imsic_local_eix_update() 127 (id < last_id) && (i < RISCV_XLEN_BITS); i++) { in imsic_local_eix_update() 129 id++; in imsic_local_eix_update() 139 static void imsic_it_enable(uint32_t id) in imsic_it_enable() argument 141 imsic_local_eix_update(id, 1, false, true); in imsic_it_enable() 144 static void imsic_it_disable(uint32_t id) in imsic_it_disable() argument 146 imsic_local_eix_update(id, 1, false, false); in imsic_it_disable() [all …]
|
| /optee_os/ta/pkcs11/src/ |
| H A D | pkcs11_helpers.h | 78 static inline bool pkcs11_attr_is_boolean(enum pkcs11_attr_id id) in pkcs11_attr_is_boolean() argument 80 return pkcs11_attr2boolprop_shift(id) >= 0; in pkcs11_attr_is_boolean() 85 const char *id2str_ta_cmd(uint32_t id); 86 const char *id2str_rc(uint32_t id); 87 const char *id2str_slot_flag(uint32_t id); 88 const char *id2str_token_flag(uint32_t id); 89 const char *id2str_session_flag(uint32_t id); 90 const char *id2str_session_state(uint32_t id); 91 const char *id2str_attr(uint32_t id); 92 const char *id2str_class(uint32_t id); [all …]
|
| H A D | pkcs11_helpers.c | 20 uint32_t id; member 29 { .id = (uint32_t)(_id), .size = (_sz), .string = #_id } 32 { .id = (uint32_t)(_id), .size = (_sz) } 105 uint32_t id; member 116 #define PKCS11_ID(_id) { .id = _id, .string = #_id } 118 #define PKCS11_ID(_id) { .id = _id } 121 #define ID2STR(id, table, prefix) \ argument 122 id2str(id, table, ARRAY_SIZE(table), prefix) 126 static const char *id2str(uint32_t id, const struct any_id *table, in id2str() argument 133 if (id != table[n].id) in id2str() [all …]
|
| /optee_os/core/tee/ |
| H A D | tee_fs_rpc.c | 45 return thread_rpc_cmd(op->id, op->num_params, op->params); in operation_commit() 48 static TEE_Result operation_open_dfh(uint32_t id, unsigned int cmd, in operation_open_dfh() argument 68 .id = id, .num_params = 3, .params = { in operation_open_dfh() 83 TEE_Result tee_fs_rpc_open_dfh(uint32_t id, in tee_fs_rpc_open_dfh() argument 86 return operation_open_dfh(id, OPTEE_RPC_FS_OPEN, dfh, fd); in tee_fs_rpc_open_dfh() 89 TEE_Result tee_fs_rpc_create_dfh(uint32_t id, in tee_fs_rpc_create_dfh() argument 93 return operation_open_dfh(id, OPTEE_RPC_FS_CREATE, dfh, fd); in tee_fs_rpc_create_dfh() 96 TEE_Result tee_fs_rpc_close(uint32_t id, int fd) in tee_fs_rpc_close() argument 99 .id = id, .num_params = 1, .params = { in tee_fs_rpc_close() 108 uint32_t id, int fd, tee_fs_off_t offset, in tee_fs_rpc_read_init() argument [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | lockdep.h | 58 uintptr_t id); 61 uintptr_t id); 63 uintptr_t id); 83 uintptr_t id) in lockdep_lock_acquire() argument 85 TEE_Result res = __lockdep_lock_acquire(graph, owned, id); in lockdep_lock_acquire() 102 uintptr_t id) in lockdep_lock_tryacquire() argument 104 TEE_Result res = __lockdep_lock_tryacquire(graph, owned, id); in lockdep_lock_tryacquire() 118 uintptr_t id) in lockdep_lock_release() argument 120 TEE_Result res = __lockdep_lock_release(owned, id); in lockdep_lock_release() 131 void lockdep_lock_destroy(struct lockdep_node_head *graph, uintptr_t id); [all …]
|
| /optee_os/core/include/dt-bindings/firewall/ |
| H A D | tzc400.h | 18 #define DT_TZC_REGION_ACCESS_RD(id) \ argument 19 ((1 << ((id) & DT_REGION_ID_ACCESS_NSAID_ID_MASK)) << \ 22 #define DT_TZC_REGION_ACCESS_WR(id) \ argument 23 ((1 << ((id) & DT_REGION_ID_ACCESS_NSAID_ID_MASK)) << \ 26 #define DT_TZC_REGION_ACCESS_RDWR(id) \ argument 27 (DT_TZC_REGION_ACCESS_RD(id) | DT_TZC_REGION_ACCESS_WR(id))
|
| /optee_os/core/arch/arm/plat-stm32mp2/drivers/ |
| H A D | stm32mp25_syscfg.c | 16 #define SYSCON_OFFSET(id) ((id) & GENMASK_32(15, 0)) argument 17 #define SYSCON_BANK(id) (((id) & GENMASK_32(31, 16)) >> 16) argument 42 static vaddr_t stm32mp_syscfg_base(uint32_t id) in stm32mp_syscfg_base() argument 44 uint32_t bank = SYSCON_BANK(id); in stm32mp_syscfg_base() 51 void stm32mp_syscfg_write(uint32_t id, uint32_t value, uint32_t bitmsk) in stm32mp_syscfg_write() argument 53 vaddr_t syconf_base = stm32mp_syscfg_base(id); in stm32mp_syscfg_write() 55 io_mask32_stm32shregs(syconf_base + SYSCON_OFFSET(id), value, bitmsk); in stm32mp_syscfg_write() 58 uint32_t stm32mp_syscfg_read(uint32_t id) in stm32mp_syscfg_read() argument 60 return io_read32(stm32mp_syscfg_base(id) + SYSCON_OFFSET(id)); in stm32mp_syscfg_read()
|
| /optee_os/core/drivers/rstctrl/ |
| H A D | stm32mp1_rstctrl.c | 24 static size_t reset_id2reg_offset(unsigned int id) in reset_id2reg_offset() argument 26 size_t offset = (id & RESET_ID_MASK) >> RESET_ID_SHIFT; in reset_id2reg_offset() 42 unsigned int id = to_stm32_rstline(rstctrl)->id; in reset_assert() local 48 switch (id) { in reset_assert() 66 offset = reset_id2reg_offset(id); in reset_assert() 67 bit_mask = BIT(reset_id2reg_bit_pos(id)); in reset_assert() 87 unsigned int id = to_stm32_rstline(rstctrl)->id; in reset_deassert() local 93 switch (id) { in reset_deassert() 110 offset = reset_id2reg_offset(id) + RCC_MP_RSTCLRR_OFFSET; in reset_deassert() 111 bit_mask = BIT(reset_id2reg_bit_pos(id)); in reset_deassert() [all …]
|
| /optee_os/core/include/tee/ |
| H A D | tee_fs_rpc.h | 20 uint32_t id; member 27 TEE_Result tee_fs_rpc_open_dfh(uint32_t id, 29 TEE_Result tee_fs_rpc_create_dfh(uint32_t id, 32 TEE_Result tee_fs_rpc_close(uint32_t id, int fd); 35 uint32_t id, int fd, tee_fs_off_t offset, 41 uint32_t id, int fd, tee_fs_off_t offset, 46 TEE_Result tee_fs_rpc_truncate(uint32_t id, int fd, size_t len); 47 TEE_Result tee_fs_rpc_remove_dfh(uint32_t id,
|
| /optee_os/core/drivers/crypto/se050/adaptors/utils/ |
| H A D | scp_config.c | 179 static sss_status_t get_id_from_ofid(uint32_t ofid, uint32_t *id) in get_id_from_ofid() argument 183 *id = SE050A1; in get_id_from_ofid() 186 *id = SE050A2; in get_id_from_ofid() 189 *id = SE050B1; in get_id_from_ofid() 192 *id = SE050B2; in get_id_from_ofid() 195 *id = SE050C1; in get_id_from_ofid() 198 *id = SE050C2; in get_id_from_ofid() 201 *id = SE050DV; in get_id_from_ofid() 204 *id = SE051A2; in get_id_from_ofid() 207 *id = SE051C2; in get_id_from_ofid() [all …]
|
| /optee_os/core/drivers/firewall/ |
| H A D | stm32_etzpc.c | 139 static bool valid_decprot_id(unsigned int id) in valid_decprot_id() argument 141 return id < etzpc_device->ddata.num_per_sec; in valid_decprot_id() 144 static bool __maybe_unused valid_tzma_id(unsigned int id) in valid_tzma_id() argument 146 return id < etzpc_device->ddata.num_tzma; in valid_tzma_id() 373 uint32_t id = 0; in stm32_etzpc_check_access() local 378 id = firewall->args[0] & ETZPC_ID_MASK; in stm32_etzpc_check_access() 382 if (id < etzpc_device->ddata.num_per_sec) { in stm32_etzpc_check_access() 383 if (etzpc_get_decprot(id) == attr_req) in stm32_etzpc_check_access() 395 uint32_t id = 0; in stm32_etzpc_acquire_access() local 400 id = firewall->args[0] & ETZPC_ID_MASK; in stm32_etzpc_acquire_access() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | pk_internal.h | 88 mbedtls_ecp_group_id id; in mbedtls_pk_get_ec_group_id() local 101 id = mbedtls_ecc_group_from_psa(curve, psa_get_key_bits(&opaque_attrs)); in mbedtls_pk_get_ec_group_id() 107 id = mbedtls_ecc_group_from_psa(pk->ec_family, pk->ec_bits); in mbedtls_pk_get_ec_group_id() 109 id = mbedtls_pk_ec_ro(*pk)->grp.id; in mbedtls_pk_get_ec_group_id() 113 return id; in mbedtls_pk_get_ec_group_id() 121 #define MBEDTLS_PK_IS_RFC8410_GROUP_ID(id) \ argument 122 ((id == MBEDTLS_ECP_DP_CURVE25519) || (id == MBEDTLS_ECP_DP_CURVE448)) 126 mbedtls_ecp_group_id id = mbedtls_pk_get_ec_group_id(pk); in mbedtls_pk_is_rfc8410() local 128 return MBEDTLS_PK_IS_RFC8410_GROUP_ID(id); in mbedtls_pk_is_rfc8410()
|
| /optee_os/core/include/drivers/ |
| H A D | atmel_rstc.h | 16 #define RESET_OFFSET(id) (((id) & RESET_ID_MASK) >> RESET_ID_SHIFT) argument 17 #define RESET_BIT_POS(id) ((id) & RESET_BIT_POS_MASK) argument 23 void sam_rstc_usb_por(unsigned char id, bool enable); 32 static inline void sam_rstc_usb_por(unsigned char id __unused, in sam_rstc_usb_por()
|
| /optee_os/core/include/ |
| H A D | scattered_array.h | 30 #define __SCT_ARRAY_DEF_ITEM2(array_name, order, id, element_type) \ argument 32 __scattered_array_ ## id ## array_name, \ 35 #define __SCT_ARRAY_DEF_PG_ITEM2(array_name, order, id, element_type) \ argument 37 __scattered_array_ ## id ## array_name, \ 40 #define __SCT_ARRAY_DEF_ITEM1(array_name, order, id, element_type) \ argument 41 __SCT_ARRAY_DEF_ITEM2(array_name, order, id, element_type) 43 #define __SCT_ARRAY_DEF_PG_ITEM1(array_name, order, id, element_type) \ argument 44 __SCT_ARRAY_DEF_PG_ITEM2(array_name, order, id, element_type)
|