This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6707d3e13d271c4a8d098d31f87b45585fc0e361 Author: Marco Casaroli <[email protected]> AuthorDate: Wed Oct 21 20:53:29 2026 +0200 Documentation/esp32s3: Say that the PSRAM is the page pool in the kernel build. The kernel build of the ESP32-S3 keeps the kernel in the internal SRAM and gives all of the PSRAM but its first page to the page pool. Say so in the chip page and in the kernel_oct and kernel_n8r2 sections. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- .../xtensa/esp32s3/boards/esp32s3-devkit/index.rst | 15 +++++++++------ Documentation/platforms/xtensa/esp32s3/index.rst | 7 ++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst index b1351c4f1b4..11b31cf37b4 100644 --- a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst @@ -378,8 +378,9 @@ kernel_n8r2 A KERNEL build for a module with 2 MB of PSRAM, such as the ESP32-S3-WROOM-1-N8R2. The flash is quad and runs in DIO mode. -The page pool is smaller than in ``kernel_oct``, and each of the text, data -and heap regions of a process is 2 pages of 64 KiB. A process therefore takes +The page pool is smaller than in ``kernel_oct`` (all of the PSRAM but its +first page: 31 pages of 64 KiB), and each of the text, data and heap regions +of a process is 2 pages of 64 KiB. A process therefore takes 384 KiB, and a ``fork()`` needs 768 KiB while the parent and the child both exist. @@ -398,10 +399,12 @@ only build mode in which ``fork()`` is available on this chip: the child receives its own copy of the memory of the parent, at the same virtual addresses. ``vfork()`` is available in every build mode. -The page pool holds the pages of every process. It is carved out of the -PSRAM, and it is not kept mapped into the kernel address space. The kernel -reaches a page of the pool through a small scratch region, mapped for one -operation and invalidated afterwards. +The page pool holds the pages of every process. It is all of the PSRAM but +its first page (to the page allocator the physical address 0 means "no +page"): 127 pages of 64 KiB. The kernel runs in the internal SRAM and keeps +no mapping of the PSRAM after the boot. It reaches a page of the pool +through a small scratch region, mapped for one operation and invalidated +afterwards. Build the kernel first, then the applications, then the boot ROMFS, and then link the kernel again. The ROMFS is linked into the kernel image, so a change diff --git a/Documentation/platforms/xtensa/esp32s3/index.rst b/Documentation/platforms/xtensa/esp32s3/index.rst index 06bfef30c87..5de825cbbe0 100644 --- a/Documentation/platforms/xtensa/esp32s3/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/index.rst @@ -889,9 +889,10 @@ The ESP32-S3 supports the three NuttX build modes: See :ref:`esp32s3-devkit:knsh <platforms/xtensa/esp32s3/boards/esp32s3-devkit/index:knsh>` and :ref:`esp32s3-devkit:ksta_softap <platforms/xtensa/esp32s3/boards/esp32s3-devkit/index:ksta_softap>`. * **KERNEL**: every program is a separate ELF file with its own address environment, protected by WC and PMS in the same way. The MMU maps flash - and PSRAM in pages of 64 KiB. The pages of every process come from a page - pool in PSRAM, and the kernel switches the mappings with the process. This - is the only build mode with ``fork()``. + and PSRAM in pages of 64 KiB. The kernel uses the internal SRAM, and the + PSRAM is the page pool: the pages of every process come from it, and the + kernel switches the mappings with the process. This is the only build mode + with ``fork()``. See :ref:`esp32s3-devkit:kernel_oct <platforms/xtensa/esp32s3/boards/esp32s3-devkit/index:kernel_oct>` and :ref:`esp32s3-devkit:kernel_n8r2 <platforms/xtensa/esp32s3/boards/esp32s3-devkit/index:kernel_n8r2>`. Faults in User Code
