nuttx/arch/arm64
Marco Casaroli 42fc52a1e9 arch/arm64: Implement up_addrenv_pa_to_va().
OpenAMP libmetal calls up_addrenv_pa_to_va() and up_addrenv_va_to_pa(),
and every virtio driver uses libmetal.  With CONFIG_DEV_SIMPLE_ADDRENV,
drivers/misc/addrenv.c provides both.  Without it, arm64 provides only
up_addrenv_va_to_pa(), in arm64_physpgaddr.c.  So an arm64 build with
an MMU and any virtio driver does not link, flat or kernel:

  undefined reference to `up_addrenv_pa_to_va'

The flat qemu-armv8a virtio configurations set CONFIG_DEV_SIMPLE_ADDRENV.
That does not fit a kernel build: its table gives the same address back
for a user address of the process.

Add up_addrenv_pa_to_va() next to up_addrenv_va_to_pa().  It translates
the page pool and the kernel RAM with arm64_pgvaddr(), and any other
address to itself.  up_addrenv_va_to_pa() must then give back the same
physical address, otherwise the function returns NULL, as
include/nuttx/arch.h specifies.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-10-08 14:52:28 -03:00
..
include arch/atomic: remove up_testset in spinlock 2026-09-08 08:58:54 +08:00
src arch/arm64: Implement up_addrenv_pa_to_va(). 2026-10-08 14:52:28 -03:00
CMakeLists.txt arch/arm64: migrate to SPDX identifier 2024-12-02 22:43:23 +08:00
Kconfig arch/arm64: AES using the Armv8 Cryptography Extension. 2026-09-21 18:43:36 +08:00