This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM6441:限制、强制对 A53 使用 32 位指令

Guru**** 2815985 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1608552/am6441-restrict-force-to-use-32-bit-instruction-for-a53

器件型号: AM6441

您好、  

环境

不同应用 GPMC 用于存储器访问。 我们的问题是: GPMC 是否强制在 A53 上以 32 位模式运行?

时钟发生变化 64 位值 从 GPMC 映射的存储器区域中、读取失败并返回损坏的数据。 例如:

x2 = 0x52000000
ldr x1, [x2 + 0x18000]   // reading 64-bit value fails, exception, bus is not allowed

我们正在考虑以下解决方案:

  • 使用编译器选项实现 强制 32 位 (W1、w2) 访问 而不是 64 位 (x1、x2) 寄存器。

  • 确定要读取的正确方法 64 位值 从 GPMC 断开。

在这种情况下、可靠访问 GPMC 存储器的建议方法是什么?


 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    你好 Jun Tu、

    AM64x 上的 GPMC 是一个 32 位总线接口。 当 Cortex-A53 处理器(在 AArch64 模式下运行)执行 64 位加载指令时、例如:

    LDR x1、[x2、#0x18000]// 64 位加载 — 将失败。 这会生成 64 位总线事务。 GPMC 无法处理 64 位事务、从而导致总线错误和数据损坏。


    推荐解决方案:

    对所有 GPMC 存储器操作使用显式 32 位易失性指针访问。 请勿使用编译器选项强制执行
    32 位模式—而是使用正确类型的读取/写入操作:

    /* Reading from GPMC-mapped memory */
    volatile uint32_t *pSrc = (volatile uint32_t *)(offset + baseAddress);
    volatile uint32_t *pDst = (volatile uint32_t *)buf;
    *pDst = *pSrc;
    
    /* Writing to GPMC-mapped memory */
    volatile uint32_t *pSrc = (volatile uint32_t *)buf;
    volatile uint32_t *pDst = (volatile uint32_t *)(offset + baseAddress);
    *pDst = *pSrc;

    此致、

    Anil.