nuttx/arch/arm
Marco Casaroli 3297bbec44 arch/arm/mps: Let user code run modules from the text and data heaps.
In a protected build a module loaded by exec() runs as a user task, and
the loader puts it in the text and data heaps, which on this chip are
SRAM2.  Nothing gave user code access to SRAM2: the region that would have
done so, in arm_addregion(), exists only with CONFIG_MM_REGIONS > 1, and it
is built with mpu_user_intsram(), which on ARMv8-M is execute-never.  So
the module faulted on its first instruction.

The protected build now maps SRAM2 for user code to read, write and
execute when either heap is in use.  Privileged execution stays allowed,
since a kernel module loaded with insmod lands in the same heaps.

On mps3-an547:knsh under QEMU, with CONFIG_ELF, both heaps and the ROMFS
variant of examples/elf, errno faulted on its first instruction with an
instruction access violation at 0x21000001.  Now every module of the
example runs to the end.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-09-28 16:46:05 -03:00
..
include arch/arm/rtl8730e: add UART character driver support 2026-09-24 21:24:35 +08:00
src arch/arm/mps: Let user code run modules from the text and data heaps. 2026-09-28 16:46:05 -03:00
CMakeLists.txt
Kconfig arm/nrf54l: add initial nrf54l support 2026-09-24 11:10:46 +08:00