[U-Boot] [PATCH 2/2] armv8: sec_firmware: Add support for loadables in FIT

York Sun york.sun at nxp.com
Wed Oct 25 16:17:58 UTC 2017


On 10/24/2017 09:00 PM, Sumit Garg wrote:
>> -----Original Message-----
>> From: York Sun
>> Sent: Tuesday, October 24, 2017 8:00 PM
>> To: Sumit Garg <sumit.garg at nxp.com>; u-boot at lists.denx.de
>> Cc: Ruchika Gupta <ruchika.gupta at nxp.com>; Prabhakar Kushwaha
>> <prabhakar.kushwaha at nxp.com>; Z.q. Hou <zhiqiang.hou at nxp.com>; Pankaj
>> Gupta <pankaj.gupta at nxp.com>; Arun Pathak <arun.pathak at nxp.com>; Sahil
>> Malhotra <sahil.malhotra at nxp.com>
>> Subject: Re: [PATCH 2/2] armv8: sec_firmware: Add support for loadables in FIT
>>
>> On 10/23/2017 09:21 PM, Sumit Garg wrote:
>> <snip>
>>>>
>>>> Sumit,
>>>>
>>>> If I understand you correctly, you are parsing the secure firmware
>>>> FIT image to find the loadable node and store the 64-bit load address
>>>> in the scratch registers. How do you determine which scratch registers to
>> use?
>>>>
>>>> York
>>>
>>> Yes your understanding is correct. The scratch registers which I used are as
>> follows:
>>>
>>> For Chassis gen 3 platforms:
>>> 	/* Assign addresses to loadable ptrs */
>>> 	loadable_l = &gur->scratchrw[4];
>>> 	loadable_h = &gur->scratchrw[5];
>>>
>>> For Chassis gen 2 platforms:
>>> 	/* Assign addresses to loadable ptrs */
>>> 	loadable_l = &scfg->scratchrw[2];
>>> 	loadable_h = &scfg->scratchrw[3];
>>>
>>> I choose above scratch registers to avoid any conflict with usage of
>>> scratch registers in Boot-ROM, u-boot and PPA.
>>
>> I see you write to these scratch registers but never read from them.
>> What's the purpose to store the address in them?
>>
>> York
>  
> These scratch registers are used to communicate loadable address to PPA similar
> to how return address is communicated in boot-location pointer registers to PPA.
> 
> PPA uses this loadable address (Trusted OS address) to initialize Trusted OS.

OK. So these registers are actually consumed by PPA image. That makes
more sense.

York


More information about the U-Boot mailing list