mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +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_ARGCAT is not set
|
||||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||||
# CONFIG_TESTING_CRYPTO_3DES_CBC 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_AES_XTS is not set
|
||||||
# CONFIG_TESTING_CRYPTO_HASH_HUGE_BLOCK is not set
|
# CONFIG_TESTING_CRYPTO_HASH_HUGE_BLOCK is not set
|
||||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||||
@@ -26,10 +24,12 @@ CONFIG_ARCH_XTENSA=y
|
|||||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||||
CONFIG_BUILTIN=y
|
CONFIG_BUILTIN=y
|
||||||
CONFIG_CRYPTO=y
|
CONFIG_CRYPTO=y
|
||||||
|
CONFIG_CRYPTO_AES=y
|
||||||
CONFIG_CRYPTO_CRYPTODEV=y
|
CONFIG_CRYPTO_CRYPTODEV=y
|
||||||
CONFIG_CRYPTO_CRYPTODEV_HARDWARE=y
|
CONFIG_CRYPTO_CRYPTODEV_HARDWARE=y
|
||||||
CONFIG_CRYPTO_RANDOM_POOL=y
|
CONFIG_CRYPTO_RANDOM_POOL=y
|
||||||
CONFIG_ESP32S2_UART0=y
|
CONFIG_ESP32S2_UART0=y
|
||||||
|
CONFIG_ESPRESSIF_AES_ACCELERATOR=y
|
||||||
CONFIG_ESPRESSIF_SHA_ACCELERATOR=y
|
CONFIG_ESPRESSIF_SHA_ACCELERATOR=y
|
||||||
CONFIG_FS_PROCFS=y
|
CONFIG_FS_PROCFS=y
|
||||||
CONFIG_HAVE_CXX=y
|
CONFIG_HAVE_CXX=y
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
# CONFIG_NSH_ARGCAT is not set
|
# CONFIG_NSH_ARGCAT is not set
|
||||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||||
# CONFIG_TESTING_CRYPTO_3DES_CBC 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_AES_XTS is not set
|
||||||
# CONFIG_TESTING_CRYPTO_HASH_HUGE_BLOCK is not set
|
# CONFIG_TESTING_CRYPTO_HASH_HUGE_BLOCK is not set
|
||||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||||
@@ -27,10 +25,12 @@ CONFIG_ARCH_XTENSA=y
|
|||||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||||
CONFIG_BUILTIN=y
|
CONFIG_BUILTIN=y
|
||||||
CONFIG_CRYPTO=y
|
CONFIG_CRYPTO=y
|
||||||
|
CONFIG_CRYPTO_AES=y
|
||||||
CONFIG_CRYPTO_CRYPTODEV=y
|
CONFIG_CRYPTO_CRYPTODEV=y
|
||||||
CONFIG_CRYPTO_CRYPTODEV_HARDWARE=y
|
CONFIG_CRYPTO_CRYPTODEV_HARDWARE=y
|
||||||
CONFIG_CRYPTO_RANDOM_POOL=y
|
CONFIG_CRYPTO_RANDOM_POOL=y
|
||||||
CONFIG_ESP32S3_UART0=y
|
CONFIG_ESP32S3_UART0=y
|
||||||
|
CONFIG_ESPRESSIF_AES_ACCELERATOR=y
|
||||||
CONFIG_ESPRESSIF_SHA_ACCELERATOR=y
|
CONFIG_ESPRESSIF_SHA_ACCELERATOR=y
|
||||||
CONFIG_FS_PROCFS=y
|
CONFIG_FS_PROCFS=y
|
||||||
CONFIG_HAVE_CXX=y
|
CONFIG_HAVE_CXX=y
|
||||||
|
|||||||
@@ -120,8 +120,8 @@
|
|||||||
#include "esp32s3_board_sdmmc.h"
|
#include "esp32s3_board_sdmmc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
# include "esp32s3_aes.h"
|
# include "espressif/esp_aes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESPRESSIF_ADC
|
#ifdef CONFIG_ESPRESSIF_ADC
|
||||||
@@ -149,6 +149,10 @@
|
|||||||
# include "espressif/esp_sha.h"
|
# include "espressif/esp_sha.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
|
# include "espressif/esp_aes.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESPRESSIF_USE_ULP_RISCV_CORE
|
#ifdef CONFIG_ESPRESSIF_USE_ULP_RISCV_CORE
|
||||||
# include "espressif/esp_ulp.h"
|
# include "espressif/esp_ulp.h"
|
||||||
# ifdef CONFIG_ESPRESSIF_ULP_USE_TEST_BIN
|
# ifdef CONFIG_ESPRESSIF_ULP_USE_TEST_BIN
|
||||||
@@ -247,14 +251,23 @@ int esp32s3_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ESPRESSIF_SHA_ACCELERATOR) && \
|
#if !defined(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
|
||||||
!defined(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
|
# if defined(CONFIG_ESPRESSIF_SHA_ACCELERATOR)
|
||||||
ret = esp_sha_init();
|
ret = esp_sha_init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR,
|
syslog(LOG_ERR,
|
||||||
"ERROR: Failed to initialize SHA: %d\n", ret);
|
"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
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FS_PROCFS
|
#ifdef CONFIG_FS_PROCFS
|
||||||
@@ -560,8 +573,8 @@ int esp32s3_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
ret = esp32s3_aes_init();
|
ret = esp_aes_init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
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
|
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR_TEST
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
esp32s3_aes_test();
|
esp_aes_test();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -110,8 +110,8 @@
|
|||||||
#include "esp32s3_board_sdmmc.h"
|
#include "esp32s3_board_sdmmc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
# include "esp32s3_aes.h"
|
# include "espressif/esp_aes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_ADC
|
#ifdef CONFIG_ESP32S3_ADC
|
||||||
@@ -439,8 +439,8 @@ int esp32s3_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
ret = esp32s3_aes_init();
|
ret = esp_aes_init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
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
|
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR_TEST
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
esp32s3_aes_test();
|
esp_aes_test();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -109,8 +109,8 @@
|
|||||||
#include "esp32s3_board_sdmmc.h"
|
#include "esp32s3_board_sdmmc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
# include "esp32s3_aes.h"
|
# include "espressif/esp_aes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_QMI8658
|
#ifdef CONFIG_SENSORS_QMI8658
|
||||||
@@ -468,8 +468,8 @@ int esp32s3_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR
|
#ifdef CONFIG_ESPRESSIF_AES_ACCELERATOR
|
||||||
ret = esp32s3_aes_init();
|
ret = esp_aes_init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to initialize AES: %d\n", ret);
|
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
|
#ifdef CONFIG_ESP32S3_AES_ACCELERATOR_TEST
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
esp32s3_aes_test();
|
esp_aes_test();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user