6.3 About virtual and physical memory

Processors that contain a Memory Management Unit (MMU) provide two views of memory, virtual and physical. The virtual address is the address prior to address translation in the MMU and the physical address is the address after translation.

Normally when the debugger accesses memory, it uses virtual addresses. However, if the MMU is disabled, then the mapping is flat and the virtual address is the same as the physical address.

To force the debugger to use physical addresses, prefix the addresses with P:.

For example:

P:0x8000
P:0+main creates a physical address with the address offset of main()

If your processor also contains TrustZone technology, then you have access to Secure and Normal worlds, each with their own separate virtual and physical address mappings. In this case, the address prefix P: is not available, and instead you must use NP: for normal physical and SP: for secure physical.

Note:

  • Processors that are compliant with ARM® Architectures prior to ARMv6 do not support physical addressing in this manner. This includes the ARM7 and ARM9 family of processors.
  • Physical address access is not enabled for all operations. For example, the ARM hardware does not support setting breakpoints via a physical address.

    When memory is accessed via a physical address, the caches are not flushed. Hence, results might differ depending on whether you view memory through the physical or virtual addresses (assuming they are addressing the same memory addresses).

Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.