[U-Boot] booting optee via SPL on imx6q

Kever Yang kever.yang at rock-chips.com
Tue Jan 15 02:30:00 UTC 2019


Hi Shyam,


On 01/04/2019 07:46 PM, Shyam Saini wrote:
> Hi Kever,
>
> I've been trying to boot optee via SPL on my imx6 board.
>
> I see you added booting optee via SPL support in this commit.
> http://git.denx.de/?p=u-boot.git;a=commit;h=70fe2876352939194ccd9091379453a5ddb64ddb
>
> I used fit image to do this. Here is my fit *.its file content
> https://paste.ubuntu.com/p/5FYkGqswX9/
>
> When I power on my imx6 board it hangs on spl_optee_entry function with
> this message "Jumping to U-Boot via OP-TEE"

This means the FIT image decode normally and will get into next entry.
>
> Here are the complete logs:
>
> # logs without reserved TZ RAM
> https://paste.ubuntu.com/p/wGxXSvPSkS/
>
> # logs with reserved TZ RAM
> https://paste.ubuntu.com/p/7KgYJx8V9p/

What do you mean reserved TZ RAM, the log shows the only difference is
the u-boot binary size.
>
> I'm not sure why is it hanging. But when i put some print statements
> in optee os it doesn't print, so i guess something wrong from SPL
> side.

Yes, in most case, something wrong happen in SPL, two check points here:
1. does the optee image has really copy to target load address completely?
    I met this issue on some socs, the emmc data not able to copy to
target space
    directly for security limitation, but there is no any warning/error
in mmc driver.
    You can print the memory value at 0x2c200000 before get into it to
check if
    the memory is as expect or not.

    Does the space from 0x2c200000 need any security relate
configuration on imx6q?
    Maybe the U-Boot has configure it but the SPL does not.

2. does the SPL run into op-tee entry point?
    you can add print for next 'r3' to check this.

Everything else looks good.
>
> One more question, what is the significance of "mov pc, r3", here
> http://git.denx.de/?p=u-boot.git;a=blob;f=common/spl/spl_optee.S;h=86fc3985465b4e4f6cf300923b0f8d6564e8be64;hb=70fe2876352939194ccd9091379453a5ddb64ddb

430                 spl_optee_entry(NULL, NULL, (void
*)spl_image.fdt_addr,        
431                                 (void *)spl_image.entry_point);
The r3 is the spl_image.entry_point, you can print it and check it's the
optee entry '0x2C200000'.

Thanks,
- Kever
>
> I compiled optee os with CFG_NS_ENTRY_ADDR=0x17800000  i.e, u-boot
> load address in my case.
>
> Do you know what am i missing?
>
> I'd really appreciate any help from you.
>
>
> Thanks a lot,
> Shyam
>





More information about the U-Boot mailing list