casaroli opened a new pull request, #19796: URL: https://github.com/apache/nuttx/pull/19796
## Summary Split from #19772, part 2 of 3, as asked in review. This is the architecture-independent half: `mm/pgalloc` learns larger pages, and `arch/xtensa/src/common` learns `BUILD_KERNEL`. No chip code and no board code — those are part 3. `mm/pgalloc` supported 1 KB, 2 KB and 4 KB pages. The Espressif cache MMU has a fixed 64 KB page for external flash and 32 KB for external RAM, so those two sizes are added. Nothing else changes for existing users, who keep whatever they already selected. On the Xtensa side, `BUILD_KERNEL` needs the pieces every kernel build needs and Xtensa did not have: a kernel stack for a user thread, a signal trampoline that returns through a system call, an initial register state that starts a user task on the right stack at the right privilege, and the system call paths to move between the two worlds. Two details are worth a reviewer's attention. The kernel stack is aligned to 16 bytes because the windowed ABI requires it, and a stack pointer carries a base save area in the 16 bytes below it holding the caller's spilled `a0`–`a3`. Anything that moves or builds a stack pointer has to leave that area alone, which is why the signal trampoline reserves it explicitly rather than assuming the space below the pointer is free. `crt0.c` uses `STRINGIFY` from `nuttx/macro.h` rather than defining its own, per review. ## Impact Xtensa can be built with `CONFIG_BUILD_KERNEL` once a chip provides an address environment. No chip does so in this patch, so nothing changes for any existing configuration. `mm/pgalloc` gains two page sizes and changes no default. ## Testing Host: macOS 15 on Apple Silicon, `xtensa-esp32s3-elf-gcc` 12.2.0. `esp32s3-devkit:nsh` builds clean on this branch alone, which is the check that matters here: the common code compiles and links with no chip changes present. The kernel build that exercises this code lives in part 3, and its results are reported there. `tools/checkpatch.sh -c -u -m -g` reports no errors. depends-on: apache/nuttx/pull/19795 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
