fix(hal): updated API description and added comments

This commit is contained in:
nilesh.kale
2025-04-15 14:56:46 +05:30
parent 78ef080251
commit d9f03d7f28
15 changed files with 31 additions and 27 deletions

View File

@@ -151,7 +151,7 @@ static inline esp_aes_state_t aes_ll_get_state(void)
*
* @note Only used for DMA transforms
*
* @param mode
* @param mode Mode of operation to set (e.g., ECB, CBC, CTR, etc.)
*/
static inline void aes_ll_set_block_mode(esp_aes_mode_t mode)
{

View File

@@ -104,6 +104,7 @@ static inline void ds_ll_configure_iv(const uint32_t *iv)
static inline void ds_ll_write_message(const uint8_t *msg, size_t size)
{
memcpy((uint8_t*) DS_X_BASE, msg, size);
// Fence ensures all memory operations are completed before proceeding further
asm volatile ("fence");
}
@@ -131,6 +132,7 @@ static inline void ds_ll_write_private_key_params(const uint8_t *encrypted_key_p
for (int i = 0; i < NUM_FRAGS; i++) {
memcpy((uint8_t *)frags[i].addr, from, frags[i].len);
asm volatile ("fence");
// Fence ensures all memory operations are completed before proceeding further
from += frags[i].len;
}
}
@@ -177,6 +179,7 @@ static inline ds_signature_check_t ds_ll_check_signature(void)
static inline void ds_ll_read_result(uint8_t *result, size_t size)
{
memcpy(result, (uint8_t*) DS_Z_BASE, size);
// Fence ensures all memory operations are completed before proceeding further
asm volatile ("fence");
}