Starting M7 from Linux freezes the system (U-boot prepare_mcore is missing)

  • Hello,


    I need to control the Cortex M7 from Linux. For that, I enabled the rpproc driver by removing the comment-marks from the definitions of SUPPORT_M7 and SUPPORT_RPMSG in the picocoremx8mp.dts device tree file. The driver gets loaded, and the remoteproc0 node and its children appear in /sys/class/remoteproc. However, any attempt to start a program on the M7 freezes the entire system. Starting M7 from U-boot with bootaux works fine.


    The issue is well known, see e.g. https://community.nxp.com/t5/i…RPMSG/m-p/1625436#M203496. The solution from NXP, which is even documented on page 44 in https://www.nxp.com/docs/en/us…IMX_LINUX_USERS_GUIDE.pdf, is to execute "run prepare_mcore" in U-boot before the Linux kernel gets started. However, my U-boot version (2021.04-F+S-fsimx8mp-Y2023.09) does not provide prepare_mcore. So, what can I do to get the M7 running from Linux?

  • Hello,


    we currently have no tested FreeRTOS release for the new fsimx8mp-Y2023.09 release, so some things may not work as expected.


    The U-boot script prepare_mcore basically seems to set the kernel parameter clk-imx8mp.mcore_booted so you could try to execute

    setenv extra clk-imx8mp.mcore_booted

    before booting and see if this helps.


    Your F&S Support Team

  • Thanks, this fixes indeed the freeze. However, the M7 does still not work as it should. I tried (not only) the hello_world example from freertos-fsimx8mp-V2022.07.1.tar.bz2. It works fine when starting it from U-boot. From Linux, it seems now to start as well:


    root@fsimx8mp:/sys/class/remoteproc/remoteproc0# echo start > state

    remoteproc remoteproc0: powering up imx-rproc

    remoteproc remoteproc0: Booting fw image hello_world.elf, size 152868

    remoteproc remoteproc0: remote processor imx-rproc is now up


    But I don't see any output in the console. I'm therefore unsure whether the M7 is really running at all. (Could also be just an issue with the console. But if I don't use rpproc, start the M7 from U-boot and boot Linux afterwards, the M7, its console and Linux work fine in parallel. Therefore I think it is unlikely that this is just a problem with the console.)


    Do you have any advice about that?