Differences Between Armv8 Synchronization Exceptions, External Abort, SError, Prefetch Abort, and Data Abort

Click the blue "Arm Selected" in the upper left corner and choose "Set as Star"

Thank you all for your attention, thank you thank you thank you, once again thank you!

1. Concepts of Synchronous and Asynchronous Exceptions

The following three behaviors are referred to as synchronous exceptions:

• The exception is generated as a result of direct execution or attempted execution of an instruction.
• The return address presented to the exception handler is guaranteed to indicate the instruction that caused the exception.
• The exception is precise.

In other words:

  • The exception is generated by executing or attempting to execute an instruction.

  • The location that generates the exception is determined, meaning every time execution reaches “that instruction”, the exception will occur.

  • The exception is precise.

The following three behaviors are referred to as asynchronous exceptions:

• The exception is not generated as a result of direct execution or attempted execution of the instruction stream.
• The return address presented to the exception handler is not guaranteed to indicate the instruction that caused the exception.
• The exception is imprecise.

In other words:

  • The exception is not generated by executing or attempting to execute an instruction.

  • The location that generates the exception is not determined, meaning it is unknown where execution is at when the exception occurs.

  • The exception is imprecise.

So what do precise and imprecise mean?Differences Between Armv8 Synchronization Exceptions, External Abort, SError, Prefetch Abort, and Data AbortIt’s a bit convoluted and hard to understand, let’s put it another way: an exception that occurs as expected is called precise, otherwise it’s imprecise.

2. What are the Synchronous Exceptions in the System?

  • Any exception generated by attempting to execute an UNDEFINED instruction, including:

    (1) Attempting to execute an instruction at an inappropriate exception level.

    (2) Attempting to execute an instruction when the instruction is disabled.

    (3) Attempting to execute an instruction bit pattern that has not been allocated.

  • Illegal execution state exceptions. These are caused by attempting to execute an instruction when <span>PSTATE</span><span>.</span><span>IL</span> is 1 (for details, refer to the illegal return events of AArch64 state on page D1-2486).

  • Exceptions caused by using an unaligned SP.

  • Exceptions caused by attempting to execute an instruction using an unaligned PC.

  • Exceptions caused by instructions generated by exceptions SVC, HVC, or SMC.

  • Exceptions caused by attempting to execute system registers defined to be captured at a higher exception level (for details, refer to configurable instruction enable and disable on page D1-2510).

  • Exceptions associated with attempts to execute instructions from memory areas that have caused faults generated by the memory address translation system.

  • Data aborts generated by the memory address translation system associated with attempts to read or write to memory that has caused faults.

  • Data aborts caused by unaligned addresses.

  • If implementing FEAT_MTE2, data aborts caused by tag check faults.

  • All debugging exceptions: (1) Breakpoint Instruction exceptions. (2) Breakpoint exceptions. (3) Watchpoint exceptions. (4) Vector Catch exceptions. (5) Software Step exceptions.

  • In implementations that support capturing floating-point exceptions, exceptions caused by captured IEEE floating-point exceptions.

  • In some implementations, external aborts. External aborts are failed memory accesses, including those that occur during address translation.

3. Understanding SError

SError (also known as System Error) is a type of asynchronous exception, generally coming from <span>External</span><span>aborts</span>, which occurs when the bus generates an exception during memory system access. For example:

  • When memory access is blocked by TZC, the bus returns an exception Differences Between Armv8 Synchronization Exceptions, External Abort, SError, Prefetch Abort, and Data Abort

Note that exceptions generated by MMU belong to <span>internal</span><span>abort</span>, which is a synchronous exception. Undefined instruction exceptions are also synchronous exceptions.

4. Understanding External Abort

External Abort can be a synchronous exception or an SError Differences Between Armv8 Synchronization Exceptions, External Abort, SError, Prefetch Abort, and Data Abort

For example:

  • Instruction Abort can be an internal synchronous exception or a synchronous External Abort.

  • Data Abort can be an internal synchronous exception or a synchronous External Abort (meaning External Abort can belong to synchronous exceptions).

5. Instruction Abort and Data Abort

In the aarch64 architecture, instruction abort and data abort have become a type of synchronous exception. They are no longer a separate exception model. Therefore, when instruction abort or data abort occurs, it is definitely a synchronous exception, which may be an internal abort or an external abort, but ultimately it is a synchronous exception.

[Summary]Summary of Arm Selected Course Platform[Membership]Introduction to Arm Selected Classroom – Gold VIPCourse: “ARMv8/ARMv9 Architecture from Beginner to Expert” – Phase II Video CourseCourse: Trustzone/TEE/System Security Development Fast TrackCourse: Secureboot from Beginner to Expert (Phase II)Course: CA/TA Development from Beginner to ExpertCourse: “ATF Architecture Development Essentials” – Video CourseCourse: “optee System Development Essentials” – Video CourseCourse: In-depth Reading of ATF/optee/hafnium/linux/xen Code[Guidance][Guide] Four Ways to Watch Our Courses[Guidance]What is the Difference Between Phase I and Phase II of Arm Video Courses?[Guidance]What are the Differences Between Replay Version, Standard Version, and High Configuration Version of Trustzone/TEE/Security from Beginner to Expert?Differences Between Armv8 Synchronization Exceptions, External Abort, SError, Prefetch Abort, and Data Abort

Leave a Comment