RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP

Gaurav Sharma posted 7 patches 2 weeks, 1 day ago
Only 0 patches received!
There is a newer version of this series
RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Gaurav Sharma 2 weeks, 1 day ago
ping

> -----Original Message-----
> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> Sent: 24 July 2026 09:32
> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard Beschow
> <shentey@gmail.com>
> Subject: RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric
> Multiprocessing boot support for i.MX8MP
> 
> Ping
> 
> > -----Original Message-----
> > From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> > Sent: 06 July 2026 21:59
> > To: qemu-devel@nongnu.org
> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav Sharma
> > <gaurav.sharma_7@nxp.com>
> > 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
> > <shentey@gmail.com>
> >   - 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 <gaurav.sharma_7@nxp.com>
> >
> > 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
RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Bernhard Beschow 3 days, 7 hours ago

Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma <gaurav.sharma_7@nxp.com>:
>ping
>
>> -----Original Message-----
>> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
>> Sent: 24 July 2026 09:32
>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard Beschow
>> <shentey@gmail.com>
>> 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?

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/latest/boards/nxp/imx8mp_evk/doc/index.html#programming-and-debugging-m7


>> 
>> > -----Original Message-----
>> > From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
>> > Sent: 06 July 2026 21:59
>> > To: qemu-devel@nongnu.org
>> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav Sharma
>> > <gaurav.sharma_7@nxp.com>
>> > 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
>> > <shentey@gmail.com>
>> >   - 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 <gaurav.sharma_7@nxp.com>
>> >
>> > 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
>
RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Bernhard Beschow 3 days, 3 hours ago

Am 23. August 2026 12:02:22 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>
>
>Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma <gaurav.sharma_7@nxp.com>:
>>ping
>>
>>> -----Original Message-----
>>> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
>>> Sent: 24 July 2026 09:32
>>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
>>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard Beschow
>>> <shentey@gmail.com>
>>> 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.nxp.com/bundle/AN5317/page/topics/imx_linux_rproc_support.html . Fixed.

Then I set up MCUXpresso following this guide: https://mcuxpresso.nxp.com/mcuxsdk/latest/html/gsd/repo_setup.html

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?

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/latest/boards/nxp/imx8mp_evk/doc/index.html#programming-and-debugging-m7
>
>
>>> 
>>> > -----Original Message-----
>>> > From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
>>> > Sent: 06 July 2026 21:59
>>> > To: qemu-devel@nongnu.org
>>> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav Sharma
>>> > <gaurav.sharma_7@nxp.com>
>>> > 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
>>> > <shentey@gmail.com>
>>> >   - 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 <gaurav.sharma_7@nxp.com>
>>> >
>>> > 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
>>
RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Gaurav Sharma 2 days, 15 hours ago


NXP Confidential
> -----Original Message-----
> From: Bernhard Beschow <shentey@gmail.com>
> Sent: 23 August 2026 22:26
> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> 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
> <shentey@gmail.com>:
> >
> >
> >Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma
> <gaurav.sharma_7@nxp.com>:
> >>ping
> >>
> >>> -----Original Message-----
> >>> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> >>> Sent: 24 July 2026 09:32
> >>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> devel@nongnu.org
> >>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard Beschow
> >>> <shentey@gmail.com>
> >>> 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 <gaurav.sharma_7@nxp.com>
> >>> > Sent: 06 July 2026 21:59
> >>> > To: qemu-devel@nongnu.org
> >>> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav Sharma
> >>> > <gaurav.sharma_7@nxp.com>
> >>> > 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
> >>> > <shentey@gmail.com>
> >>> >   - 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 <gaurav.sharma_7@nxp.com>
> >>> >
> >>> > 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
> >>
RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Bernhard Beschow 2 days, 9 hours ago

Am 24. August 2026 04:55:28 UTC schrieb Gaurav Sharma <gaurav.sharma_7@nxp.com>:
>
>
>
>NXP Confidential
>> -----Original Message-----
>> From: Bernhard Beschow <shentey@gmail.com>
>> Sent: 23 August 2026 22:26
>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
>> 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
>> <shentey@gmail.com>:
>> >
>> >
>> >Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma
>> <gaurav.sharma_7@nxp.com>:
>> >>ping
>> >>
>> >>> -----Original Message-----
>> >>> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
>> >>> Sent: 24 July 2026 09:32
>> >>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
>> devel@nongnu.org
>> >>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard Beschow
>> >>> <shentey@gmail.com>
>> >>> 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,

Hi Gurav,

>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.

The step is there, I missed it. Now I moved the .elf file to /lib/firmware and performed the loading with the new, absolute path. Still the same outcome...

>
>> 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 <gaurav.sharma_7@nxp.com>
>> >>> > Sent: 06 July 2026 21:59
>> >>> > To: qemu-devel@nongnu.org
>> >>> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav Sharma
>> >>> > <gaurav.sharma_7@nxp.com>
>> >>> > 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
>> >>> > <shentey@gmail.com>
>> >>> >   - 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 <gaurav.sharma_7@nxp.com>
>> >>> >
>> >>> > 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
>> >>
RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Gaurav Sharma 2 days, 8 hours ago


NXP Confidential
> -----Original Message-----
> From: Bernhard Beschow <shentey@gmail.com>
> Sent: 24 August 2026 16:13
> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> Subject: RE: [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 24. August 2026 04:55:28 UTC schrieb Gaurav Sharma
> <gaurav.sharma_7@nxp.com>:
> >
> >
> >
> >NXP Confidential
> >> -----Original Message-----
> >> From: Bernhard Beschow <shentey@gmail.com>
> >> Sent: 23 August 2026 22:26
> >> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> devel@nongnu.org
> >> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> >> 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
> >> <shentey@gmail.com>:
> >> >
> >> >
> >> >Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma
> >> <gaurav.sharma_7@nxp.com>:
> >> >>ping
> >> >>
> >> >>> -----Original Message-----
> >> >>> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> >> >>> Sent: 24 July 2026 09:32
> >> >>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> >> devel@nongnu.org
> >> >>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard
> >> >>> Beschow <shentey@gmail.com>
> >> >>> 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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc
> >>
> s.n%2F&data=05%7C02%7Cgaurav.sharma_7%40nxp.com%7C078980c8a6cf4
> 41d336
> >>
> 708df01cc83b7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6392
> 316500
> >>
> 62951398%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYi
> OiIwLjAu
> >>
> MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%
> 7C%7C
> >>
> &sdata=EZYjWZBic3VeUAYyFd2MmxmMdnt5OHtR1pujyFlD01Y%3D&reserved
> =0
> >>
> 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,
>
> Hi Gurav,
>
> >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.
>
> The step is there, I missed it. Now I moved the .elf file to /lib/firmware and
> performed the loading with the new, absolute path. Still the same outcome...
>

I have uploaded the test binaries here - https://github.com/gauravsharma0305/qemu_test_bins. So, you will get:-
1. Kernel Image
2. RPMSG DTB
3. M7 binary elf

can you please test the emulation with the above binaries ? that way you'll know which side of changes are being missed. I have been testing it consistently with these binaries.

./qemu-system-aarch64 -M imx8mp-evk -m 3G -display none -serial null -serial stdio -serial null -serial pty:/tmp/imx8mp-uart4 -kernel Image -dtb imx8mp-evk-rpmsg.dtb -append "root=/dev/mmcblk2p1" -drive file=20240522-br2024.02-nitrogen8mp_qt5_gst1.img,if=sd,bus=2,format=raw,id=mmcblk2

> >
> >> 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%2
> Fin
> >> dex.ht
> >> >ml%23programming-and-debugging-
> >> m7&data=05%7C02%7Cgaurav.sharma_7%40nxp.
> >> >com%7Cba42497956e9477b17c608df01376f9a%7C686ea1d3bc2b4c6fa92
> cd
> >> 99c5c3016
> >> >35%7C0%7C0%7C639231009747200340%7CUnknown%7CTWFpbGZsb3d
> 8ey
> >> JFbXB0eU1hcGk
> >> >iOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIld
> UIj
> >> oyfQ
> >> >%3D%3D%7C0%7C%7C%7C&sdata=cyY1qeaapUnyZB45dfZ5V4Os0S2gkQr
> rq
> >> MXR5XZ83fw%3
> >> >D&reserved=0
> >> >
> >> >
> >> >>>
> >> >>> > -----Original Message-----
> >> >>> > From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> >> >>> > Sent: 06 July 2026 21:59
> >> >>> > To: qemu-devel@nongnu.org
> >> >>> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav
> >> >>> > Sharma <gaurav.sharma_7@nxp.com>
> >> >>> > 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
> >> >>> > <shentey@gmail.com>
> >> >>> >   - 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 <gaurav.sharma_7@nxp.com>
> >> >>> >
> >> >>> > 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
> >> >>
RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Gaurav Sharma 2 days, 4 hours ago


NXP Confidential
> -----Original Message-----
> From: Gaurav Sharma
> Sent: 24 August 2026 16:46
> To: 'Bernhard Beschow' <shentey@gmail.com>; qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> Subject: RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric
> Multiprocessing boot support for i.MX8MP
>
>
>
> > -----Original Message-----
> > From: Bernhard Beschow <shentey@gmail.com>
> > Sent: 24 August 2026 16:13
> > To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> devel@nongnu.org
> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> > Subject: RE: [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 24. August 2026 04:55:28 UTC schrieb Gaurav Sharma
> > <gaurav.sharma_7@nxp.com>:
> > >
> > >
> > >
> > >NXP Confidential
> > >> -----Original Message-----
> > >> From: Bernhard Beschow <shentey@gmail.com>
> > >> Sent: 23 August 2026 22:26
> > >> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> > devel@nongnu.org
> > >> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> > >> 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
> > >> <shentey@gmail.com>:
> > >> >
> > >> >
> > >> >Am 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma
> > >> <gaurav.sharma_7@nxp.com>:
> > >> >>ping
> > >> >>
> > >> >>> -----Original Message-----
> > >> >>> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> > >> >>> Sent: 24 July 2026 09:32
> > >> >>> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> > >> devel@nongnu.org
> > >> >>> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard
> > >> >>> Beschow <shentey@gmail.com>
> > >> >>> 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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fd
> > >> oc
> > >>
> >
> s.n%2F&data=05%7C02%7Cgaurav.sharma_7%40nxp.com%7C078980c8a6cf4
> > 41d336
> > >>
> >
> 708df01cc83b7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6392
> > 316500
> > >>
> >
> 62951398%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYi
> > OiIwLjAu
> > >>
> >
> MDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%
> > 7C%7C
> > >>
> >
> &sdata=EZYjWZBic3VeUAYyFd2MmxmMdnt5OHtR1pujyFlD01Y%3D&reserved
> > =0
> > >>
> >
> 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%2
> Fj
> > %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,
> >
> > Hi Gurav,
> >
> > >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.
> >
> > The step is there, I missed it. Now I moved the .elf file to
> > /lib/firmware and performed the loading with the new, absolute path. Still
> the same outcome...
> >
>
> I have uploaded the test binaries here -
> https://github.com/gauravsharma0305/qemu_test_bins. So, you will get:- 1.
> Kernel Image 2. RPMSG DTB 3. M7 binary elf
>
> can you please test the emulation with the above binaries ? that way you'll
> know which side of changes are being missed. I have been testing it
> consistently with these binaries.
>
> ./qemu-system-aarch64 -M imx8mp-evk -m 3G -display none -serial null -
> serial stdio -serial null -serial pty:/tmp/imx8mp-uart4 -kernel Image -dtb
> imx8mp-evk-rpmsg.dtb -append "root=/dev/mmcblk2p1" -drive
> file=20240522-br2024.02-
> nitrogen8mp_qt5_gst1.img,if=sd,bus=2,format=raw,id=mmcblk2
>
> > >
> > >> 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.
> > >> >

I have made a few changes to enable ITCM and M7 VTOR address loading in qemu. Tested the changes. Now bare-metal and zephyr firmware can be loaded and executed from TCM as well as DDR. So, both TCM and DDR variants of zephyr and bare-meta binaries will work. I will include this change in the next iteration of the patch series.

> > >> >Best regards,
> > >> >Bernhard
> > >> >
> > >> >[1]
> > >> >https://docs/.
> > >> >zephyrproject.org%2Flatest%2Fboards%2Fnxp%2Fimx8mp_evk%2Fdoc%
> 2
> > Fin
> > >> dex.ht
> > >> >ml%23programming-and-debugging-
> > >> m7&data=05%7C02%7Cgaurav.sharma_7%40nxp.
> > >> >com%7Cba42497956e9477b17c608df01376f9a%7C686ea1d3bc2b4c6fa
> 92
> > cd
> > >> 99c5c3016
> > >> >35%7C0%7C0%7C639231009747200340%7CUnknown%7CTWFpbGZsb3
> d
> > 8ey
> > >> JFbXB0eU1hcGk
> > >> >iOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsI
> ld
> > UIj
> > >> oyfQ
> > >> >%3D%3D%7C0%7C%7C%7C&sdata=cyY1qeaapUnyZB45dfZ5V4Os0S2gk
> Qr
> > rq
> > >> MXR5XZ83fw%3
> > >> >D&reserved=0
> > >> >
> > >> >
> > >> >>>
> > >> >>> > -----Original Message-----
> > >> >>> > From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> > >> >>> > Sent: 06 July 2026 21:59
> > >> >>> > To: qemu-devel@nongnu.org
> > >> >>> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav
> > >> >>> > Sharma <gaurav.sharma_7@nxp.com>
> > >> >>> > 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 <shentey@gmail.com>
> > >> >>> >   - 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 <gaurav.sharma_7@nxp.com>
> > >> >>> >
> > >> >>> > 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
> > >> >>
RE: [EXT] RE: [PATCHv2 0/7] hw/arm: Adding Cortex-M7 Asymmetric Multiprocessing boot support for i.MX8MP
Posted by Gaurav Sharma 2 days, 11 hours ago


NXP Confidential
> -----Original Message-----
> From: Bernhard Beschow <shentey@gmail.com>
> Sent: 23 August 2026 17:32
> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-devel@nongnu.org
> Cc: pbonzini@redhat.com; peter.maydell@linaro.org
> 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 11. August 2026 04:47:40 UTC schrieb Gaurav Sharma
> <gaurav.sharma_7@nxp.com>:
> >ping
> >
> >> -----Original Message-----
> >> From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> >> Sent: 24 July 2026 09:32
> >> To: Gaurav Sharma <gaurav.sharma_7@nxp.com>; qemu-
> devel@nongnu.org
> >> Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Bernhard Beschow
> >> <shentey@gmail.com>
> >> 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?
>
> 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.
>

the current emulation was tested on bare metal binaries built from the official mcuxpresso sdk.
I am checking if it has all the parts to make zephyr firmware run without issues. I think with some minor changes, zephyr hello world elf linked to load at DDR will work. To make the M7 binaries run from TCM, other than the TCM implementation in qemu, additional changes might be needed.

> Best regards,
> Bernhard
>
> [1]
> https://docs.ze/
> phyrproject.org%2Flatest%2Fboards%2Fnxp%2Fimx8mp_evk%2Fdoc%2Findex
> .html%23programming-and-debugging-
> m7&data=05%7C02%7Cgaurav.sharma_7%40nxp.com%7C2f5839178d0c4cf5c
> 8e508df010e66bf%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63
> 9230833565176922%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRy
> dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3
> D%3D%7C0%7C%7C%7C&sdata=6MDZtlyLAic2qbyvluzst0KBzk4NWl1zHzh3IOu
> aXho%3D&reserved=0
>
>
> >>
> >> > -----Original Message-----
> >> > From: Gaurav Sharma <gaurav.sharma_7@nxp.com>
> >> > Sent: 06 July 2026 21:59
> >> > To: qemu-devel@nongnu.org
> >> > Cc: pbonzini@redhat.com; peter.maydell@linaro.org; Gaurav Sharma
> >> > <gaurav.sharma_7@nxp.com>
> >> > 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
> >> > <shentey@gmail.com>
> >> >   - 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 <gaurav.sharma_7@nxp.com>
> >> >
> >> > 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
> >