AArch64

From OSDev Wiki
Jump to navigation Jump to search

This page is under construction! This page or section is a work in progress and may thus be incomplete. Its content may be changed in the near future.

AArch64 is the 64 bit version of the ARM architecture, as published by ARM Holdings. It has gained much headway in recent years, being used in many mobile phones. It also is gaining market share in the server world, due to performance advancements and its power management. It also is starting to gain steam in the personal computer world, as Apple in 2020 started using it for most of its Macs. This chip, the Apple M1 chip, has performance comparable to Intel and AMD processors.

The primary barrier to OSDev on AArch64 is the lack of standardization among peripherals; even once you've settled on a board to target, you may not have much documentation on how to program it.

The situation is improving, as ARM SystemReady is a fairly new standard that aims to standardize ARM hardware. It allows for OSes like Windows, Linux, and the BSDs to be ran out of box on compliant hardware. This means that implementing AArch64 support in your hobby OS may be a good thing, as its popularity and usage continue to expand.

UEFI implementations are also becoming more common for AArch64, an example is the Tiano Core EDK2 port for the Raspberry Pi 4. This has allowed operating systems to utilize standardized UEFI calls to communicate to the hardware in a much more generic matter. The Limine bootloader exclusively uses UEFI on AArch64 platforms.

New Features

AArch64 is built around a new instruction set, called A64. It was first introduced with ARMv8-A. Features of the base A64 set include:

  • 31 64-bit General purpose registers, labeled X0 - X30.
  • A dedicated zero register or Stack pointer register (instruction dependent).
  • Program counter is no longer directly accessible.
  • Instructions which are still 32 bits long, with most being the same as A32, which can accept either 32 or 64 bit arguments, with addresses assumed to be 64 bit.
  • Advanced SIMD (NEON), supporting 32 x 128 bit registers (up from 16), fully IEEE 754 compliant.

Compiler Support

As of 2024, Both GCC and LLVM have first class aarch64 support available in their stable branches.

Emulation Support

QEMU Supports a variety of AArch64 based systems, including rudimentary support for the raspberry pi 4 and 5 in the latest releases.

See Also

Articles

Booting_Raspberry_Pi_3

QEMU AArch64 Virt Bare Bones

External Links