ARMv7-A -R Architecture Reference Manual
clearly states that
An address used in an instruction, as a data or instruction address, is a Virtual Address (VA).
An address held in the PC, LR, or SP, is a VA.
The VA map runs from zero to the size of the VA space. For ARMv7, the maximum VA space is 4GB, giving a maximum VA range of 0x00000000 - 0xFFFFFFFF.
Also it is clear that this VA is translated to Physical Address which in turn is used to perform desired operation with physical memory.
Further on effects of disabling Memory Management Unit (which does actual memory mapping) are described, but this does not negate the fact that address is Virtual Address.
All-in-all with recent ARM architecture you do operate with Virtual Addresses unless you're writing the kernel, which has to deal with setting up paging and address translation. And if you're running your code under some Operating System you're all-safe.
This leads to answer for your second question. As you're secured by OS, you're free to try and access any address you wish, but access to a random address at worst will result in OS terminating your particular application. To identify which addresses you may have access to you may try and run your program under gdb
and list all the mapped memory with info proc mappings
gdb
command.
ldr
is a pseudo-op not a real instruction. See: infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0041c/… and infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0040d/… – Craig Esteyldr rt, =constant
form (it's the=
which makes all the difference); I read the question as referring toldr rt, <label>
, which is just syntax for the fundamental (and very real) "load register from memory" instruction with a PC-relative immediate offset. I guess the question could do with clarifying... – Notlikethat