forked from espressif/esp-idf
Merge branch 'docs/fix_section_visibility_esp32p4' into 'master'
Fix typo to make a section visible for non-esp32 SPIRAM supported targets See merge request espressif/esp-idf!34482
This commit is contained in:
@@ -322,7 +322,7 @@ static inline void dma_desc_append(crypto_dma_desc_t **head, crypto_dma_desc_t *
|
|||||||
|
|
||||||
static inline void *aes_dma_calloc(size_t num, size_t size, uint32_t caps, size_t *actual_size)
|
static inline void *aes_dma_calloc(size_t num, size_t size, uint32_t caps, size_t *actual_size)
|
||||||
{
|
{
|
||||||
return heap_caps_aligned_calloc(DMA_DESC_MEM_ALIGN_SIZE, num, size, caps | MALLOC_CAP_DMA | MALLOC_CAP_8BIT);
|
return heap_caps_aligned_calloc(DMA_DESC_MEM_ALIGN_SIZE, num, size, caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline esp_err_t dma_desc_link(crypto_dma_desc_t *dmadesc, size_t crypto_dma_desc_num)
|
static inline esp_err_t dma_desc_link(crypto_dma_desc_t *dmadesc, size_t crypto_dma_desc_num)
|
||||||
@@ -766,14 +766,14 @@ int esp_aes_process_dma_gcm(esp_aes_context *ctx, const unsigned char *input, un
|
|||||||
|
|
||||||
out_desc_tail = &output_desc[output_dma_desc_num - 1];
|
out_desc_tail = &output_desc[output_dma_desc_num - 1];
|
||||||
|
|
||||||
len_desc = aes_dma_calloc(1, sizeof(crypto_dma_desc_t), MALLOC_CAP_DMA, NULL);
|
len_desc = aes_dma_calloc(1, sizeof(crypto_dma_desc_t), AES_DMA_ALLOC_CAPS, NULL);
|
||||||
if (len_desc == NULL) {
|
if (len_desc == NULL) {
|
||||||
mbedtls_platform_zeroize(output, len);
|
mbedtls_platform_zeroize(output, len);
|
||||||
ESP_LOGE(TAG, "Failed to allocate memory for len descriptor");
|
ESP_LOGE(TAG, "Failed to allocate memory for len descriptor");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t *len_buf = aes_dma_calloc(4, sizeof(uint32_t), MALLOC_CAP_DMA, NULL);
|
uint32_t *len_buf = aes_dma_calloc(4, sizeof(uint32_t), AES_DMA_ALLOC_CAPS, NULL);
|
||||||
if (len_buf == NULL) {
|
if (len_buf == NULL) {
|
||||||
mbedtls_platform_zeroize(output, len);
|
mbedtls_platform_zeroize(output, len);
|
||||||
ESP_LOGE(TAG, "Failed to allocate memory for len buffer");
|
ESP_LOGE(TAG, "Failed to allocate memory for len buffer");
|
||||||
|
@@ -105,7 +105,7 @@ DMA-Capable Memory
|
|||||||
|
|
||||||
Use the ``MALLOC_CAP_DMA`` flag to allocate memory which is suitable for use with hardware DMA engines (for example SPI and I2S). This capability flag excludes any external PSRAM.
|
Use the ``MALLOC_CAP_DMA`` flag to allocate memory which is suitable for use with hardware DMA engines (for example SPI and I2S). This capability flag excludes any external PSRAM.
|
||||||
|
|
||||||
.. only SOC_SPIRAM_SUPPORTED and not esp32::
|
.. only:: SOC_SPIRAM_SUPPORTED and not esp32
|
||||||
|
|
||||||
The EDMA hardware feature allows DMA buffers to be placed in external PSRAM, but there may be additional alignment constraints. Consult the {IDF_TARGET_NAME} Technical Reference Manual for details. To allocate a DMA-capable external memory buffer, use the ``MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA`` capabilities flags; the heap allocator will take care of alignment requirements imposed by the cache and DMA subsystems. If a peripheral has additional alignment requirements, you can use :cpp:func:`heap_caps_aligned_alloc` with the necessary alignment specified.
|
The EDMA hardware feature allows DMA buffers to be placed in external PSRAM, but there may be additional alignment constraints. Consult the {IDF_TARGET_NAME} Technical Reference Manual for details. To allocate a DMA-capable external memory buffer, use the ``MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA`` capabilities flags; the heap allocator will take care of alignment requirements imposed by the cache and DMA subsystems. If a peripheral has additional alignment requirements, you can use :cpp:func:`heap_caps_aligned_alloc` with the necessary alignment specified.
|
||||||
|
|
||||||
|
@@ -105,7 +105,7 @@ DMA 存储器
|
|||||||
|
|
||||||
使用 ``MALLOC_CAP_DMA`` 标志分配适合与硬件 DMA 引擎(如 SPI 和 I2S)配合使用的内存,此属性标志不包括外部 PSRAM。
|
使用 ``MALLOC_CAP_DMA`` 标志分配适合与硬件 DMA 引擎(如 SPI 和 I2S)配合使用的内存,此属性标志不包括外部 PSRAM。
|
||||||
|
|
||||||
.. only SOC_SPIRAM_SUPPORTED and not esp32::
|
.. only:: SOC_SPIRAM_SUPPORTED and not esp32
|
||||||
|
|
||||||
EDMA 硬件功能可以将 DMA buffer 放置在外部 PSRAM,但可能存在一定的对齐限制,详情请参阅 {IDF_TARGET_NAME} 技术参考手册。若要分配一个可用 DMA 的外部 buffer,请使用 ``MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA`` 属性标志,堆分配器将处理 cache 及 DMA 子系统的对齐要求。如果某个外设有额外的对齐要求,可以调用 :cpp:func:heap_caps_aligned_alloc 并指定必要的对齐方式。
|
EDMA 硬件功能可以将 DMA buffer 放置在外部 PSRAM,但可能存在一定的对齐限制,详情请参阅 {IDF_TARGET_NAME} 技术参考手册。若要分配一个可用 DMA 的外部 buffer,请使用 ``MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA`` 属性标志,堆分配器将处理 cache 及 DMA 子系统的对齐要求。如果某个外设有额外的对齐要求,可以调用 :cpp:func:heap_caps_aligned_alloc 并指定必要的对齐方式。
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user