Hi Ravi,

Can you please confirm if control reached "test image" ? I guess, yes, as PC has right value.
Also, does your "test image" depends on device tree for console initialization?

One thing i see missing in "plat/imx/imx8qm/imx8qm_bl31_setup.c +352" is bl33 header initialization
SET_PARAM_HEAD(&bl33_image_ep_info, PARAM_EP, VERSION_1,  0);

thanks
Manish


From: TF-A <tf-a-bounces@lists.trustedfirmware.org> on behalf of rkohli2000 gmail via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 21 October 2020 00:10
To: Ravi Kohli <rkohli2000@gmail.com>
Cc: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: Re: [TF-A] BL31 as bootloader
 
Hi Alexei,

I built my TF-A (imx-atf) b31.bin image using the RESET_TO_BL31 build option for the i.MX8QM MEK dev kit.
make DEBUG=1 RESET_TO_BL31=1 PLAT=imx8qm bl31

I used the imx-mkimage tool to generate a flash.bin (flash bootable image) with the following target to run on the MEK:
flash_cortex_a53: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin bl31.bin MyA53Serial.bin imx8qm-mek-ca53.dtb
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c flags 0x00200000 -scfw scfw_tcm.bin -ap bl31.bin a53 0x80000000 -c -p3 -ap MyA53Serial.bin a53 0x80020000 -p4 --data imx8qm-mek-ca53.dtb 0x83000000 -out flash.bin

Here, I allocated bl31.bin to boot from 0x80000000 and a test image at BL33 (normal world) entry point 0x80020000 (both for Cortex-A53).
I can see DEBUG console output from the bl31.bin image but no serial output from my test image I am trying to boot from 0x80020000.
NOTICE:  Memreg 3 0x38000000 -- 0x3bffffff
NOTICE:  Memreg 4 0x60000000 -- 0x6fffffff
NOTICE:  Memreg 5 0x70000000 -- 0x7fffffff
NOTICE:  Memreg 6 0x80000000 -- 0xffffffff
NOTICE:  Memreg 7 0x400000000 -- 0x43fffffff
NOTICE:  Memreg 8 0x880000000 -- 0x97fffffff
NOTICE:  Non-secure Partitioning Succeeded
NOTICE:  BL31: v2.2(debug):imx_5.4.24_er3-1-g06450210f-dirty
NOTICE:  BL31: Built : 17:33:32, Oct 20 2020
INFO: bl31_platform_setup is called
INFO:    GICv3 with legacy support detected. ARM GICv3 driver initialized in EL3
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x80020000
INFO:    SPSR = 0x3c9
INFO: BL31: DEBUG: image_type is: normal

Can anyone please suggest what could be the issue here that I don't see the test image console output ?
Note, the same test image works fine using u-boot.

Regards
Ravi


On Oct 7, 2020, at 12:43 PM, rkohli2000 gmail via TF-A <tf-a@lists.trustedfirmware.org> wrote:

Hi Alexei,

Thanks for your reply. I have not verified the RESET_TO_BL1 for imx8qm yet.
I will try it out and confirm. And, thanks for this suggestion. 

Regards
Ravi

On Oct 7, 2020, at 12:12 PM, Alexei Fedorov <Alexei.Fedorov@arm.com> wrote:

Hi Ravi,

Have you tried to use RESET_TO_BL31 build option for your platform?

Regards.
Alexei

From: TF-A <tf-a-bounces@lists.trustedfirmware.org> on behalf of rkohli2000 gmail via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 07 October 2020 17:01
To: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: [TF-A] BL31 as bootloader
 
Hi,
I'm a new user and sorry for some basic TF-A questions. Any guidance is appreciated.

I'm am able boot the TF-A bl31.bin image itself on my i.MX8QM MEK platform without using u-boot.
I can use the imx-mkimage tool to create a flash or eMMC bootable image (flash.bin). Here, I can
specify this container image with both bl31.bin and a separate custom app at a give flash address.
This is without any security requirements or dependencies.

Can I use the T-FA bl31.bin image to act as a first stage bootloader (without u-boot) and then launch 
a "custom" bare metal app for Cortex-A53 (for example) on the i.MX8QM at the given (BL33) entry point 
0x80020000 address ? 

Thanks in advance.
Ravi
 


-- 
TF-A mailing list
TF-A@lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-a

--
TF-A mailing list
TF-A@lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-a