RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Gaurav Sharma <[email protected]>
| Newsgroups | org.nongnu.qemu-devel |
|---|---|
| Message-ID | <DB8PR04MB71774BF67E652DD2B6DD3A6187A02@DB8PR04MB7177.eurprd04.prod.outlook.com> |
NXP Confidential > -----Original Message----- > From: Bernhard Beschow <[email protected]> > Sent: 23 August 2026 22:26 > To: Gaurav Sharma <[email protected]>; [email protected] > Cc: [email protected]; [email protected] > Subject: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric > Multiprocessing boot support for i.MX8MP > > Caution: This is an external email. Please take care when clicking links or > opening attachments. When in doubt, report the message using the 'Report > this email' button > > > Am 23. August 2026 12:02:22 UTC schrieb Bernhard Beschow > <[email protected]>: > > > > > >Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma > <[email protected]>: > >>ping > >> > >>> -----Original Message----- > >>> From: Gaurav Sharma <[email protected]> > >>> Sent: 24 July 2026 09:32 > >>> To: Gaurav Sharma <[email protected]>; qemu- > [email protected] > >>> Cc: [email protected]; [email protected]; Bernhard Beschow > >>> <[email protected]> > >>> Subject: RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric > >>> Multiprocessing boot support for i.MX8MP > >>> > >>> Ping > > > >Hi Gurav, > > > >I finally could test your series. I built Buildroot's > freescale_imx8mpevk_defonfig (v2026.05) which has the required kernel > options already enabled and passed imx8mp-evk-rpmsg.dtb to QEMU. QEMU > starts successfully. However, when attempting to load an .elf image to > remoteproc0/firmware, I get: > > > > # echo zephyr.elf > > >/sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/firm > >ware > > [ 887.325597] imx-rproc imx8mp-cm7: can't change firmware while > running > > sh: write error: Device or resource busy > > > >Checking the state results in: > > > > # cat /sys/devices/platform/imx8mp-cm7/remoteproc/remoteproc0/state > > attached > > > >I didn't dig into the Linux kernel sources to investigate this further. Do you > have an idea of what is missing? > > Okay, I missed the -mmio change as well as the reserved regions: > https://docs.n/ > xp.com%2Fbundle%2FAN5317%2Fpage%2Ftopics%2Fimx_linux_rproc_suppo > rt.html&data=05%7C02%7Cgaurav.sharma_7%40nxp.com%7Cba42497956e94 > 77b17c608df01376f9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0% > 7C639231009747150362%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki > OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoy > fQ%3D%3D%7C0%7C%7C%7C&sdata=VnPdMGYtloMgOrGjEMM8V0fAeyJ4PX > 1mE0mDUQJiasA%3D&reserved=0 . Fixed. > > Then I set up MCUXpresso following this guide: > https://mcuxpr/ > esso.nxp.com%2Fmcuxsdk%2Flatest%2Fhtml%2Fgsd%2Frepo_setup.html&dat > a=05%7C02%7Cgaurav.sharma_7%40nxp.com%7Cba42497956e9477b17c608 > df01376f9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6392310 > 09747181724%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUs > IlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D > %7C0%7C%7C%7C&sdata=9h%2BskLy4Ymmj5Hdm4bbxNWwBMVmTA%2Fj%2 > Bt2eAQvbKnrg%3D&reserved=0 > > With an ARM eabi toolchain provided by my distrubution I created the .elf > file: > > west build -b evkmimx8mp examples/driver_examples/uart/polling/ -- > config ddr_release > > With the apporpriate .dtb I get in Buildroot guest: > > # modprobe rpmsg_char > # echo uart_polling_cm7.elf > /sys/devices/platform/imx8mp- > cm7/remoteproc/remoteproc0/firmware > # echo start > /sys/devices/platform/imx8mp- > cm7/remoteproc/remoteproc0/state > [ 52.182388] remoteproc remoteproc0: powering up imx-rproc > [ 52.195672] remoteproc remoteproc0: Direct firmware load for > uart_polling_cm7.elf failed with error -2 > [ 52.195895] remoteproc remoteproc0: Falling back to sysfs fallback for: > uart_polling_cm7.elf > [ 113.748324] remoteproc remoteproc0: request_firmware failed: -110 > [ 113.755836] remoteproc remoteproc0: Boot failed: -110 > sh: write error: Connection timed out > > Any ideas? > Hey Bernhard, Please copy the elf firmware to /lib/firmware directory before trying the above remoteproc loading. Linux kernel has a built-in firmware loader subsystem that automatically searches for firmware files in specific directories such as :- /lib/firmware/ It is a one-time setup. The firmware loading should then work. I might have missed this copy step in the rst. I will add it. > Best regards, > Bernhard > > > > >Note that I built Zephyr's imx8mp_evk for the M7 [1] which produces > zephyr.elf. Does the series provide everything to use Zephyr or do we need to > add ITCM memory? Adding a dedicated memory map including ITCM for the > M7 core doesn't seem too complicated. Using Zephyr may allow for having a > functional test in our CI, though of course binary images had to be provided. > > > >Best regards, > >Bernhard > > > >[1] > >https://docs/. > >zephyrproject.org%2Flatest%2Fboards%2Fnxp%2Fimx8mp_evk%2Fdoc%2Fin > dex.ht > >ml%23programming-and-debugging- > m7&data=05%7C02%7Cgaurav.sharma_7%40nxp. > >com%7Cba42497956e9477b17c608df01376f9a%7C686ea1d3bc2b4c6fa92cd > 99c5c3016 > >35%7C0%7C0%7C639231009747200340%7CUnknown%7CTWFpbGZsb3d8ey > JFbXB0eU1hcGk > >iOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIj > oyfQ > >%3D%3D%7C0%7C%7C%7C&sdata=cyY1qeaapUnyZB45dfZ5V4Os0S2gkQrrq > MXR5XZ83fw%3 > >D&reserved=0 > > > > > >>> > >>> > -----Original Message----- > >>> > From: Gaurav Sharma <[email protected]> > >>> > Sent: 06 July 2026 21:59 > >>> > To: [email protected] > >>> > Cc: [email protected]; [email protected]; Gaurav Sharma > >>> > <[email protected]> > >>> > Subject: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric > >>> > Multiprocessing boot support for i.MX8MP > >>> > > >>> > Changes in v1: > >>> > > >>> > This series adds Asymmetric Multiprocessing (AMP) boot support for > >>> > the > >>> > Cortex-M7 core on the i.MX8MP SoC. The M7 firmware can be loaded > >>> > and started from Linux running on the Cortex-A53 cores via the > >>> > remoteproc framework. > >>> > > >>> > The series introduces the following peripheral models needed for AMP: > >>> > - GPC (General Power Controller) > >>> > - GPR (General Purpose Registers) > >>> > - SRC (System Reset Controller) authored by Bernhard Beschow > >>> > <[email protected]> > >>> > - MU (Messaging Unit) > >>> > - Extends the CCM with M7 clock outputs and wires into the i.MX8MP > SoC > >>> > - Enable Cortex-M7 boot in i.MX8MP EVK functional test > >>> > > >>> > Changes in v2: > >>> > > >>> > - Removed the usage of device_class_set_legacy_reset in imx8mp > >>> > gpc,gpr,mu and > >>> > src. > >>> > - Removed the usage of 'smp' , 'maxcpus' and 'enable-cm7' to make the > >>> > invocation simpler. > >>> > - Cleaned up imx8mp_src by removing redundant/unused code. > >>> > - Updated Maintainers and improved the imx8mp documentation > >>> > > >>> > Signed-off-by: Gaurav Sharma <[email protected]> > >>> > > >>> > Bernhard Beschow (1): > >>> > hw/misc: Add SRC (System Reset Controller) to i.MX8MP > >>> > > >>> > Gaurav Sharma (6): > >>> > hw/misc: Add i.MX8MP GPC (General Power Controller) IP > >>> > hw/misc: Add GPR (General Purpose Register) IP to iMX8MP > >>> > hw/misc: Add MU (Messaging Unit) IP to i.MX8MP device model > >>> > hw/misc: Extend i.MX8MP CCM with Cortex-M7 clock outputs > >>> > hw/arm: Enable Cortex-M7 AMP boot on i.MX8MP > >>> > tests/functional: Enable Cortex-M7 boot in i.MX8MP EVK > >>> > functional test > >>> > > >>> > MAINTAINERS | 13 +- > >>> > docs/system/arm/imx8m.rst | 188 ++++++++++- > >>> > hw/arm/Kconfig | 4 + > >>> > hw/arm/fsl-imx8mp.c | 220 ++++++++++++- > >>> > hw/arm/imx8mp-evk.c | 3 +- > >>> > hw/misc/Kconfig | 12 + > >>> > hw/misc/imx8mp_ccm.c | 9 + > >>> > hw/misc/imx8mp_gpc.c | 146 +++++++++ > >>> > hw/misc/imx8mp_gpr.c | 153 +++++++++ > >>> > hw/misc/imx8mp_mu.c | 328 ++++++++++++++++++++ > >>> > hw/misc/imx8mp_src.c | 275 ++++++++++++++++ > >>> > hw/misc/meson.build | 4 + > >>> > hw/misc/trace-events | 5 + > >>> > include/hw/arm/fsl-imx8mp.h | 29 +- > >>> > include/hw/misc/imx8mp_ccm.h | 3 + > >>> > include/hw/misc/imx8mp_gpc.h | 34 ++ > >>> > include/hw/misc/imx8mp_gpr.h | 56 ++++ > >>> > include/hw/misc/imx8mp_mu.h | 53 ++++ > >>> > include/hw/misc/imx8mp_src.h | 31 ++ > >>> > tests/functional/aarch64/test_imx8mp_evk.py | 1 - > >>> > 20 files changed, 1539 insertions(+), 28 deletions(-) create > >>> > mode > >>> > 100644 hw/misc/imx8mp_gpc.c create mode 100644 > >>> hw/misc/imx8mp_gpr.c > >>> > create mode 100644 hw/misc/imx8mp_mu.c create mode 100644 > >>> > hw/misc/imx8mp_src.c create mode 100644 > >>> include/hw/misc/imx8mp_gpc.h > >>> > create mode 100644 include/hw/misc/imx8mp_gpr.h create mode > >>> > 100644 include/hw/misc/imx8mp_mu.h create mode 100644 > >>> > include/hw/misc/imx8mp_src.h > >>> > > >>> > -- > >>> > 2.34.1 > >>