Merge branch 'feat/psram_enc_exempt_v5.5' into 'release/v5.5'

feat(esp_psram): add option to carve unencrypted PSRAM region (v5.5)

See merge request espressif/esp-idf!49931
This commit is contained in:
Jiang Jiang Jian
2026-07-16 17:04:28 +08:00
11 changed files with 312 additions and 9 deletions
+18
View File
@@ -42,6 +42,24 @@ bool esp_psram_is_initialized(void);
*/
size_t esp_psram_get_size(void);
/**
* @brief Check if the pointer falls inside the unencrypted PSRAM carve-out region
*
* When @c CONFIG_SPIRAM_ENC_EXEMPT is enabled, esp_psram reserves a region of PSRAM
* that is mapped without encryption and exposed through the @c MALLOC_CAP_SPIRAM_NO_ENC
* heap capability. This function lets drivers verify whether a buffer returned by the
* heap allocator actually lives in that unencrypted region — useful for example after
* a @c heap_caps_malloc_prefer() call that may have fallen back to encrypted PSRAM.
*
* @param[in] p The pointer to check
*
* @return
* - true: the pointer is within the unencrypted PSRAM carve-out
* - false: the pointer is not in the carve-out, PSRAM is not initialized,
* or @c CONFIG_SPIRAM_ENC_EXEMPT is disabled
*/
bool esp_psram_ptr_is_no_enc(const void *p);
#ifdef __cplusplus
}
#endif