docs(esp_psram): mirror carve-out review-feedback updates in zh_CN

Mirror the recent EN-side updates in the Chinese External RAM guide:

- Replace "PSRAM 顶部" with "PSRAM 上端(最高物理地址区)" to match the
  clarified wording on the EN side.
- Add the verification-helper pointer next to the heap_caps_malloc
  example so Chinese readers also learn about esp_psram_ptr_is_no_enc().

Also drop the :cpp:func: cross-reference for esp_psram_ptr_is_no_enc on
the EN side: esp_psram.h is not in any chip-specific Doxyfile, so
Sphinx/Breathe cannot resolve the reference. Use a plain inline code
literal instead, matching the existing reference style for
esp_psram_get_size and other esp_psram functions in the docs.
This commit is contained in:
Mahavir Jain
2026-05-20 11:19:42 +05:30
parent 77e85b886a
commit 9dd7a89fde
2 changed files with 4 additions and 2 deletions

View File

@@ -271,7 +271,7 @@ By default, failure to initialize external RAM will cause the ESP-IDF startup to
``MALLOC_CAP_SPIRAM_NO_ENC`` must be requested explicitly. It is intentionally not combined with ``MALLOC_CAP_SPIRAM`` or ``MALLOC_CAP_DEFAULT``, so ordinary SPIRAM/heap allocations cannot accidentally land in the unencrypted region.
To verify after the fact that a buffer was allocated from the unencrypted carve-out (for example after a ``heap_caps_malloc_prefer()`` call that may have fallen back to encrypted PSRAM), use :cpp:func:`esp_psram_ptr_is_no_enc`.
To verify after the fact that a buffer was allocated from the unencrypted carve-out (for example after a ``heap_caps_malloc_prefer()`` call that may have fallen back to encrypted PSRAM), use ``esp_psram_ptr_is_no_enc()``.
.. only:: SOC_PSRAM_ENCRYPTION_SEPARATE_KEY

View File

@@ -252,7 +252,7 @@ ESP-IDF 启动过程中,片外 RAM 被映射到数据虚拟地址空间,该
预留未加密的 PSRAM 区域
-----------------------
启用 :ref:`CONFIG_SPIRAM_ENC_EXEMPT` 会在 PSRAM 顶部预留一段区域(大小由 :ref:`CONFIG_SPIRAM_ENC_EXEMPT_SIZE` 指定,单位为 KB向上取整到 MMU 页面大小),该区域在映射时不启用加密。此区域被注册为一个独立的堆池,仅可通过 ``MALLOC_CAP_SPIRAM_NO_ENC`` 能力位访问。其余 PSRAM以及 flash仍然保持加密。
启用 :ref:`CONFIG_SPIRAM_ENC_EXEMPT` 会在 PSRAM 上端(最高物理地址区,大小由 :ref:`CONFIG_SPIRAM_ENC_EXEMPT_SIZE` 指定,单位为 KB向上取整到 MMU 页面大小)预留一段区域,该区域在映射时不启用加密。此区域被注册为一个独立的堆池,仅可通过 ``MALLOC_CAP_SPIRAM_NO_ENC`` 能力位访问。其余 PSRAM以及 flash仍然保持加密。
.. warning::
@@ -271,6 +271,8 @@ ESP-IDF 启动过程中,片外 RAM 被映射到数据虚拟地址空间,该
必须显式请求 ``MALLOC_CAP_SPIRAM_NO_ENC``。该能力位有意未与 ``MALLOC_CAP_SPIRAM````MALLOC_CAP_DEFAULT`` 组合,因此普通 SPIRAM/堆分配不会意外落入该未加密区域。
如需在分配后验证缓冲区是否确实位于未加密的预留区域(例如调用 ``heap_caps_malloc_prefer()`` 后可能回退到加密的 PSRAM可使用 ``esp_psram_ptr_is_no_enc()``
.. only:: SOC_PSRAM_ENCRYPTION_SEPARATE_KEY
在 {IDF_TARGET_NAME} 上PSRAM 加密可以使用独立的加密密钥。如果未烧录 PSRAM 加密密钥,则会使用 flash 加密密钥作为 PSRAM 加密密钥。