forked from espressif/esp-idf
refactor(esp_tee): Update the SHA clock configuration service call
This commit is contained in:
@@ -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 srcs "src/esp_crypto_lock.c" "src/esp_crypto_periph_clk.c")
|
||||||
list(APPEND priv_requires efuse esp_hw_support esp_system esp_timer)
|
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()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS ${srcs}
|
idf_component_register(SRCS ${srcs}
|
||||||
|
@@ -208,9 +208,9 @@ secure_services:
|
|||||||
type: IDF
|
type: IDF
|
||||||
function: esp_sha_write_digest_state
|
function: esp_sha_write_digest_state
|
||||||
args: 2
|
args: 2
|
||||||
- id: 132
|
- id: 98
|
||||||
type: IDF
|
type: IDF
|
||||||
function: esp_sha_enable_periph_clk
|
function: esp_crypto_sha_enable_periph_clk
|
||||||
args: 1
|
args: 1
|
||||||
# ID: 134-149 (16) - eFuse
|
# ID: 134-149 (16) - eFuse
|
||||||
- family: efuse
|
- family: efuse
|
||||||
|
@@ -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);
|
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 ------------------------------------------------- */
|
/* ---------------------------------------------- MMU HAL ------------------------------------------------- */
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "aes/esp_aes.h"
|
#include "aes/esp_aes.h"
|
||||||
#include "sha/sha_core.h"
|
#include "sha/sha_core.h"
|
||||||
#include "esp_sha_internal.h"
|
#include "esp_crypto_periph_clk.h"
|
||||||
|
|
||||||
#include "esp_tee.h"
|
#include "esp_tee.h"
|
||||||
#include "esp_tee_memory_utils.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);
|
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 ------------------------------------------------- */
|
/* ---------------------------------------------- OTA ------------------------------------------------- */
|
||||||
|
@@ -40,6 +40,8 @@ endforeach()
|
|||||||
|
|
||||||
target_link_libraries(${COMPONENT_LIB} INTERFACE ${mbedtls_targets})
|
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})
|
target_include_directories(mbedcrypto PRIVATE ${crypto_port_inc_dirs})
|
||||||
|
|
||||||
# Shared GDMA layer for TEE
|
# Shared GDMA layer for TEE
|
||||||
|
Reference in New Issue
Block a user