nuttx/arch/arm64
Royyan Zahir abbfb31a02 arch/arm64: implement up_addrenv_va_to_pa().
up_addrenv_va_to_pa() is declared in include/nuttx/arch.h but implemented
only by armv7-a, so no arm64 port can map a virtual address to a physical
one. A driver whose device addresses memory physically has nothing to call.

The translation is asked of the MMU with AT S1E1R rather than walked in
software, so it answers for whatever is actually mapped: any granule size,
block or page, at any level, and it cannot drift from the tables in use.

PAR_EL1 is one register per CPU, so nothing may run between the translation
and reading the result. Interrupts are banked with it, so masking them
locally is sufficient and SMP needs nothing further.

Returns zero for an address that is not mapped for a privileged read, which
is what the declaration in arch.h specifies. Note this differs from the
armv7-a implementation, which returns the virtual address unchanged.

Signed-off-by: Royyan Zahir <royzah@gmail.com>
2026-09-20 11:58:33 -03:00
..
include arch/atomic: remove up_testset in spinlock 2026-09-08 08:58:54 +08:00
src arch/arm64: implement up_addrenv_va_to_pa(). 2026-09-20 11:58:33 -03:00
CMakeLists.txt arch/arm64: migrate to SPDX identifier 2024-12-02 22:43:23 +08:00
Kconfig arch/atomic: remove up_testset in spinlock 2026-09-08 08:58:54 +08:00