This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to run my own trusted firmware BL32 on juno r2

Hi, 

I am trying to use arm trusted firmware with my own BL32 (with 0xFF000000 entry point as specified). I want BL31 switch to my secure world that generate smc (aftersome init) to switch to normal world.
For that I use this compilation configuration:

make PLAT=juno SCP_BL2=scp-fw.bin ARM_TSP_RAM_LOCATION=dram BL32=<path_yo_my_fw>.bin BL33=bl33-uboot.bin LOG_LEVEL=40 all fip

And I get these traces :

INFO: BL2: Loading image id 4
WARNING: Failed to obtain reference to image id=4 (-2)
ERROR: BL2: Failed to load image (-2)

And with tspd with this congiguration :

make PLAT=juno SCP_BL2=scp-fw.bin ARM_TSP_RAM_LOCATION=dram BL32=<path_yo_my_fw>.bin SPD=tspd BL33=bl33-uboot.bin LOG_LEVEL=40 all fip

I get these traces:

INFO:    BL31: Initializing BL32

then it crashes when trying to execute this line :  rc = tspd_enter_sp(&tsp_ctx->c_rt_ctx);

Thank you for your help

 

Parents
  • Hi,

    To clarify your questions, would you like to provide more details?
    We cannot find clear clues from the limited given information.

    1) How do you get the ARM Trusted Firmware baseline code?
    2) What&#x27;s the changes you made based on the default code line?
    3) What&#x27;s the test result in Juno R2 without your changes?
    4) For your crash context, can you give more detailed dump info including register/memory/stack info e.g. screenshot captured by DS-5
    5) Did you test in Juno FVP or Juno hardware board?

    Actually, we can provide a generic ATF view for you to check:
    1) By default, ARM_TSP_RAM_LOCATION is TSRAM, not dram. "dram" means secure region in DRAM will be used, which should be configured by the TrustZone controller.
    tspd_enter_sp() is assumed to be called with SP_EL0 as stack. &#x27;x0&#x27; contains a pointer to the memory where the address of the C runtime context is to be saved.

    2) If you add build options "BL32", "BL33" into the build command, BL32/BL33 may not be updated. Please check those images have to be updated to match your real code changes or not.

    Thanks,
    Zhifei

Reply
  • Hi,

    To clarify your questions, would you like to provide more details?
    We cannot find clear clues from the limited given information.

    1) How do you get the ARM Trusted Firmware baseline code?
    2) What&#x27;s the changes you made based on the default code line?
    3) What&#x27;s the test result in Juno R2 without your changes?
    4) For your crash context, can you give more detailed dump info including register/memory/stack info e.g. screenshot captured by DS-5
    5) Did you test in Juno FVP or Juno hardware board?

    Actually, we can provide a generic ATF view for you to check:
    1) By default, ARM_TSP_RAM_LOCATION is TSRAM, not dram. "dram" means secure region in DRAM will be used, which should be configured by the TrustZone controller.
    tspd_enter_sp() is assumed to be called with SP_EL0 as stack. &#x27;x0&#x27; contains a pointer to the memory where the address of the C runtime context is to be saved.

    2) If you add build options "BL32", "BL33" into the build command, BL32/BL33 may not be updated. Please check those images have to be updated to match your real code changes or not.

    Thanks,
    Zhifei

Children
No data