> -----Original Message----- > From: York Sun > Sent: Tuesday, October 24, 2017 8:00 PM > To: Sumit Garg <sumit.g...@nxp.com>; u-boot@lists.denx.de > Cc: Ruchika Gupta <ruchika.gu...@nxp.com>; Prabhakar Kushwaha > <prabhakar.kushw...@nxp.com>; Z.q. Hou <zhiqiang....@nxp.com>; Pankaj > Gupta <pankaj.gu...@nxp.com>; Arun Pathak <arun.pat...@nxp.com>; Sahil > Malhotra <sahil.malho...@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. Sumit _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot