Example of MCU booting AP in iMX8QM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example of MCU booting AP in iMX8QM

Jump to solution
1,051 Views
asconcepcion
Contributor I

Hi,

In the scfw porting guide it is mentioned one use-case in which the MCU  boots the AP by following this sequence:

• SCU ROM loads SECO FW and SCFW
• SCU ROM loads MCU and AP code (either could be a pre-loader/SPL, AP image loaded as data only)
• SCFW is run
• SCFW starts the MCU
• MCU code creates a new partition for the AP
• MCU boots the AP via sc_pm_boot()

I'm interested in this use-case as I would like that the MCU is the one that manages the "boot partition", and creates a new one for the AP + some peripherals.

What I don't see yet is how to make that the SCFW only starts the MCU and not both MCU and AP. I've been trying to create an image with imx-mkimage that contains both the AP and MCU firmware while passing the flag SC_BD_FLAGS_NO_AP (which should mean "Don't boot AP even if requested by ROM"). But if I do that the MCU firmware doesn't boot either, and in the SCU Debug Monitor I get this message:

err: bad img part, no primary
board fault(0, 5, 0)

Could you please share some codebase for this use-case?

Thanks in advance!

0 Kudos
1 Solution
1,016 Views
igorpadykov
NXP Employee
NXP Employee

Hi Alejandro

 

> boot image containing both cortex-m4 and cortex-a image, in which the cortex-a
>is not started right after the scfw finishes the initialization?

 

one can try to use boot image containing cortex-m4, then after SCFW starts the M4,
M4 code creates a new partition for the AP,  M4 boots the AP via sc_pm_boot().

 

Best regards
igor

View solution in original post

0 Kudos
4 Replies
1,036 Views
igorpadykov
NXP Employee
NXP Employee

Hi Alejandro

 

one can look at build examples provided on

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8-Boot-process-and-creating-a-bootab...

 

Best regards
igor

0 Kudos
1,031 Views
asconcepcion
Contributor I

Hi Igor,

Thanks for the link. I was already following that page to build a boot image containing both cortex-m4 and cortex-a images. It works well. However, as commented before, what I'm still missing is how to avoid that the SCFW starts also the cortex-a cores. I want that the SCFW only starts the cortex-m4 image, so that I can start the cortex-a cores from the cortex-m4 (calling to sc_pm_boot()) as it is described in the section "MCU boots AP" in the SCFW porting guide. So, do you know how I can create a boot image containing both cortex-m4 and cortex-a image, in which the cortex-a is not started right after the scfw finishes the initialization?

Thanks.

0 Kudos
1,017 Views
igorpadykov
NXP Employee
NXP Employee

Hi Alejandro

 

> boot image containing both cortex-m4 and cortex-a image, in which the cortex-a
>is not started right after the scfw finishes the initialization?

 

one can try to use boot image containing cortex-m4, then after SCFW starts the M4,
M4 code creates a new partition for the AP,  M4 boots the AP via sc_pm_boot().

 

Best regards
igor

0 Kudos
1,011 Views
asconcepcion
Contributor I

Hi,

Finally I saw that I wasn't passing the right partition with the "-p" argument for the cortex-m4 when creating the boot image.

Thanks Igor.

0 Kudos