Searched refs:otp_id (Results 1 – 6 of 6) sorted by relevance
| /optee_os/core/include/drivers/ |
| H A D | stm32_bsec.h | 39 TEE_Result stm32_bsec_shadow_read_otp(uint32_t *value, uint32_t otp_id); 46 TEE_Result stm32_bsec_shadow_register(uint32_t otp_id); 54 TEE_Result stm32_bsec_read_otp(uint32_t *value, uint32_t otp_id); 62 TEE_Result stm32_bsec_write_otp(uint32_t value, uint32_t otp_id); 71 TEE_Result stm32_bsec_program_otp(uint32_t value, uint32_t otp_id); 74 uint32_t otp_id __unused) in stm32_bsec_program_otp() 86 TEE_Result stm32_bsec_permanent_lock_otp(uint32_t otp_id); 88 static inline TEE_Result stm32_bsec_permanent_lock_otp(uint32_t otp_id __unused) in stm32_bsec_permanent_lock_otp() 109 TEE_Result stm32_bsec_set_sr_lock(uint32_t otp_id); 117 TEE_Result stm32_bsec_read_sr_lock(uint32_t otp_id, bool *locked); [all …]
|
| /optee_os/core/drivers/ |
| H A D | stm32_bsec.c | 149 static uint32_t otp_bank_offset(uint32_t otp_id) in otp_bank_offset() argument 151 assert(otp_id <= otp_max_id()); in otp_bank_offset() 153 return ((otp_id & ~BSEC_OTP_MASK) >> BSEC_OTP_BANK_SHIFT) * in otp_bank_offset() 205 static TEE_Result check_no_error(uint32_t otp_id, bool check_disturbed) in check_no_error() argument 207 uint32_t bit = BIT(otp_id & BSEC_OTP_MASK); in check_no_error() 208 uint32_t bank = otp_bank_offset(otp_id); in check_no_error() 255 TEE_Result stm32_bsec_shadow_register(uint32_t otp_id) in stm32_bsec_shadow_register() argument 263 result = stm32_bsec_read_sr_lock(otp_id, &locked); in stm32_bsec_shadow_register() 279 io_write32(bsec_base() + BSEC_OTP_CTRL_OFF, otp_id | BSEC_READ); in stm32_bsec_shadow_register() 289 result = check_no_error(otp_id, true /* check-disturbed */); in stm32_bsec_shadow_register() [all …]
|
| H A D | stm32mp15_huk.c | 130 static __maybe_unused TEE_Result pos_from_dt(uint32_t otp_id[HUK_NB_OTP]) in pos_from_dt() 147 otp_id[i] = otp_start + i; in pos_from_dt() 152 static TEE_Result get_otp_pos(uint32_t otp_id[HUK_NB_OTP]) in get_otp_pos() 155 return pos_from_dt(otp_id); in get_otp_pos() 163 otp_id[0] = CFG_STM32MP15_HUK_BSEC_KEY_0; in get_otp_pos() 164 otp_id[1] = CFG_STM32MP15_HUK_BSEC_KEY_1; in get_otp_pos() 165 otp_id[2] = CFG_STM32MP15_HUK_BSEC_KEY_2; in get_otp_pos() 166 otp_id[3] = CFG_STM32MP15_HUK_BSEC_KEY_3; in get_otp_pos() 175 uint32_t otp_id[HUK_NB_OTP] = { }; in tee_otp_get_hw_unique_key() local 182 ret = get_otp_pos(otp_id); in tee_otp_get_hw_unique_key() [all …]
|
| /optee_os/core/arch/arm/plat-stm32mp1/nsec-service/ |
| H A D | bsec_svc.c | 18 uint32_t otp_id = args->a2; in bsec_main() local 23 if (!stm32_bsec_nsec_can_access_otp(otp_id)) { in bsec_main() 30 FMSG("read shadow @%#"PRIx32, otp_id); in bsec_main() 31 result = stm32_bsec_read_otp(out_value, otp_id); in bsec_main() 34 FMSG("program @%#"PRIx32, otp_id); in bsec_main() 35 result = stm32_bsec_program_otp(in_value, otp_id); in bsec_main() 38 FMSG("write shadow @%#"PRIx32, otp_id); in bsec_main() 39 result = stm32_bsec_write_otp(in_value, otp_id); in bsec_main() 42 FMSG("read @%#"PRIx32, otp_id); in bsec_main() 43 result = stm32_bsec_read_otp(&tmp, otp_id); in bsec_main() [all …]
|
| /optee_os/core/pta/stm32mp/ |
| H A D | bsec_pta.c | 21 static TEE_Result bsec_check_access(uint32_t otp_id) in bsec_check_access() argument 23 if (!stm32_bsec_nsec_can_access_otp(otp_id)) in bsec_check_access() 38 uint32_t otp_id = 0; in bsec_read_mem() local 57 for (otp_id = otp_start; otp_id < otp_start + otp_length; in bsec_read_mem() 58 otp_id++, buf++) { in bsec_read_mem() 59 res = bsec_check_access(otp_id); in bsec_read_mem() 68 res = stm32_bsec_read_otp(buf, otp_id); in bsec_read_mem() 69 FMSG("Read shadow %"PRIu32" val: %#"PRIx32, otp_id, in bsec_read_mem() 77 res = stm32_bsec_shadow_read_otp(buf, otp_id); in bsec_read_mem() 78 FMSG("Read fuse %"PRIu32" val: %#"PRIx32, otp_id, *buf); in bsec_read_mem() [all …]
|
| /optee_os/core/arch/arm/plat-stm32mp1/drivers/ |
| H A D | stm32mp1_pwr.c | 199 uint32_t otp_id = 0; in set_fixed_vdd_hslv_mode() local 214 res = stm32_bsec_find_otp_in_nvmem_layout("hw2_otp", &otp_id, in set_fixed_vdd_hslv_mode() 219 res = stm32_bsec_read_otp(&otp_value, otp_id); in set_fixed_vdd_hslv_mode()
|