The ARM architecture – yesterday, today, and tomorrow
The Future: 64 Bits
History tends to repeat itself: In the 1990s, the makers of large Unix servers ran up against the 4GB limit that a 32-bit machine can address directly. As a result, 64-bit architectures, such as Ultra Sparc Sun were developed. Shortly after the turn of the millennium, x86 machines faced the same problem, which led to the development of x86-64.
When AMD launched x86-64, this was a real extension of the existing 32-bit architecture, which in turn was based on a 16-bit architecture – the older versions are all subsets of the newer ones. Although this approach enables easy recycling of existing knowledge and code, it rules out profound architectural changes.
ARM systems are now on the same cusp: For one thing, small devices are being equipped with more and more memory, which attracts applications that benefit from it. On the other, the ARM architecture is becoming increasingly attractive for servers. For both servers and small devices, the limit of 4GB is increasingly becoming an obstacle.
Newer ARMv7 cores, such as the Cortex A15, only partially work around the problem: The Large Physical Address Extension (LPAE) allows up to 1TB to be addressed physically (in a style similar to PAE in x86), but this does not affect the limitation to 4GB of virtual memory per thread. The radical solution is to switch to a 64-bit architecture.
In 2011, ARMv8 defined two architectures – Aarch64 and Aarch32 – which, in turn, use the A64 and A32 instruction sets (as well as Thumb 2 as T32 for Aarch32). Aarch32 and A32 are downwardly compatible with ARMv7 (but not vice versa), whereas Aarch64 has a new instruction set by the name of A64. Thus, in contrast to x86, there is no need to rely on existing gaps in the old instruction set or craft new commands with complicated prefix structures – you can build a clean instruction set.
For example, all A64 commands can be encoded in just 32 bits of code, even though the number of registers has doubled: X0 through X29, as well as X30 as a link register and X31 as a hard-wired zero register. The program counter, which occurs in the A32 instruction set as R15, is now a special register that can only be accessed via customized commands. The commands themselves are based on their counterparts from A32 in essence, but the following architectural changes have made some adjustments necessary.
The biggest of these adjustments relates to the processor modes and the dependent mode-specific registers: With the eight modes of the later versions of A32, only a small part of the many registers is used. Additionally, dealing with the various exception modes is awkward. In A64, ARM introduces a highly simplified model, featuring four exception levels (Figure 5), that has similarities with the rings in x86 architecture.
The lowest level – EL0 – is intended for use by applications (user-mode), whereas EL1 is equivalent to the old system mode and is used to execute privileged parts of an operating system. EL2 is assigned to hypervisors, and EL3 is part of ARM's Trust Zone security concept, that is, for the operation of security monitors (see the box "Encrypted ARM processors"). Each of these modes has only three private registers: a link register for exceptions, the stack pointer, and the stored status register.
Encrypted ARM Processors
In addition to complex, virtualization-based security concepts such as Trust Zone (Figure 5), for some years, high-performance ARM processor versions have supported fully encrypted booting. In practical terms, the processor draws on OTP (one-time programmable) processor registers, which manage a key that encrypts or signs the bootloader. This approach ensures that the program you are running really does come from the developers or manufacturers.
Freescale [7] offers processors with these features under the Vybrid Imx28 brand. The LPC3143 from NXP [8] has been on the market even longer. The Picosafe [9] open source project offers a complete tool chain that supports a fully encrypted boot process from the bootloader to the root file system. (Benedikt Sauter)
Conditional execution of all instructions no longer exists in A64. Although this allows for very elegant code, it greatly complicates the implementation of an out-of-order machine. This is also why load-store multiple instructions have had to give way to simpler instructions that only support loading or saving two registers.
Minor changes are the result of practical experience with the 32-bit architecture. There are two virtual address spaces, each 248 bytes (256TB) – one for the applications starting at address 0, and one for the operating system kernel from address 264 downward. Virtual addresses are mapped to physical addresses with four-level (4KB pages) or three-level (64KB pages) page tables, depending on page size. Addressing itself continues to follow the load-store approach, but the addressing modes have been adjusted to simplify computations.
As in x86-64, where 32-bit applications run on a 64-bit system, ARMv8 also provides for compatibility. In the event of exceptions and on leaving them, the processor can switch between Aarch64 and Aarch32 and reciprocally map the registers, depending on the mode; 32-bit access only addresses the lower half of the register (Figure 5). Thus, it is possible to run Aarch32 applications on an Aarch64 operating system and run guests with both architecture versions side by side on an Aarch64 hypervisor [6].
Linux and ARMv8
Although ARMv8 was first introduced in 2011 and the first IP cores are already available in the form of the Cortex A53 and Cortex A57, no implementations existed beyond simulators and FPGA-based prototypes until 2013. In September, Apple introduced an ARMv8 chip with its new iPhone 5S and the Apple A7 SoC. Other manufacturers have announced products that will probably be launched later this year or early next year.
Unfazed by the lack of hardware, developers are already working very actively on software for the new architecture: the code for Aarch64 can easily be generated with current versions of GCC, and the Linux kernel supports the architecture as of version 3.7. When the first 64-bit ARM machines hit the markets, Linux will be ready for them.
Infos
- ARM licensees: http://www.arm.com/products/processors/licensees.php
- Samsung's Exynos 5 Dual: http://www.samsung.com/global/business/semiconductor/minisite/Exynos/products5dual.html
- Qualcomms Krait cores: http://www.qualcomm.com/snapdragon/processors#CPU
- Furber, Steve. ARM System-on-Chip Architecture, 2nd edition. Pearson, 2000
- Robin Randhawa's whitepaper on Big-Little: http://arm.com/files/downloads/System_Software_for_b.L_Systems_Randhawa.pdf
- "ARM Goes 64-bit" by David Kanter: http://www.realworldtech.com/arm64/
- Vybrid and Imx28 by Freescale: http://www.freescale.com
- LPC3143 by NXP: http://www.nxp.com
- Picosafe: http://www.picosafe.de
« Previous 1 2 3 4 5
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.