refactor(esp_tee): Update the SHA clock configuration service call

This commit is contained in:
Laukik Hase
2025-03-03 15:14:32 +05:30
parent 3e95020c59
commit bd314c2460
5 changed files with 13 additions and 7 deletions

View File

@@ -31,6 +31,10 @@ if(NOT non_os_build)
list(APPEND srcs "src/esp_crypto_lock.c" "src/esp_crypto_periph_clk.c")
list(APPEND priv_requires efuse esp_hw_support esp_system esp_timer)
elseif(esp_tee_build)
list(APPEND srcs "src/esp_crypto_periph_clk.c")
list(APPEND includes "src/${IDF_TARGET}")
list(APPEND priv_requires esp_hw_support)
endif()
idf_component_register(SRCS ${srcs}

View File

@@ -208,9 +208,9 @@ secure_services:
type: IDF
function: esp_sha_write_digest_state
args: 2
- id: 132
- id: 98
type: IDF
function: esp_sha_enable_periph_clk
function: esp_crypto_sha_enable_periph_clk
args: 1
# ID: 134-149 (16) - eFuse
- family: efuse

View File

@@ -228,9 +228,9 @@ void __wrap_esp_sha_write_digest_state(esp_sha_type sha_type, void *digest_state
esp_tee_service_call(3, SS_ESP_SHA_WRITE_DIGEST_STATE, sha_type, digest_state);
}
void __wrap_esp_sha_enable_periph_clk(bool enable)
void __wrap_esp_crypto_sha_enable_periph_clk(bool enable)
{
esp_tee_service_call(2, SS_ESP_SHA_ENABLE_PERIPH_CLK, enable);
esp_tee_service_call(2, SS_ESP_CRYPTO_SHA_ENABLE_PERIPH_CLK, enable);
}
/* ---------------------------------------------- MMU HAL ------------------------------------------------- */

View File

@@ -26,7 +26,7 @@
#include "soc/soc_caps.h"
#include "aes/esp_aes.h"
#include "sha/sha_core.h"
#include "esp_sha_internal.h"
#include "esp_crypto_periph_clk.h"
#include "esp_tee.h"
#include "esp_tee_memory_utils.h"
@@ -326,9 +326,9 @@ void _ss_esp_sha_block(esp_sha_type sha_type, const void *data_block, bool is_fi
esp_sha_block(sha_type, data_block, is_first_block);
}
void _ss_esp_sha_enable_periph_clk(bool enable)
void _ss_esp_crypto_sha_enable_periph_clk(bool enable)
{
esp_sha_enable_periph_clk(enable);
esp_crypto_sha_enable_periph_clk(enable);
}
/* ---------------------------------------------- OTA ------------------------------------------------- */

View File

@@ -40,6 +40,8 @@ endforeach()
target_link_libraries(${COMPONENT_LIB} INTERFACE ${mbedtls_targets})
target_link_libraries(mbedcrypto PRIVATE idf::esp_security)
target_include_directories(mbedcrypto PRIVATE ${crypto_port_inc_dirs})
# Shared GDMA layer for TEE