B2.1 About the Arm memory model

总览
The Arm architecture is a weakly ordered memory architecture that permits the observation and completion of memory accesses in a different order from the program order. The following sections of this chapter provide the complete definition of the ARMv8 memory model, this introduction is not intended to contradict the definition found in those sections. In general, the basic principles of the ARMv8 memory model are:

armv是属于弱内存模型,有如下一些原则:

 

• To provide a memory model that has similar weaknesses to those found in the memory models used by high-level programming languages such as C or Java. For example, by permitting independent memory accesses to be reordered as seen by other observers.对同一个observer,没有地址依赖的指令可以乱序执行,对于不同的observer,不同的地址被观察到的顺序可以乱序。
• To avoid the requirement for multi-copy atomicity in the majority of memory types.对主要的内存模型(这里指的是shareable and not device类型)不是multi-copy内存模型,因此程序要避免对multi-copy模型的依赖
• The provision of instructions and memory barriers to compensate for the lack of multi-copy atomicity in the cases where it would be needed.提供内存屏障指令(DMB等)和其他指令,来提供对multi-copy的支持
The use of address, data, and control dependencies in the creation of order so as to avoid having excessive numbers of barriers or other explicit instructions in common situations where some order is required by the programmer or the compiler.armv8提供三种类型的依赖(地址依赖,数据依赖和控制依赖),armv8会保证这些指令的顺序关系,并保证对其他observer的可见性的顺序,程序可以从分利用这些依赖来提供顺序要求。

 

B2.1.1 Address space

Address calculations are performed using 64-bit registers. However, supervisory software can configure the top eight address bits for use as a tag, as described in Address tagging in AArch64 state on page D5-2386. If this is done, address bits[63:56]:
• Are not considered when determining whether the address is valid.
• Are never propagated to the program counter.
地址可以配置为64bit或者56bit两种模式

B2.1.2 Memory type overview

mutually-exclusive memory types
NormalThis is generally used for bulk memory operations, both read/write and read-only operations.我们通常说的内存属于normal,读写没有side-effects
DeviceThe Arm architecture forbids Speculative reads of any type of Device memory. This means Device memory types are suitable attributes for read-sensitive Locations.一般的外设寄存器都属于此类,有side-effects,不能进行speculative操作。

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值