From WikiChip
Editing arm/aarch64

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 2: Line 2:
 
'''AArch64''' is the {{arch|64}} execution state of the {{\\|ARMv8}} ISA. A machine in this state executes operates on the {{\\|A64}} instruction set. This is in contrast to the {{\\|AArch32}} which describes the classical 32-bit ARM execution state.
 
'''AArch64''' is the {{arch|64}} execution state of the {{\\|ARMv8}} ISA. A machine in this state executes operates on the {{\\|A64}} instruction set. This is in contrast to the {{\\|AArch32}} which describes the classical 32-bit ARM execution state.
  
== Overview ==
 
The AArch64 execution state was introduced with the {{\\|ARMv8}} ISA for machines executing {{\\|A64}} instructions. A machine in AArch64 can only execute A64 instructions and cannot execute {{\\|A32}} or {{\\|T32}} instructions. However, unlike in {{\\|AArch32}}, in the 64-bit state, instructions can access both the 64-bit and 32-bit registers.
 
  
== Calling convention ==
+
{{stub}}
{{see also|arm/calling convention|l1=ARM's Calling convention}}
 
Under AArch64, the first eight registers are used for passing parameters into a subroutine as well as to return a result value set. Generally, X0 through X18 can corrupt while X19-X29 must be preserved.
 
 
 
{| class="wikitable"
 
|-
 
! Register !! Role !! Requirement
 
|-
 
| X0 - X7 || Parameter/result registers || rowspan="5" | Can Corrupt
 
|-
 
| X8 || Indirect result location register
 
|-
 
| X9 - X15 || Temporary registers
 
|-
 
| X16 - X17 || Intra-procedure call temporary
 
|-
 
| X18 || Platform register, otherwise temporary
 
|-
 
| X19 - X29 || Callee-saved register || Must preserve
 
|-
 
| X30 || Link Register || Can Corrupt
 
|}
 
 
 
== Exceptions ==
 
Generally, exceptions in AArch64 is very similar to {{\\|AArch32}}. There are four exception levels (ELn): EL3 - EL0 with EL0 being the least privileged level (application) and getting progressively more privileged than the one below it. Exceptions always go to the same level or a higher level but they can not take you to a lower level. When taking an exception, the exception link register (ELR) associated with the target exception level is written on exception entry and the interrupt masks are also set. Entering AArch64 from {{\\|AArch32}}, the ELR is always [[zero-extended]]. AArch64 {{\\|banked registers}} are banked by exception level, meaning none of the regular (both GPRs and media) are banked. In AArch64, most of the old mechanism found in {{\\|AArch32}} was not necessary because, at any exception level, it's now possible to simply use the dedicated stack pointer. Additionally, the exception link register (ELR) can be used to determine the origin address. This significantly simplifies exceptions under 64-bit operating mode.
 
 
 
{| class="wikitable"
 
|-
 
! !! EL0 !! EL1 !! EL2 !! EL3
 
|-
 
| Stack Pointer || SL_EL0 || SP_EL1 || SP_EL2 || SP_EL3
 
|-
 
| Exception Link Register<br>([[program counter|PC]]) || || ELR_EL1 || ELR_EL2 || ELR_EL3
 
|-
 
| Saved/Current Process Status Register<br>({{\\|CPSR}}) || || SPSR_EL1 || SPSR_EL2 || SPSR_EL3
 
|}
 
 
 
Each exception level except for EL0 has its own [[interrupt vector table|vector table]]. The vector in AArch64 was designed to provide additional information about the exception type (sync, {{\\|IRQ}}, {{\\|FIQ}}, error) and origin (EL and register width, and stack pointer info), eliminating the need to check the {{\\|syndrome register}} which was also significantly enhanced to include a more complete classification of exceptions. It's worth noting that the entry in the table was increased from 4 bytes to 32 instructions long (0x80 bytes), meaning instead of just storing the branch, it's now possible to store the handler directly when it is advantageous to do so.
 
 
 
== MMU ==
 
The {{arm|LPAE|Large Physical Address Extension}} (LPAE) on {{\\|ARMv7}} is largely a precursor to the ARMv8 changes. Under AArch64, the virtual address space for each TTBR can be up to 48 bits. This is supported at run-time with lower values benefitting from a smaller table walk. The upper 8 bits of the address is ignored for the purpose of address translation, allowing software to use it for tagged pointers. The physical address space was also defined to support up to 48 bits.
 
 
 
The supported granule sizes are 4 KiB, 16 KiB, and 64 KiB. This corresponds to the size of the smallest page supported as well as the size of the translation tables in memory. Which of the three supported is up to the implementation.
 
 
 
== Other features ==
 
* {{arm|tbi|Top-byte Ignore}} (TBI)
 
 
 
== Bibliography ==
 
* Richard Grisenthwaite. (October 26, 2011). ''"Technology Preview: The ARM Architecture - a View of the Future "''.
 
* ARM Architecture Group. "Armv8 instruction set overview." vol. PRD03-GENC-010197 (2011).
 

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)