Changing the entry point of bl31.bin (TF-A) on i.MX8QM

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

Changing the entry point of bl31.bin (TF-A) on i.MX8QM

1,371 Views
nagabhushan_v
Contributor I

Hi,

I am trying to change the load address and entry point of bl31.bin so that the u-boot-atf.bin gets loaded and executed at a different DRAM address than the usual 0x80000000. Is it possible to change the entrypoint to say 0xA0000000? Here are the changes i did but was unsuccessful

 bl31.bin:

> /trusted-firmware-a/plat/imx/imx8qm/include/platform_def.h

#define BL31_BASE           0xA0000000
#define BL31_LIMIT          0xA0020000
#define PLAT_NS_IMAGE_OFFSET     0xA0020000
 
flash.bin:
And while creating the boot image using the mkimage tool, i am making the following change in soc.mak
 
>soc.mak
flash_flexspi: $(MKIMG) $(AHAB_IMG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -rev B0 -dev flexspi -append $(AHAB_IMG) -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a53 0xA0000000 -out flash.bin
 
- When the entrypoint is 0x80000000 i can see uart output prints from the bl31 image but i dont see any uart prints as soon as i change the entrypoint to 0xA0000000.
- I tried dumping the memory(first few bytes) from SCFW Debug monitor and i see that the SCU ROM has loaded the bl31 image at 0xA0000000 but apparently doesnt execute.
 
Could you please let me know if i am missing something? 
 
 

 

0 Kudos
3 Replies

1,348 Views
nagabhushan_v
Contributor I

After going through some documentation in AT-F I am suspecting that RVBAR register needs to be configured correctly and it might still be pointing to 0x8000_0000. This register holds the address the from where the core starts executing after reset. How is this register configured on i.MX8QM? 

Sinppet from

Application Note Bare-metal Boot Code for ARMv8-A Processors

nagabhushan_v_0-1624084521649.jpeg

 

Snippet from Cortex®-A53 Technical Reference Manual

nagabhushan_v_2-1624084634764.jpeg

 

 

 

0 Kudos

1,335 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

You can find the values of load address, fdt address, etc. in board's configuration header file from path "<YOCTO_BUILD>/tmp/work/machine name-poky-linux-gnueabi/u-boot-imx/version/git/include/configs/*.h". 

You can get this information from Table **. Board-specific default values in i.MX Linux User guide

0 Kudos

1,329 Views
nagabhushan_v
Contributor I

Hi,

As described in my original post, I want to run TF-A bl31.bin from an address different from the default 0x8000_0000. I wanted to know what changes i would need to make to do that.

Also, wanted to understand how RVBAR on register is controlled/can be modified in i.MX8QM ( A53 core)?

0 Kudos