gpt4 book ai didi

memory - 在什么情况下我们可以使用Non-shareable device memory,或者Shareable device memory?

转载 作者:行者123 更新时间:2023-12-02 01:05:51 30 4
gpt4 key购买 nike

在 ARM 中,内存类型指定为:

  1. 正常
  2. 设备
  3. 强烈有序

在Device type里面,好像这个类型也可以区分

  1. 不可共享的设备内存
  2. 可共享设备内存

不可共享和可共享设备内存有什么区别?我们如何分别使用这些内存?

最佳答案

可共享属性在应用于普通内存或设备内存时具有不同的含义,而在 ARMv7 中,不存在不可共享设备内存这样的东西。

以下来自Cortex A Series Programmers Guide :

对于指定为 Device 的内存:

... Shareable attribute of Device accesses is used to determine which memory interface will be used for the access, with memory accesses to areas marked as Device, Non-Shareable performed using a dedicated interface, the private peripheral port. This mechanism is not used on ARMv7 processors.

对于指定为 Normal 的内存:

Normal memory must also be designated either as Shareable or Non-Shareable. A region of Normal memory with the Non-Shareable attribute is one that is used only by this core. There is no requirement for the core to make accesses to this location coherent with other cores. If other cores do share this memory, any coherency issues must be handled in software.

对于指定为强有序的内存:

All memory accesses to Strongly-ordered memory occur in program order. All Strongly-ordered accesses are assumed to be shared.

关于memory - 在什么情况下我们可以使用Non-shareable device memory,或者Shareable device memory?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22548673/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com