Memory aliasing and mismatched memory types
When a given location in the physical address space has multiple virtual addresses, this is called aliasing.
Attributes are based on virtual addresses. This is because attributes come from the translation tables. When a physical location has multiple aliases, it is important that all of the virtual aliases have compatible attributes. We describe compatible as:
- Same memory type, and for Device the same sub-type
- For Normal locations, the same cacheability and shareability
If the attributes are not compatible, the memory accesses might not behave like you expect, which can impact performance.
This diagram shows two examples of aliasing. The two aliases of location A have compatible attributes. This is the recommended approach. The two aliases of location B have incompatible attributes (Normal and Device), which can negatively affect coherency and performance:
Arm strongly recommends that software does not assign incompatible attributes to different aliases of the same location.