ARM Technical Support Knowledge Articles

I want code to translate virtual addresses to physical addresses

Applies to: ARM11 processors, ARM9 processors

Answer

If the core is an ARM1176, for example, there are specific cp15 operations for performing VA to PA translations in secure and non-secure worlds. See 3.2.22 of the ARM1176JZ-S TRM.

Something like an ARM9 class of processor or ARM1136 would not have this capability.

There is no easy way for user code to access the translation. While the MMU is switched on, it is not trivial to figure out which virtual address matches the physical address stored in the TTBR. In fact, this physical address may not even exist in the virtual memory map.

It is expected that the operating system will configure the page tables and will know how to modify them, but it is not expected for applications even to have access to that memory.

Switching off the MMU would guarantee the ability to read the page table entries, but this has other difficulties (for example, the code to do this would need to be privileged and located in a flat-mapped memory region).

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential