Error loading modified imx-atf on Nitrogen8M mini (iMX8MM)

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

Error loading modified imx-atf on Nitrogen8M mini (iMX8MM)

1,308 Views
sandeepkiranp
Contributor I

Hi,

First things first. I am a newbie trying to run a Linux OS application in the Normal World to talk to a TA in the Secure World, all things running on Boundary Devices Nitrogen8M Mini rev 2 board (from the iMX8MM family).

https://github.com/boundarydevices/imx-atf
https://github.com/boundarydevices/u-boot/tree/boundary-v2022.04
https://github.com/nxp-imx/imx-optee-os/

All things run fine with vanilla images. I have a requirement to store around 100KB of global data (basically policy information) within the ATF binary that I would use inside the SMC handler "services/spd/opteed/opteed_main.c" at runtime. To get the compilation going, I updated the "BL31_LIMIT" constant in "plat/imx/imx8m/imx8mm/include/platform_def.h" from 0x940000 to 0x970000. I then built the BL31 binary, and with that I built the u-boot flash.bin. But when I flash this binary, ATF wouldn't start. I am sure I need to make some size adjustments within u-boot to accommodate the increase in ATF size. But I don't know where to do that. Could you kindly advise me on the necessary modifications to ensure it boots correctly? Here's where it gets stuck

U-Boot SPL 2018.07-36636-gb728f6e8bb-dirty (Apr 18 2024 - 17:59:31 -0400)
config to do 3000 1d training.
trying rank 0
config to do 3000 1d training.
config to do 3000 2d training.
config to do 400 1d training.
config to do 100 1d training.
Normal Boot
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 1273272 to 0x40400000... done
Jumping to header at 0x40400000
Header Tag is not an IMX image
Found header at 0x4042ba00


Sorry if any of the information I provided above doesn't make sense. Appreciate any help here.

Regards
Sandeep

0 Kudos
Reply
3 Replies

1,202 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @sandeepkiranp 

Have you modified the ATF load address in soc.mak?

0 Kudos
Reply

1,192 Views
sandeepkiranp
Contributor I

Hi @Zhiming_Liu 

Thank you for the reply. I don't see the soc.mak file inside the u-boot. But I do see the following in the u-boot top level Makefile

SOC_CPU = iMX8MM
TEE_LOAD_ADDR = 0xbe000000
ATF_LOAD_ADDR = 0x00920000

This matches the address that is specified in ATF's "plat/imx/imx8m/imx8mm/include/platform_def.h"

#define BL31_BASE U(0x920000)
#define BL31_LIMIT U(0x970000)

 

0 Kudos
Reply

1,247 Views
sandeepkiranp
Contributor I

Can someone help me with this?

0 Kudos
Reply