mm_pginitialize() documents heap_start as "the physical address of the start of memory region", and every x86_64 consumer of mm_pgalloc() agrees: create_spgtables(), x86_64_get_pgtable() and up_addrenv_create() all put the result through x86_64_pgvaddr() before touching it. x86_64_pgvaddr() in turn range-checks against CONFIG_ARCH_PGPOOL_PBASE (arch/x86_64/src/common/ pgalloc.h:67). arm64's equivalent passes CONFIG_ARCH_PGPOOL_PBASE. up_allocate_pgheap() passed CONFIG_ARCH_PGPOOL_VBASE instead, and in the other branch X86_64_PGPOOL_BASE + X86_64_LOAD_OFFSET, which is the same mistake spelled out. Every page handed out was therefore a virtual address that fell outside the pool's physical window, x86_64_pgvaddr() returned 0, and the first x86_64_pgwipe() memset NULL. It presents as a page fault in memset() under create_spgtables() the first time a process address environment is created, which is loading the init program. qemu-intel64:knsh_romfs sets PGPOOL_PBASE=0x00c000000 and PGPOOL_VBASE=0x10c000000, so the value passed was off by the 4GB load offset. Impact: runtime, CONFIG_ARCH_ADDRENV builds only (CONFIG_MM_PGALLOC). Assisted-by: Claude:claude-opus-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com> |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.
Getting Started
First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.
Documentation
You can find the current NuttX documentation on the Documentation Page.
Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.
The old NuttX documentation is still available in the Apache wiki.
Supported Boards
NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.
Contributing
If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.
License
The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.