Home
last modified time | relevance | path

Searched full:otp (Results 1 – 25 of 184) sorted by relevance

12345678

/trusted-firmware-m-latest/platform/ext/accelerator/cc312/
Dotp_cc312.c35 * @brief This struct documents the layout of the CC312 OTP. It documents both
106 * number of zeroes is compared with the actual number in the asset. Due to OTP
286 /* CC312 OTP can only be read / written in 32 bit words. In order to allow in otp_read()
290 * the OTP address), and the offset between the OTP address and that aligned in otp_read()
390 * the OTP in case the zero_count buffer write fails. in otp_write()
395 /* If the buffer is smaller than the OTP item, count the remainder in otp_write()
396 * of the OTP item as well. in otp_write()
407 /* CC312 OTP can only be read / written in 32 bit words. In order to allow in otp_write()
411 * the OTP address), and the offset between the OTP address and that aligned in otp_write()
414 * back to OTP. in otp_write()
[all …]
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/
Drun_integration_otp.h19 * @brief Retrieves the current life cycles based on the OTP values.
37 …* @brief Sets the appropriate fields on the OTP buffer to correspond with a specific…
39 * @param otp [output] The OTP image to alter
44 RunItError_t runIt_setKceicvInOtpBuff(unsigned int *otp, unsigned int *kceicvBuff);
47 …* @brief Sets the appropriate fields on the OTP buffer to correspond with a specific…
49 * @param otp [output] The OTP image to alter
54 RunItError_t runIt_setKceInOtpBuff(unsigned int *otp, unsigned int *kceBuff);
59 * @param otp [ouput] The image to burn to NVM
64 RunItError_t runIt_setKpicvInOtpBuff(unsigned int *otp, unsigned int *kpicvBuff);
69 * @param otp [ouput] The image to burn to NVM
[all …]
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/host/src/tests/common/
Dtests_hw_access.c150 unsigned int testBurnOtp(unsigned int *otp, unsigned int nextLcs) in testBurnOtp() argument
157 /* Clear OTP is not needed any more since we call to powerOnReset to clear env regs */ in testBurnOtp()
160 TEST_PRINTF_ERROR("Failed to clear OTP!!!\n"); in testBurnOtp()
169 TEST_PRINTF("writing Otp [%d] 0x%X", i, otp[i]); in testBurnOtp()
170 WRITE_OTP(i, otp[i]); in testBurnOtp()
183 /* Perform SW reset after writing to OTP new values */ in testBurnOtp()
189 TEST_PRINTF(" OTP burn succeeded with new LCS = 0x%02x \n", nextLcs); in testBurnOtp()
191 TEST_PRINTF_ERROR("Error: Failed to burn OTP lcs is %d!!!\n", nextLcs); in testBurnOtp()
220 /* Perform SW reset after writing to OTP new values */ in testClearOtp()
226 TEST_PRINTF(" OTP burn succeeded with new LCS = CM \n"); in testClearOtp()
[all …]
Dtests_otp.h47 unsigned int testBurnOtp(unsigned int *otp, unsigned int nextLcs);
56 * This function sets HBK to otp buffer and update "NotInUse" and "ZerosBits"
59 uint32_t *otp, //!< [out] otp image
68 uint32_t *otp, //!< [out] otp image
69 uint32_t offset, //!< [in] offset within the otp
74 * This function sets hw key itself to otp buffer and update "NotInUse" and "ZerosBits"
78 uint32_t *otpBuf, //!< [out] otp image
84 * This function gets hw key and its size from otp buffer to user buffer
88 uint32_t *otpBuf, //!< [in] otp image
99 uint32_t *otpBuf, //!< [out] otp image
[all …]
Dtests_otp.c190 * This function gets hw key and its size from otp buffer to user buffer
237 uint32_t Test_SetHbkInOtpBuff(uint32_t *otp, uint8_t *hbkBuff, OtpHbkTypes_t type) in Test_SetHbkInOtpBuff() argument
246 if ((NULL == otp) || (NULL == hbkBuff)) in Test_SetHbkInOtpBuff()
267 memset(&otp[CC_OTP_HBK1_OFFSET], 0, CC_OTP_HBK1_SIZE_IN_WORDS); in Test_SetHbkInOtpBuff()
268 otp[CC_OTP_OEM_FLAG_OFFSET] &= ~(0xFF); in Test_SetHbkInOtpBuff()
273 memset(&otp[CC_OTP_HBK0_OFFSET], 0, CC_OTP_HBK0_SIZE_IN_WORDS); in Test_SetHbkInOtpBuff()
274 otp[CC_OTP_MANUFACTURE_FLAG_OFFSET] &= ~(0xFF000000); in Test_SetHbkInOtpBuff()
276otp[CC_OTP_MANUFACTURE_FLAG_OFFSET] |= (1U << CC_OTP_MANUFACTURE_FLAG_HBK0_NOT_IN_USE_BIT_SHIFT); in Test_SetHbkInOtpBuff()
281 …TEST_CONVERT_BYTE_ARR_TO_WORD(&hbkBuff[(hbkStartOffset + i) * sizeof(uint32_t)], otp[otpStartOffse… in Test_SetHbkInOtpBuff()
286 TEST_CALC_BUFF_ZEROS(&otp[CC_OTP_HBK0_OFFSET], CC_OTP_HBK0_SIZE_IN_WORDS, zeroCount); in Test_SetHbkInOtpBuff()
[all …]
Dtests_hw_access_iot.c180 /* Clean OTP */ in testBurnOtp()
190 /* Copy new OTP buffer */ in testBurnOtp()
192 TEST_PRINTF("writing Otp [0x%X] 0x%X", i, otpBuf[i]); in testBurnOtp()
197 /* Perform SW reset after writing to OTP new values */ in testBurnOtp()
203 TEST_PRINTF(" OTP burn succeeded with new LCS = 0x%02x \n", nextLcs); in testBurnOtp()
205 TEST_PRINTF_ERROR("Error: Failed to burn OTP!!\n"); in testBurnOtp()
243 unsigned int testSetKdrInOtpBuff(unsigned int *otp, unsigned char *kdrBuff) in testSetKdrInOtpBuff() argument
250 if ((NULL == otp) || in testSetKdrInOtpBuff()
256 TEST_CONVERT_BYTE_ARR_TO_WORD(&kdrBuff[i*sizeof(uint32_t)], otp[CC_OTP_START_OFFSET+i]) in testSetKdrInOtpBuff()
259 TEST_CALC_BUFF_ZEROS(&otp[CC_OTP_START_OFFSET], CC_OTP_HUK_SIZE_IN_WORDS, zeroCount); in testSetKdrInOtpBuff()
[all …]
Dtests_hw_access_iot.h44 /* OTP memeory mapping */
166 /* calc OTP memory length:
167 read RTL OTP address width. The supported sizes are 6 (for 2 Kbits),7,8,9,10,11 (for 64 Kbits).
182 unsigned int testBurnOtp(unsigned int *otp, unsigned int nextLcs);
190 unsigned int testSetHbkInOtpBuff(unsigned int *otp, unsigned char *hbkBuff, OtpHbkTypes_t type);
193 unsigned int testSetKdrInOtpBuff(unsigned int *otp, unsigned char *kdrBuff);
196 unsigned int testSetKcpOtpBuff(unsigned int *otp, unsigned int *kpicvBuff);
197 unsigned int testSetKceOtpBuff(unsigned int *otp, unsigned int *kpicvBuff);
200 unsigned int testSetKpicvInOtpBuff(unsigned int *otp, unsigned int *kpicvBuff);
201 unsigned int testSetKceicvOtpBuff(unsigned int *otp, unsigned int *kpicvBuff);
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/host/src/tests/proj/cc3x/cc312_r1/
Dtest_proj_otp.c180 /* Clean OTP */ in Test_ProjBurnOtpPlain()
189 /* Copy new OTP buffer */ in Test_ProjBurnOtpPlain()
191 TEST_PRINTF("writing Otp [0x%X] 0x%X", i, otpBuf[i]); in Test_ProjBurnOtpPlain()
196 /* Perform SW reset after writing to OTP new values */ in Test_ProjBurnOtpPlain()
202 TEST_PRINTF(" OTP burn succeeded with new LCS = 0x%02x \n", nextLcs); in Test_ProjBurnOtpPlain()
204 TEST_PRINTF_ERROR("Error: Failed to burn OTP!!\n"); in Test_ProjBurnOtpPlain()
218 /* rtl key is not a part of OTP image => skip it */ in Test_ProjBurnOtp()
222 /* set the the key to OTP buffer*/ in Test_ProjBurnOtp()
240 /* Clean OTP */ in Test_ProjBurnCmOtp()
246 /* Perform SW reset after writing to OTP new values */ in Test_ProjBurnCmOtp()
[all …]
Dtest_proj_otp.h26 /* OTP memory mapping */
79 /* calc OTP memory length:
80 read RTL OTP address width. The supported sizes are 6 (for 2 Kbits),7,8,9,10,11 (for 64 Kbits).
118 * @brief This function writes to OTP using environment register including RTL mask
129 * @brief This function reads to OTP using environment register including RTL mask
140 * @brief This function sets the key in OTP buffer including number of zeroes and RTL mask
151 * @brief This function burns OTP buffer with the required chip indication flag
162 * @brief This function burns OTP buffer with the required chip indication flag
173 * @brief This function burns OTP buffer (as is) with the required chip indication flag
184 …* @brief This function burns OTP buffer with the required chip indication flag (including key inte…
[all …]
/trusted-firmware-m-latest/platform/include/
Dtfm_plat_otp.h70 * the possible transitions are encoded by using the property that OTP bits can
77 * which cannot be done as per OTP semantics.
80 * OTP memory as they are reversible transitions from SECURED, and OTP cannot
93 * \brief Initialises OTP storage.
102 * \brief Reads the given OTP element.
109 * \note If the size of the internal OTP
117 * instanciated in OTP memory by this
126 * OTP element.
134 * \note This function must implement the OTP
139 * not alter the contents of OTP memory.
[all …]
/trusted-firmware-m-latest/docs/integration_guide/
Dplatform_provisioning.rst5 TF-M stores any data that should be provisioned at the factory in OTP memory.
6 The default is that this OTP memory is actually implemented using on-chip flash,
14 ``assembly_and_test_prov_data`` struct, and will then provision it to OTP. The
28 provisioned to OTP, the LCS will transition to ``TFM_SLC_SECURED`` [1]_. Note
56 erasing the OTP flash area.
63 OTP disabled by setting ``PLATFORM_DEFAULT_OTP=OFF`` in cmake, the CC312 OTP
64 will be used as a backing for the OTP HAL.
69 Boards with real OTP memory cannot be reprovisioned - care should be taken that
73 Platform-specific OTP backing
76 If a platform has a medium that is suitable for storing data with OTP semantics
[all …]
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/host/src/cc3x_sbromlib/
Dbsv_otp_api.h18 @brief This file contains functions that access the OTP memory for read and write operations.
23 @brief This function retrieves a 32-bit OTP memory word from a given address.
30 uint32_t otpAddress, /*!< [in] Word address in the OTP memory to read from. */
31 uint32_t *pOtpWord /*!< [out] The OTP memory word's contents. */
36 @brief This function writes a 32-bit OTP memory word to a given address. Prior to writing,
37 …the function reads the current value in the OTP memory word, and performs bit-wise OR to generate …
46 uint32_t otpAddress, /*!< [in] Word address in the OTP memory to write to. */
47 uint32_t otpWord /*!< [in] The OTP memory word's contents. */
Dbsv_hw_defs.h74 /* read a word directly from OTP memory */
80 /* write a word directly from OTP memory */
87 /* calc OTP memory length:
88 read RTL OTP address width. The supported sizes are 6 (for 2 Kbits),7,8,9,10,11 (for 64 Kbits).
97 /* check Hbk configuration in OTP memory */
104 /* check OEM RMA flag bit in OTP memory */
111 /* check ICV RMA flag bit in OTP memory */
127 /* check KPICV "Not In Use" bit in OTP memory */
134 /* check KCEICV "Not In Use" bit in OTP memory */
141 /* check KCP "Not In Use" bit in OTP memory */
[all …]
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/host/src/cc_mng/
Dmbedtls_cc_mng_int.h74 /* calc OTP memory length:
75 read RTL OTP address width. The supported sizes are 6 (for 2 Kbits),7,8,9,10,11 (for 64 Kbits).
84 /* read a word directly from OTP memory */
105 /*! Check Hbk configuration in OTP memory. */
147 @brief This function reads an OTP word from from 'otpAddress' to 'pOtpWord'.
152 …rdRead(uint32_t otpAddress, /*!< [in] OTP Address: An Offset in Words in the OTP
153 …uint32_t *pOtpWord); /*!< [in/out] OTP Word pointer: An address to store the read Wor…
164 @brief This function reads software revocation counter from OTP memory, according to the provided k…
171 … /*!< [out] The value of the requested counter as read from OTP memory. */
175 @brief This function retrieves the public key hash from OTP memory, according to the provided index.
Dmbedtls_cc_mng_int.c24 * fact that the S1 board's OTP is just an ordinary register which is volatile.
36 /* check otp limits */ in mbedtls_mng_otpWordRead()
42 /* read OTP word */ in mbedtls_mng_otpWordRead()
59 /* Read the MRAM (OTP) contents the CC312 uses to determine the lcs (for in mbedtls_mng_lcsGet()
169 /* read the SW version from the OTP, and accumulate number of ones */ in mbedtls_mng_swVersionGet()
186 /* convert versionBitCount to base-1 representation and compare to OTP word */ in mbedtls_mng_swVersionGet()
252 /* otp shuld support full HBK */ in mbedtls_mng_pubKeyHashGet()
274 /* otp shuld support 2 HBK's */ in mbedtls_mng_pubKeyHashGet()
287 /* otp shuld support 2 HBK's */ in mbedtls_mng_pubKeyHashGet()
303 /* read hash key from OTP */ in mbedtls_mng_pubKeyHashGet()
/trusted-firmware-m-latest/platform/ext/target/nuvoton/common/bsp/Include/
Dkeystore_reg.h118 * | | |10 = Key is in OTP.
173 * Offset: 0x40 Key Store OTP Keys Status Register
177 * |[0] |KEY0 |OTP Key 0 Used Status
178 * | | |0 = OTP key 0 is unused.
179 * | | |1 = OTP key 0 is used.
181 * |[1] |KEY1 |OTP Key 1 Used Status
182 * | | |0 = OTP key 1 is unused.
183 * | | |1 = OTP key 1 is used.
185 * |[2] |KEY2 |OTP Key 2 Used Status
186 * | | |0 = OTP key 2 is unused.
[all …]
/trusted-firmware-m-latest/platform/ext/target/stm/common/stm32h5xx/hal/Inc/
Dstm32h5xx_hal_flash_ex.h113 uint32_t OTPBlockLock; /*!< Specifies the OTP block(s) to be locked.
222 #define OPTIONBYTE_OTP_LOCK 0x0020U /*!< OTP Lock option byte configuration */
606 /** @defgroup FLASH_OTP_Blocks FLASH OTP blocks
609 #define FLASH_OTP_BLOCK_0 0x00000001U /*!< OTP Block0 */
610 #define FLASH_OTP_BLOCK_1 0x00000002U /*!< OTP Block1 */
611 #define FLASH_OTP_BLOCK_2 0x00000004U /*!< OTP Block2 */
612 #define FLASH_OTP_BLOCK_3 0x00000008U /*!< OTP Block3 */
613 #define FLASH_OTP_BLOCK_4 0x00000010U /*!< OTP Block4 */
614 #define FLASH_OTP_BLOCK_5 0x00000020U /*!< OTP Block5 */
615 #define FLASH_OTP_BLOCK_6 0x00000040U /*!< OTP Block6 */
[all …]
/trusted-firmware-m-latest/platform/ext/target/arm/rse/rdfremont/
Drse_memory_sizes.h31 /* The total size of the OTP for the RSE */
34 * How much OTP is reserved for the portion of the DMA Initial Command Sequence
35 * which is located in OTP. This is loaded by directly by the DMA hardware, so
42 /* How much space in OTP can be used for the manufacturing data */
45 /* How much space in OTP can be used for the SAM configuration */
/trusted-firmware-m-latest/platform/ext/target/arm/rse/tc/
Drse_memory_sizes.h34 /* The total size of the OTP for the RSE */
36 /* How much OTP is reserved for the portion of the DMA Initial Command Sequence
37 * which is located in OTP. This is loaded by directly by the DMA hardware, so
44 /* How much space in OTP can be used for the SAM configuration */
47 /* How much space in OTP can be used for the manufacturing data */
/trusted-firmware-m-latest/platform/ext/target/arm/rse/kronos/
Drse_memory_sizes.h35 /* The total size of the OTP for the RSE */
37 /* How much OTP is reserved for the portion of the DMA Initial Command Sequence
38 * which is located in OTP. This is loaded by directly by the DMA hardware, so
45 /* How much space in OTP can be used for the SAM configuration */
48 /* How much space in OTP can be used for the manufacturing data */
/trusted-firmware-m-latest/platform/ext/target/nuvoton/m2354/bsp/Library/StdDriver/src/
Dfmc.c323 * @brief Check the OTP is locked or not.
325 * @param[in] u32OtpNum The OTP number.
327 * @retval 1 OTP is locked.
328 * @retval 0 OTP is not locked.
329 * @retval -1 Failed to read OTP lock bits.
330 * @retval -2 Invalid OTP number.
332 * @details To get specify OTP lock status
360 ret = 1; /* Lock work was progrmmed. OTP was locked. */ in FMC_IsOTPLocked()
397 * @brief Lock the specified OTP.
399 * @param[in] u32OtpNum The OTP number.
[all …]
/trusted-firmware-m-latest/platform/ext/target/arm/drivers/lcm/
Dlcm_drv.h205 * \brief This function gets the size of the OTP managed by the LCM.
208 * \param[out] size The size (in bytes) of the OTP.
242 * \brief This function writes the OTP managed by the LCM.
245 * \param[in] offset The offset into the OTP to write. Must be 4 byte aligned
246 * \param[in] len The length of the OTP region to write. Must be 4 byte
248 * \param[in] buf The buffer containing the data to write into OTP. Must
251 * \note This function does not allow writes into OTP words that have already
260 * \brief This function reads the OTP managed by the LCM.
263 * \param[in] offset The offset into the OTP to write. Must be 4 byte aligned
264 * \param[in] len The length of the OTP region to write. Must be 4 byte
[all …]
/trusted-firmware-m-latest/docs/design_docs/booting/
Dbl1.rst70 OTP. As BL1_2 is verified against a hash stored in OTP, it is immutable after
93 3) BL1_1 verifies BL1_2 against the hash stored in OTP
105 stored in OTP:
107 OTP can be very expensive in terms of chip area, though new technologies like
108 antifuse OTP decrease this cost. Because of this, the code size of BL1_2 has
110 functions stored in ROM. Care should be taken that OTP is sized such that it is
115 As OTP memory frequently has low performance, BL1_2 is copied into RAM before it
133 cryptography, using a public key that is provisioned into OTP.
135 BL1_2 implements a rollback protection counter in OTP, which is used to prevent
257 provisioned into OTP can be found. These are required as the provisioning bundle
[all …]
/trusted-firmware-m-latest/platform/ext/target/nuvoton/m2351/bsp/Library/StdDriver/src/
Dfmc.c375 * @brief Check the OTP is locked or not.
377 * @param[in] u32OtpNum The OTP number.
379 * @retval 1 OTP is locked.
380 * @retval 0 OTP is not locked.
381 * @retval -1 Failed to read OTP lock bits.
382 * @retval -2 Invalid OTP number.
384 * @details To get specify OTP lock status
412 ret = 1; /* Lock work was progrmmed. OTP was locked. */ in FMC_Is_OTP_Locked()
449 * @brief Lock the specified OTP.
451 * @param[in] u32OtpNum The OTP number.
[all …]
/trusted-firmware-m-latest/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/dmpu/
Ddmpu.c170 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()
244 /**************** Burning OTP ******************/ in CCProd_Dmpu()
248 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()
255 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()
261 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()
267 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()
275 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()
283 CC_PAL_LOG_ERR("Failed to verify OTP write 0x%x \n", error); in CCProd_Dmpu()

12345678