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:AM6442:加载 R5 内核时的内核崩溃

Guru**** 2901230 points

Other Parts Discussed in Thread: AM6442

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1642607/am6442-am6442-kernel-crash-when-loading-r5-core

器件型号: AM6442

尊敬的团队:

我们正在处理具有 A53 内核的 AM6442 处理器和使用的 Linux SDK 为 11.02.08.02。

我遇到使用 SDK 11.02 在 AM64x 定制电路板上系统挂起的问题。 尽管内核仍然可以访问、但发出 reboot 命令后硬件无法复位、需要手动重启电源。 

dmesg | grep r5:
[   16.273059] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
[   16.305854] platform 78000000.r5f: configured R5F for IPC-only mode
[   16.325128] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@a0000000
[   16.371555] remoteproc remoteproc12: 78000000.r5f is available
[   16.389558] remoteproc remoteproc12: attaching to 78000000.r5f
[   16.578999] Modules linked in: crct10dif_ce cdns3_ti ti_k3_r5_remoteproc(+) rti_wdt sa2ul omap_hwspinlock omap_mailbox spi_omap2_mcspi pwm_tiecap overlay cfg80211 rfkill cryptodev(O) fuse drm backlight ipv6
[   16.728499]  k3_r5_probe+0x99c/0xee0 [ti_k3_r5_remoteproc]
[   16.773383]  k3_r5_rproc_driver_init+0x20/0x1000 [ti_k3_r5_remoteproc]

发出 reboot 命令后、它就会挂起、不会引导、并显示以下日志。

[  419.835651] systemd-shutdown[1]: All DM devices detached.
[  419.841096] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[  419.850774] watchdog: watchdog0: nowayout prevents watchdog being stopped!
[  419.857685] systemd-shutdown[1]: Failed to disable hardware watchdog, ignoring: Device or resource busy
[  419.867092] watchdog: watchdog0: nowayout prevents watchdog being stopped!
[  419.873979] watchdog: watchdog0: watchdog did not stop!
[  419.884521] systemd-shutdown[1]: Syncing filesystems and block devices.
[  419.891511] systemd-shutdown[1]: Rebooting.
 

此外、对于远程 proc、我们还有此错误:

[   16.371555] remoteproc remoteproc12: 78000000.r5f is available
[   16.389558] remoteproc remoteproc12: attaching to 78000000.r5f
[   16.578999] Modules linked in: crct10dif_ce cdns3_ti ti_k3_r5_remoteproc(+) rti_wdt sa2ul omap_hwspinlock omap_mailbox spi_omap2_mcspi pwm_tiecap overlay cfg80211 rfkill cryptodev(O) fuse drm backlight ipv6
[   16.728499]  k3_r5_probe+0x99c/0xee0 [ti_k3_r5_remoteproc]
[   16.773383]  k3_r5_rproc_driver_init+0x20/0x1000 [ti_k3_r5_remoteproc]

查询:

R5F 内核处于“仅 IPC“模式是否会阻止 ti_k3_r5_remoteproc 驱动程序允许干净的系统复位?

2. config_watchdog_NOWAYOUT 已禁用且未设置,但它是否在重新启动命令期间仍显示 watchdog 错误

此致、

Shwetha

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

    您好、

    重新启动挂起是由仅 IPC 模式与设备管理器 (DM) 内核之间的交互引起的。

    日志行 R5F 内核可能已由不同的主机上电、这意味着 R5F 是在 Linux 引导(通过 SBL 或 U-Boot)之前启动的、因此 Linux 只会连接到它。 Linux Remoteproc 驱动程序仅对其自身初始化的内核执行正常关机—如果已连接、它在关机时不执行任何操作。 这意味着 R5F 从不会将其外设所有权释放回 DM 内核、并且在下一次引导时 DM 内核拒绝重新授予这些所有权、导致 R5F 停滞并导致挂起。

     该修复取决于多核学院 引导流程:SPL 与 SBLGraceful Shutdown 页面中涵盖的引导流程:

    • 如果您希望 Linux 初始化 R5F(默认 SPL 流程)、请确保 SBL 或 U-Boot 中的任何内容都不会首先启动它。
    • 如果您打算 SBL 启动 R5F、则固件必须实现正常关断、以便在 Linux 重新启动之前通知 DM 内核。 请参阅 MCU+ SDK 中的 examples/drivers/ipc/ipc_rpmsg_echo_linux/ipc_rpmsg_echo.c。

    在看门狗上:CONFIG_WATCHDOG_NOWAYOUT=n 仅设置编译时默认值、如果用户空间进程(例如 systemd WatchdogSec)打开看门狗但未完全关闭它、则在运行时会发生相同的行为。 这是次要问题、请先解决远程处理器挂起问题、然后独立确认是否仍然存在。

    此致、
    Harshith

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

    嗨、Harshith、

    感谢您的信息

    我们有两个内核源代码、其中一个从 git 获取并编译、这个映像没有看到上述问题。 在独立内核中、我们获取了补丁并在 Yocto 定制层中应用了 Yocto、而从 Yocto 生成的映像只会看到此问题

    此致、

    Shwetha Nayak

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

    您好、Shwetha、

    由于 Git 内核可以正常工作、但 Yocto 构建不在同一电路板上、问题在于 Yocto 内核的配置或修补方式、而不是硬件。 需要检查的几个事项:

    1. 对 REMOTEPROC、RPMSG、WATCHDOG、PSCI、Mailbox 和 HWSPINLOCK。 共享不同的任何符号。
    2. n 使用 git 内核、运行 git log --oneline drivers/remoteproc/ti_k3_r5_remoteproc.c 并共享输出—该修复程序可能跨越多个提交、只有一部分提交可能已被带入 Yocto。
    3. 比较两个 D-PHY 之间的 R5F 器件树节点 (78000000)。

    此致、
    Harshith