mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 07:18:49 +08:00
boards/xtensa/espressif: Add AES accelerator board support
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
Add AES accelerator board support for esp32[-s2|-s3] Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
This commit is contained in:
committed by
Alan C. Assis
parent
5b6d0e9d49
commit
f7614f640f
@@ -9,8 +9,6 @@
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_TESTING_CRYPTO_3DES_CBC is not set
|
||||
# CONFIG_TESTING_CRYPTO_AES_CBC is not set
|
||||
# CONFIG_TESTING_CRYPTO_AES_CTR is not set
|
||||
# CONFIG_TESTING_CRYPTO_AES_XTS is not set
|
||||
# CONFIG_TESTING_CRYPTO_HASH_HUGE_BLOCK is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
@@ -26,10 +24,12 @@ CONFIG_ARCH_XTENSA=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_CRYPTODEV=y
|
||||
CONFIG_CRYPTO_CRYPTODEV_HARDWARE=y
|
||||
CONFIG_CRYPTO_RANDOM_POOL=y
|
||||
CONFIG_ESP32S2_UART0=y
|
||||
CONFIG_ESPRESSIF_AES_ACCELERATOR=y
|
||||
CONFIG_ESPRESSIF_SHA_ACCELERATOR=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_TESTING_CRYPTO_3DES_CBC is not set
|
||||
# CONFIG_TESTING_CRYPTO_AES_CBC is not set
|
||||
# CONFIG_TESTING_CRYPTO_AES_CTR is not set
|
||||
# CONFIG_TESTING_CRYPTO_AES_XTS is not set
|
||||
# CONFIG_TESTING_CRYPTO_HASH_HUGE_BLOCK is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
@@ -27,10 +25,12 @@ CONFIG_ARCH_XTENSA=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_AES=y
|
||||
CONFIG_CRYPTO_CRYPTODEV=y
|
||||
CONFIG_CRYPTO_CRYPTODEV_HARDWARE=y
|
||||
CONFIG_CRYPTO_RANDOM_POOL=y
|
||||
CONFIG_ESP32S3_UART0=y
|
||||
CONFIG_ESPRESSIF_AES_ACCELERATOR=y
|
||||
CONFIG_ESPRESSIF_SHA_ACCELERATOR=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
#include "esp32s3_board_sdmmc.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
||||
# include "esp32s3_aes.h"
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
# include "espressif/esp_aes.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_ADC
|
||||
@@ -149,6 +149,10 @@
|
||||
# include "espressif/esp_sha.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
# include "espressif/esp_aes.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_USE_ULP_RISCV_CORE
|
||||
# include "espressif/esp_ulp.h"
|
||||
# ifdef CONFIG_ESPRESSIF_ULP_USE_TEST_BIN
|
||||
@@ -247,14 +251,23 @@ int esp32s3_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESPRESSIF_SHA_ACCELERATOR) && \
|
||||
!defined(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
|
||||
#if !defined(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
|
||||
# if defined(CONFIG_ESPRESSIF_SHA_ACCELERATOR)
|
||||
ret = esp_sha_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to initialize SHA: %d\n", ret);
|
||||
}
|
||||
# endif
|
||||
|
||||
# if defined(CONFIG_ESPRESSIF_AES_ACCELERATOR)
|
||||
ret = esp_aes_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
@@ -560,8 +573,8 @@ int esp32s3_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
||||
ret = esp32s3_aes_init();
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
ret = esp_aes_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
||||
@@ -569,7 +582,7 @@ int esp32s3_bringup(void)
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR_TEST
|
||||
else
|
||||
{
|
||||
esp32s3_aes_test();
|
||||
esp_aes_test();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -110,8 +110,8 @@
|
||||
#include "esp32s3_board_sdmmc.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
||||
# include "esp32s3_aes.h"
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
# include "espressif/esp_aes.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_ADC
|
||||
@@ -439,8 +439,8 @@ int esp32s3_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
||||
ret = esp32s3_aes_init();
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
ret = esp_aes_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
||||
@@ -448,7 +448,7 @@ int esp32s3_bringup(void)
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR_TEST
|
||||
else
|
||||
{
|
||||
esp32s3_aes_test();
|
||||
esp_aes_test();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -109,8 +109,8 @@
|
||||
#include "esp32s3_board_sdmmc.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
||||
# include "esp32s3_aes.h"
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
# include "espressif/esp_aes.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_QMI8658
|
||||
@@ -468,8 +468,8 @@ int esp32s3_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
||||
ret = esp32s3_aes_init();
|
||||
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||
ret = esp_aes_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
||||
@@ -477,7 +477,7 @@ int esp32s3_bringup(void)
|
||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR_TEST
|
||||
else
|
||||
{
|
||||
esp32s3_aes_test();
|
||||
esp_aes_test();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user