板/设置
CPU:i.mx93
启动媒体:SD (mmc 1)
目标:运行 CM33 RPMSG-Lite 字符串回声演示并从 Linux (A55) 进行通信
问题摘要我也想启动 Cortex-M33 RPMSG 演示:
:
当尝试访问某些 CM33 别名地址(例如0x1ffe0000 / 0x0ffc0000)
Linux remoteproc 试图加载 rpmsg_lite_str_echo_rtos_remote.bin,但以错误 -2 失败(未找到文件),然后退回到 sysfs 回退。
我不确定 i.MX93 上的 CM33 的正确内存复制地址和启动地址应该是多少(系统地址与别名地址),以及如何使 U‑Boot boot bootaux 流程与 Linux remoteproc 流程保持一致。
我测试的
SD 分区布局和启动文件
U‑Boot 显示 SD 是 mmc 1:
u-boot= > mmc 列表
FSL_SDHC:0 (eMMC) FSL_SDHC:1 (SD)
分区表:
u-boot= > 零件清单 mmc 1
MMC 设备 1 的分区图-分区类型:DOS
部件起始扇区号扇区 UUID 类型
1 16384 681574 076c4a2a-01 0c 启动 2 704512 5769534 076c4a2a-02 83
启动分区内容包括 DTB 和 mcore-demos/ 目录:
u-boot= > fatls mmc 1:1...
mcore-demo/...
我可以加载演示版:
u-boot= > fatload mmc 1:1 ${loadaddr} mcore-demos/rpmsg_lite_str_echo_rtos_remote.bin
3 毫秒内读取 39004 字节
u-boot= > echo ${loadaddr}
0x80
400000 u-boot= > echo ${filesize} 985c
前两个字看起来像一个有效的 CM33 向量表:
u-boot= > md.l ${loadaddr} 2
80400000:2001e000 0ffe0595
读取 0x1ffe0000 会导致中止:
Linux 端:remoteproc 固件加载失败
在 Linux 中,remoteproc0 开机后会尝试加载固件:
[ 84.714629] remoteproc remoteproc0: powering up imx-rproc
[ 84.721926] remoteproc remoteproc0: Direct firmware load for rpmsg_lite_str_echo_rtos_remote.bin failed with error -2
[ 84.732549] remoteproc remoteproc0: Falling back to sysfs fallback for: rpmsg_lite_str_echo_rtos_remote.bin
这里是预留内存:
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
linux,cma {
compatible = "shared-dma-pool";
reg = <0 0x88000000 0 0x04000000>; /* 64 MB @ 0x8800_0000 */
reusable;
linux,cma-default;
};
/* Ethos-U: move away from the kernel boot (32 MB) */
ethosu_mem: ethosu_region@8c000000 {
compatible = "shared-dma-pool";
reg = <0 0x8c000000 0 0x02000000>;
no-map;
};
vdev0vring0: vdev0vring0@84000000 { reg = <0 0x84000000 0 0x00008000>; no-map; };
vdev0vring1: vdev0vring1@84008000 { reg = <0 0x84008000 0 0x00008000>; no-map; };
vdev1vring0: vdev1vring0@84010000 { reg = <0 0x84010000 0 0x00008000>; no-map; };
vdev1vring1: vdev1vring1@84018000 { reg = <0 0x84018000 0 0x00008000>; no-map; };
rsc_table: rsc-table@2021e000 { reg = <0 0x2021e000 0 0x00001000>; no-map; }; /* OCRAM */
vdevbuffer: vdevbuffer@84020000 {
compatible = "shared-dma-pool";
reg = <0 0x84020000 0 0x00100000>; /* 1 MB */
no-map;
};
ele_reserved: ele-reserved@90000000 {
compatible = "shared-dma-pool";
reg = <0 0x90000000 0 0x00100000>; /* 1 MB @ 0x9000_0000 */
no-map;
};
};
ethosu {
compatible = "arm,ethosu";
fsl,cm33-proc = <&cm33>;
memory-region = <ðosu_mem>;
power-domains = <&mlmix>;
};从 U-Boot 在 i.MX93 上启动 CM33 RPMsg 演示的正确步骤是什么?
如果 CM33 由 U-Boot (bootaux) 启动,建议的 Linux 配置是什么?
你好,电路板支持包
版本是 VERSION= " 6.6-scarthgap(scarthgap)"
我使用内存为 512MB 的 imx93 自定义板但没有 hello_world
.elf
这些都在 /lib/firmware 下
imx93-11x11-evk_m33_TCM_low_power_wakeword.elf
imx93-11x11-evk_m33_TCM_power_mode_switch.elf
imx93-11x11-evk_m33_TCM_rpmsg_lite_pingpong_rtos_linux_remote.elf
imx93-11x11-evk_m33_TCM_rpmsg_lite_str_echo_rtos.elf
imx93-11x11-evk_m33_tcm_sai_low_power_audio.elf 经过测试 u-boot= > fatload mmc
1:1 80000000 mcore-demos/rpmsg_lite_str_echo_rtos_remote.bin
在 3 毫秒内读取 39004 字节 (12.4 MiB/s)
u-boot= > cp.b 0x80000000 0x201e0000 0x10000 u-boot= > bootaux 0x1ffe0000 0 ## 启动辅助内核 addr = 0x1ffe0000...
它无法启动,它会冻结。
您好,
感谢您对恩智浦半导体产品的关注,
使用预建的 Cortex-M 演示版是一个很好的起点,你使用的是 i.MX 93 EVK 还是带有预建映像的自定义板?
你在用什么电路板支持包?
要在 u-boot 中运行 Cortex-M 演示,你可以使用以下代码片段:
u-boot=> fatload mmc 1:1 80000000 sdk20-app.bin
u-boot=> cp.b 0x80000000 0x201e0000 0x10000
u-boot=> bootaux 0x1ffe0000 0
RPMSG 必须在 Linux RPROC 框架下运行,因为您必须在 DTB 中为 RPMSG 预留内存,而且 Cortex-A RPMSG 通信是通过 Linux 驱动程序进行的。
root@imx93evk:~# echo hello_world.elf > /sys/class/remoteproc/remoteproc0/
firmware
root@imx93evk:~# echo start > /sys/class/remoteproc/remoteproc0/state
此致
你好,@bora、
请尝试使用 imx93-11x11-evk_m33_TCM_rpmsg_lite_str_echo_rtos.elf
这是你正在测试的二进制文件,请参阅 SDK 中的可用示例:
SDK_24_12_00_MCIMX93-EVK\板\mcimx93evk\多核_示例
- rpmsg_lite_pingpong_rtos_linux
- rpmsg_lite_str_echo_rtos
此致
您好,
我试过了结果就是这样,
root @imx93 -11x11-lpddr4x-evk:~# echo start > /sys/class/remoteproc/remoteproc0/state [105.274513] remoteproc remoteproc remoteproc 0/state [105.274513] remoteproc remoteproc remoteproc 0/state [105.274513] remoteproc remoteproc remoteproc 0:启动 imx93-11x11-EVKK _m33_tcm_rpmsg_lite_str_echo_
rtos.elf,
size 59028
[ 105.294019] remoteproc remoteproc0: Registered carveout doesn't fit len request
[ 105.301405] rproc-virtio: probe of rproc-virtio.1.auto失败,错误 -12
[ 105.309101] remoteproc remoteproc0: 注册的分割不适合 len 请求
[ 105.316561] rproc-virtio: probe of rproc-virtio.2.auto failed with error -12
[ 105.830361] remoteproc remoteproc0: 远程处理器 imx-rproc 现在已启动
您好,
我可以在 LF-6.12.49 EVK 上通过以下步骤重现该功能
Cortex-A U-启动
Hit any key to stop autoboot: 0
u-boot=> fatload mmc 0:1 ${loadaddr} mcore-demos/imx93-11x11-evk_m33_TCM_rpmsg_lite_str_echo_rtos.bin
19816 bytes read in 18 ms (1 MiB/s)
u-boot=> cp.b ${loadaddr} 0x201e0000 0x20000
u-boot=> bootaux 0x1ffe0000 0
## Starting auxiliary core addr = 0x1FFE0000...
u-boot=> pri mmcargs
mmcargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot}
u-boot=> editenv m
mfgtool_args mmcargs mmcautodetect mmcboot mmcdev mmcpart mmcroot
u-boot=> editenv mmcargs
edit: setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot} clk_ignore_unused
u-boot=> boot
Cortex-A Linux
root@imx93evk:~# lsmod | grep -i imx_rpmsg_tty
root@imx93evk:~# modprobe imx_rpmsg_tty
从 U-boot 到 Linux 的 Cortex-M
RPMSG String Echo FreeRTOS RTOS API Demo...
Nameservice sent, ready for incoming messages...
Get Message From Master Side : "hello world!" [len : 12]
此致