mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 15:50:23 +00:00
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> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||
| Kconfig | ||