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.

[参考译文] AM6442:AM64:如何移动 Linux IPC 区域(由于 RAM 较小)

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1641541/am6442-am64-how-to-move-linux-ipc-area-because-of-smaller-ram

器件型号: AM6442

您好、

我们计划将定制电路板上的 RAM 大小从 1GB 更改为 256MB。 因此、必须移动几个存储器区域。 我成功移动了 OP-TEE、针对 R5 应用程序、移动了它的通用 DDR 区域(包含资源表)、USER_SHM、LOG_SHM 和自定义 CMA 保留分割区。 通过这些更改、Linux 和 R5 应用程序可以按预期工作。

不过、每当我尝试将 Linux IPC 区域r5f-dma-memory@a0000000() 移到另一个位置时、都会出现以下错误:

[    2.342592] platform 78000000.r5f: configured R5F for remoteproc mode
[    2.355812] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@b0000000
[    2.370162] remoteproc remoteproc0: 78000000.r5f is available
[    2.392689] remoteproc remoteproc0: powering up 78000000.r5f
[    2.402819] remoteproc remoteproc0: Booting fw image am64-main-r5f0_0-fw, size 1369180
[    2.418828] rproc-virtio rproc-virtio.0.auto: assigned reserved memory node r5f-dma-memory@b0000000
[    2.439298] virtio_rpmsg_bus virtio0: rpmsg host is online
[    2.440250] virtio_rpmsg_bus virtio0: msg received with no recipient
[    2.446483] rproc-virtio rproc-virtio.0.auto: registered virtio0 (type 7)
[    2.463168] remoteproc remoteproc0: remote processor 78000000.r5f is now up

然后是来自 Linux 用户空间应用程序的错误:
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio0.rpmsg_chrdev.-1.14

你有什么想法为什么这不起作用? 我希望 Linux 将地址 0xb0000000 填入 virtio 和 R5 的资源表中以拾取配置。

是否需要更改 DMSC/TISCI 等任何其他设置?

此致、

OLAF

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

    您好、

    [2.440250]  virtio_rpmsg_bus virtio0:没有收件人收到 MSG

    R5F 发送了其 RPMsg 名称服务器公告、但 Linux 没有处理程序就绪—公告已丢弃、因此从未创建 rpmsg_chrdev 通道、也从未出现/dev/rpmsg_ctrl。 用户空间错误就是由此产生的结果。

    更改设备树中的 r5f-dma-memory 是不够的。 R5F 固件还在 MCU+ SDK 工程中的 linker.cmd 文件和资源表中具有硬编码的 Vring 地址。 双方必须指向同一地址。

    在 MCU+ SDK R5F 工程中、在 linker.cmd 文件中找到 IPC vring 存储器原点、并将其更新以匹配您的新 DT 分割地址。 对 资源表中的 vring da 字段执行相同的操作。 重新编译固件并重新部署 am64-main-R5f0_0-fw。

    无需更改 DMSC/TISCI、标准 DDR 区域在 A53 和 R5F 之间不受防火墙限制。

    此致、
    Harshith

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

    嗨、Harshith、

    感谢提示 — 它现在起作用了!

    缺失的部分是更改 R5 MPU 配置“MPU ARM v7“->“CONFIG_MPU_REGION5“中的 virtio 范围地址。

    Linux 会自动在资源表中设置相应的地址、R5 就可以使用该地址(无需进一步更改 linker.cmd 或 vring da 字段)。

    此致、

    OLAF