ISB、DSB和DMB的含义

简介: ISB、DSB和DMB的含义

参考

DDI0487J_a_a-profile_architecture_reference_manual.pdf

  • B2.3 Definition of the Arm memory model
  • B2.3.12 Memory barriers
  • Data Memory Barrier (DMB)
  • Data Synchronization Barrier (DSB)
  • Instruction Synchronization Barrier (ISB)

Data Memory Barrier (DMB)

The DMB instruction is a memory barrier instruction that ensures the relative order of memory accesses before the barrier with memory accesses after the barrier. The DMB instruction does not ensure the completion of any of the memory accesses for which it ensures relative order.

The basic principle of a DMB instruction is to introduce order between memory accesses that are specified to be affected by the DMB options supplied as arguments to the DMB instruction. The DMB instruction ensures that all affected memory accesses by the PE executing the DMB instruction that appear in program order before the DMB instruction and those which originate from a different PE, to the extent required by the DMB options, which have been Observed-by the PE before the DMB instruction is executed, are Observed-by each PE, to the extent required by the DMB options, before any affected memory accesses that appear in program order after the DMB instruction are Observed-by that PE.

The DMB instruction affects only memory accesses and the operation of data cache and unified cache maintenance instructions. It has no effect on the ordering of any other instructions executing on the PE.

Data Synchronization Barrier (DSB)

A DSB instruction is a memory barrier that ensures that memory accesses that occur before the DSB instruction have completed before the completion of the DSB instruction. In doing this, it acts as a stronger barrier than a DMB and all ordering that is created by a DMB with specific options is also generated by a DSB with the same options.

A DSB instruction executed by a PE, PEe, completes when all of the following apply:

  • All explicit memory effects of the required access types appearing in program order before the DSB are complete for the set of observers in the required shareability domain.
  • If the required access types of the DSB is reads and writes, the following instructions issued by PEe before the DSB are complete for the required shareability domain:
  • All cache maintenance instructions.
  • All TLB maintenance instructions.
  • All PSB CYNC instructions.

In addition, no instruction that appears in program order after the DSB instruction can alter any state of the system or perform any part of its functionality until the DSB completes other than:

  • Being fetched from memory and decoded.
  • Reading the general-purpose, SIMD and floating-point, SVE vector or predicate, Special-purpose, or System registers that are directly or indirectly read without causing side-effects

Instruction Synchronization Barrier (ISB)

An ISB instruction ensures that all instructions that come after the ISB instruction in program order are fetched from the cache or memory after the ISB instruction has completed. Using an ISB ensures that the effects of context-changing operations executed before the ISB are visible to the instructions fetched after the ISB instruction.

Examples of context-changing operations that require the insertion of an ISB instruction to ensure the effects of the operation are visible to instructions fetched after the ISB instruction are:

  • Completed cache and TLB maintenance instructions.
  • Changes to System registers.

Any context-changing operations appearing in program order after the ISB instruction take effect only after the ISB has been executed.

相关文章
|
6月前
|
人工智能 Java
你知道i=i++;的含义吗?原理其实没有你想的那么简单
你知道i=i++;的含义吗?原理其实没有你想的那么简单
|
2月前
DSB和DMB后面的可选项的含义
DSB和DMB后面的可选项的含义
路径中“./”、“../”、“/”代表的含义
路径中“./”、“../”、“/”代表的含义
|
机器学习/深度学习 JavaScript 前端开发
正则表达式符号含义
正则表达式符号含义
83 0
UML类图中 前缀符号 + - # ~ 的含义
UML类图中 前缀符号 + - # ~ 的含义
UML类图中 前缀符号 + - # ~ 的含义
标识符(含义、组成、定义规则、命名规范)
标识符 标识符含义 ​ 大家第一次见到标识符这个词的时候可能会有点陌生,其实标识符就是我们编程的时候使用的“名字“ , 给类、接口、方法、变量、常量名,包名等起名字的字符序列
511 0
this的含义及其用法
this:代表当前对象的引用(谁调用就代表谁) this关键字主要有三个应用: 1.访问成员:
160 0
|
开发者 Python
特殊字母的含义 | 学习笔记
快速学习 特殊字母的含义
194 0
A2W W2A A2T T2A _T() 含义以及用法
A2W W2A A2T T2A _T() 含义以及用法
300 0