DEN0001C Principles of Arm Memory Maps
DEN0001C Principles of Arm Memory Maps
Release information
The Change history table lists the changes made to this document.
Proprietary Notice
Words and logos marked with ® or ® are registered trademarks or trademarks of ARM® in the EU and
other countries, except as otherwise stated below in this proprietary notice. Other brands and names
mentioned herein may be the trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document
may be adapted or reproduced in any material form except with the prior written permission of the
copyright holder.
The product described in this document is subject to continuous developments and improvements. All
particulars of the product and its use contained in this document are given by ARM in good faith. However,
all warranties implied or expressed, including but not limited to implied warranties of merchantability, or
fitness for purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM shall not be liable for
any loss or damage arising from the use of any information in this document, or any error or omission in
such information, or any incorrect use of the product.
Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject to
license restrictions in accordance with the terms of the agreement entered into by ARM and the party that
ARM delivered this document to.
Web Address
http://www.arm.com
Table of Contents
1 Introduction ................................................................................................................ 4
1.1 Scope.................................................................................................................. 4
1.2 Additional reading ............................................................................................... 4
1.3 Conventions ........................................................................................................ 4
2 Overview ..................................................................................................................... 5
2.1 CPUs and hardware ........................................................................................... 6
2.2 Software Portability ............................................................................................. 7
2.3 Address Map overview ....................................................................................... 9
3 Address map principles .......................................................................................... 10
4 32-bit, 36-bit and 40-bit ARM Address Maps......................................................... 14
4.1 32-bit Memory Map ........................................................................................... 15
4.2 36-bit Memory Map ........................................................................................... 16
4.3 40-bit Memory Map ........................................................................................... 17
5 Proposed 44-bit and 48bit Address Maps ............................................................. 19
5.1 44-bit Memory Map ........................................................................................... 20
5.2 48-bit Memory Map ........................................................................................... 21
6 Glossary.................................................................................................................... 22
7 Appendix A: Memory map example, ARM Versatile Express ............................. 23
1 Introduction
This document describes the address maps used by ARM for A-class systems, from
models and emulators to development boards and complex SoCs.
It explains the choice of address partitioning for memories, peripherals, and expansion
spaces.
It describes the issues and constraints when 32bit platform operating systems use a 36-bit
or 40-bit address space, and the restrictions imposed by 32-bit bus masters and
peripherals.
It extends the memory maps to 48-bits of address space for future 64-bit ARM systems,
1.1 Scope
This document is applicable to ARM systems containing:
• 32-bit ARMv7 A-profile CPUs with Large Physical Address Extension (LPAE).
• 64-bit ARMv8 A-profile CPUs
This document replaces the deprecated DEN001 Principles of ARM Memory Maps PDD.
1.3 Conventions
This paper uses the terms memory map and address map interchangeably.
2 Overview
ARM creates a variety of development systems to support A-class cortex CPUs, ranging
from cycle accurate RTL models, to fast software models, onto FPGAs and full custom
SoCs. ARM has been harmonizing the memory maps in these systems to provide internal
consistency and software portability, and to address the constraints that come with mixing
32-bit components within larger address spaces.
The introduction of Large Physical Address Extension (LPAE) to ARMv7 class CPUs has
grown the physical address spaces to 36-bit and 40-bits, providing 64GB or 1024GB (1TB)
memory space. Likewise the 64-bit ARMv8 architecture can address 48-bits, providing
256TB.
This paper describes ARM address maps for 32, 36 and 40-bit systems, and proposes
extensions for 44 and 48-bit systems. Each larger address map is a superset of the smaller
space, to enable the system to boot and interwork between address spaces.
It does define and explain the gross partitioning of the address space for memories,
peripherals, and expansion space. It does not specify or require the addresses of individual
peripherals.
The principles expressed in this paper help drive some of the design decisions ARM
makes when defining system IP such as interconnects and memory controllers.
The ARMv8 MMU translation contexts can be configured to control memory access down
to a 4Kbyte or 64Kbyte granule.
Operating systems provide applications portability, through defined services which have
abstracted the underlying hardware. The portability of the operating system in turn
depends upon boot time configuration information, device drivers and system specific
adaptation code.
ACPI tables and FDTs are ways of providing platform descriptions at boot time to an
operating system. The entire address map can be described using these methods, and
fixed addresses are not needed.
Operating systems do have expectations on the address map, such as:
• DRAM comes in large contiguous blocks
• Peripherals can be mapped by MMU page granularity
• Contiguous I/O space is available for dynamically mapped I/O
Pure 32-bit or 64-bit operating systems with flat address mappings have very few
constraints on their address maps. Whereas mixed systems of 32-bit software and bus
masters in large address spaces need constraints to ensure they can interwork, such as:
• Significant 32-bit addressable DRAM
• 32-bit addressable register mapped I/O
• Backwards compatibility through address map super sets
Note: Experience has shown that general purpose 32-bit operating systems struggle to
manage excessive quantities of DRAM gracefully. 32GB of DRAM is often a practical
upper limit, for a 32-bit OS kernel.
2.2.3 Trusted OS
The ARM security extensions, known as TrustZone, provide an orthogonal CPU execution
state with its own address map that is intended to provide secure services. The execute
states are referred to as Secure and Non-Secure.
The ARMv7 Virtualization Extensions are not provided to a CPU in trusted state. A Trusted
OS will manage a single stage of VA to PA mappings, and it does not use or see IPAs.
LPAE when present is available to the trusted state, however It is quite possible that a 32-
bit Trusted OS will not use LPAE capabilities of the MMU.
Within 64-bit ARM system the Trusted OS can remain as 32-bit software, in which case:
• A 32-bit Trusted OS will natively use the 32-bit address map.
• An updated 32-bit LPAE Trusted OS may access up to the 40-bit address map.
A 32bit trusted OS increases the utilization pressure on the lower 2GB of physical DRAM.
3.1.1 Uniformity
A uniform SoC address map provides consistent physical addresses to all shared
resources. Uniform addressing removes the need for additional inter-component
translations and can simplify system integration.
P1. The global SoC address map for application processors and bus mastering
peripherals should be consistent with uniform addresses for all shared accesses.
P2. Aliased addresses should not exist for shared resources.
Large address maps remove the need to reuse addresses.
P3. Private local address maps may exist per CPU/Cluster/Device, to provide private
peripherals and memories.
For example local GIC interface per CPU.
P4. Private local address maps should not clash with globally visible addresses, for
the same master.
Some on-SoC micro-controllers have locally fixed address maps. Address remapping from
local-CPU relative maps, into the ARM centric address map may be required, in HW and
by SW.
3.1.3 DRAM
The primary need for extending the SoC address space beyond 32-bits is to provide room
for more DRAM.
However the interworking of hardware and software in mixed address space environment
will always happen within the lowest common denominator address space. This leads to
memory pressure on the DRAM at lower addresses.
DRAM requirements:
P6. DRAM must not be aliased, shadowed or decoded to additional physical
addresses.
P7. Unpopulated DRAM partitions must not alias any other addresses, accesses
should return bus errors.
Coherent systems rely on unique physical addresses to maintain memory
consistency, throughout the caches, buses and memories. By forbidding the
presence of aliased memories whole classes of errors and bugs can be avoided.
For example a 64GB DRAM part will be sub-divided into three regions. With the address
offsets performed by a simple subtraction in the high order address bits.
2 GBytes 0x00 8000 0000 – -0x00 8000 0000 0x00 0000 0000 –
0x00 FFFF FFFF 0x00 7FFF FFFF
( 32-bit map )
30 GBytes 0x08 8000 0000 – -0x08 0000 0000 0x00 8000 0000 –
0x0F FFFF FFFF 0x07 FFFF FFFF
( 36-bit map )
32 GBytes 0x88 0000 0000 - -0x80 0000 0000 0x08 0000 0000 –
0x8F FFFF FFFF 0x0F FFFF FFFF
( 40-bit map )
In practical systems, with no aliasing, the holes do not “waste” DRAM address space since
memories come sized in 2^n quantities. A fully loaded 40bit system, with holes would
contain exactly 512GBytes of DRAM. Removal of the holes would only provide an
additional 34GBytes of address space.
P22. Normal cacheable memory must be mapped uniquely into the Secure or Non-
secure address maps.
Normal memory should not be aliased, or dual mapped, since this will impact the
security architecture, and complicate the software view of cache coherency.
Dual mapping is allowed for a limited number of Secure OS use cases, such as
limiting access to DRM’d media buffers. Additional care has to be taken to ensure
cache coherency is maintained inside and outside of these use cases.
P23. Non-cached Device addresses can be dual mapped as Secure and Non-secure.
Allowing for devices to be claimed by Secure or Non-secure transactions. Policing
of the NS bit is dependent upon the SoC interconnect fabric and device interface.
P24. NS access to a Secure register in a dual mapped peripheral should be WI/RAZ,
this should not generate a bus error.
A dual mapped peripheral must enforce security at a register level.
P28. The boot ROM area must consume at least 1×64KB of address space.
The boot ROM is not required to populate the entire 64KB of address space.
Within the boot ROM address region, repeated aliases of the boot ROM are
acceptable.
The 32-bit address map provides the working space for existing non-LPAE 32-bit OSes
and 32-bit peripherals. DRAM and I/O must exist in the 32-bit address space to enable test
code and system booting, before enabling the MMU.
Greater than 32-bit bus masters must access the 32-bit DRAM to interwork with 32-bit
systems.
4.1.3 0x4000 0000 – 0x7FFF FFFF. Mapped I/O and additional SoC I/O
This I/O address region is primarily intended for mapped I/O such as PCIe.
Also used as overflow space for SoC register mapped peripherals.
Notionally divided into 64KB pages to align with ARMv8 MMUs.
This memory map is a superset of the 32-bit address map, with the additional space being
split as 50% DRAM with a optional hole in it, 25% mapped I/O space and reserved space.
4.2.3 0x8 0000 0000 – 0x8 7FFF FFFF FFFF. Hole or DRAM
2GB of address space that can contain either:
• Hole to enable DRAM device partitioning (as described in Section 3.1.4)
• DRAM.
The 40-bit address map is a superset of the 36-bit address map, and follows the same
pattern of 50% DRAM with a optional hole in it, 25% mapped I/O space and reserved
space.
The 44-bit address map is a superset of the 40-bit address map, and follows the same
pattern of 50% DRAM with a optional hole in it, 25% mapped I/O space and reserved
space.
The 48-bit address map is a superset of the 44-bit address map, and follows the same
pattern of 50% DRAM with a optional hole in it, 25% mapped I/O space and reserved
space.
6 Glossary
Table 2 describes some of the terms used in this document.
Term Description
Large Physical Address Optional extension to VMSAv7 that provides an address
Extension (LPAE) translation system supporting physical addresses of up to 40
bits at a 4KB granularity of translation.
Memory Management Unit Address translation unit that can transform addresses and
(MMU) check access permissions. In one stage from a VA to a PA, or in
two stages from a VA to IPA to PA. Translation descriptions are
provided by translation tables held in memory.
Intermediate Physical Address In an implementation of virtualization, the address to which a
(IPA) Guest OS maps a physical address.
Physical Address (PA) Identifies a memory location within the hardware system.
System Memory Management System MMU controls peripheral access into the system
Unit (SMMU) through address translation, access permissions, and memory
attribute determination.
TrustZone The security technology from ARM that enables the construction
of a Normal world and a Secure world.
Virtual Address (VA) Is an address used by the CPU and software when the MMU
enabled.
Virtual Memory System A memory system architecture that supports virtual addresses.
Architecture (VMSA)