Skip to content

Commit 9bb7aa8

Browse files
Merge branch 'feat/mbedtls_aes_tests_v5.5' into 'release/v5.5'
Only reallocate unaligned external AES and SHA buffers (v5.5) See merge request espressif/esp-idf!44162
2 parents b66a069 + 11c8f6a commit 9bb7aa8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/mbedtls/port/aes/dma/esp_aes_dma_core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,11 +1020,12 @@ int esp_aes_process_dma(esp_aes_context *ctx, const unsigned char *input, unsign
10201020
#if (CONFIG_SPIRAM && SOC_PSRAM_DMA_CAPABLE)
10211021
#ifdef SOC_GDMA_EXT_MEM_ENC_ALIGNMENT
10221022
if (efuse_hal_flash_encryption_enabled()) {
1023-
if (esp_ptr_external_ram(input) || esp_ptr_external_ram(output) || esp_ptr_in_drom(input) || esp_ptr_in_drom(output)) {
1023+
if (esp_ptr_external_ram(input) || esp_ptr_in_drom(input)) {
10241024
if (((intptr_t)(input) & (SOC_GDMA_EXT_MEM_ENC_ALIGNMENT - 1)) != 0) {
10251025
input_needs_realloc = true;
10261026
}
1027-
1027+
}
1028+
if (esp_ptr_external_ram(output) || esp_ptr_in_drom(output)) {
10281029
if (((intptr_t)(output) & (SOC_GDMA_EXT_MEM_ENC_ALIGNMENT - 1)) != 0) {
10291030
output_needs_realloc = true;
10301031
}

0 commit comments

Comments
 (0)