From 0b2f0a32132a1ed2ec8eaa19205817e39a0fcc17 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Sun, 9 May 2021 16:32:57 +0530 Subject: [PATCH] bt: use generic SPIRAM config option for memory alloc policy --- components/bt/esp_ble_mesh/Kconfig.in | 15 ++++++++++----- components/bt/host/nimble/Kconfig.in | 7 +------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/bt/esp_ble_mesh/Kconfig.in b/components/bt/esp_ble_mesh/Kconfig.in index f5eeabae12..918f55b9e6 100644 --- a/components/bt/esp_ble_mesh/Kconfig.in +++ b/components/bt/esp_ble_mesh/Kconfig.in @@ -33,20 +33,25 @@ if BLE_MESH behavior in ESP-IDF - Internal IRAM memory wherever applicable else internal DRAM - Recommended mode here is always internal, since that is most preferred - from security perspective. But if application requirement does not allow - sufficient free internal memory then alternate mode can be selected. + Recommended mode here is always internal (*), since that is most preferred + from security perspective. But if application requirement does not + allow sufficient free internal memory then alternate mode can be + selected. + + (*) In case of ESP32-S2/ESP32-S3, hardware allows encryption of external + SPIRAM contents provided hardware flash encryption feature is enabled. + In that case, using external SPIRAM allocation strategy is also safe choice + from security perspective. config BLE_MESH_MEM_ALLOC_MODE_INTERNAL bool "Internal DRAM" config BLE_MESH_MEM_ALLOC_MODE_EXTERNAL bool "External SPIRAM" - depends on ESP32_SPIRAM_SUPPORT + depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC config BLE_MESH_MEM_ALLOC_MODE_DEFAULT bool "Default alloc mode" - depends on ESP32_SPIRAM_SUPPORT help Enable this option to use the default memory allocation strategy when external SPIRAM is enabled. See the SPIRAM options for more details. diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 8e321f8647..ff6994c4dd 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -12,17 +12,12 @@ choice BT_NIMBLE_MEM_ALLOC_MODE behavior in ESP-IDF - Internal IRAM memory wherever applicable else internal DRAM - Recommended mode here is always internal, since that is most preferred - from security perspective. But if application requirement does not - allow sufficient free internal memory then alternate mode can be - selected. - config BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL bool "Internal memory" config BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL bool "External SPIRAM" - depends on ESP32_SPIRAM_SUPPORT + depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC config BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT bool "Default alloc mode"