public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/6] arm: omap5: Add TEE loading support
Date: Tue, 29 Nov 2016 16:08:13 -0500	[thread overview]
Message-ID: <20161129210813.GI2546@bill-the-cat> (raw)
In-Reply-To: <14b07c72-8ab5-3b16-929e-cb5ae8badca6@ti.com>

On Tue, Nov 29, 2016 at 02:51:11PM -0600, Andrew F. Davis wrote:
> On 11/29/2016 02:18 PM, Tom Rini wrote:
> > On Tue, Nov 29, 2016 at 01:03:37PM -0600, Andrew F. Davis wrote:
> > 
> >> From: Harinarayan Bhatta <harinarayan@ti.com>
> >>
> >> secure_tee_install is used to install and initialize a secure TEE OS such as
> >> Linaro OP-TEE into the secure world. This function takes in the address
> >> where the signed TEE image is loaded as an argument. The signed TEE image
> >> consists of a header (struct tee_header), TEE code+data followed by the
> >> signature generated using image signing tool from TI security development
> >> package (SECDEV). Refer to README.ti-secure for more information.
> >>
> >> This function uses 2 new secure APIs.
> >>
> >> 1. PPA_SERV_HAL_TEE_LOAD_MASTER - Must be called on CPU Core 0. Protected
> >>    memory for TEE must be reserved before calling this function. This API
> >>    needs arguments filled into struct ppa_tee_load_info. The TEE image is
> >>    authenticated and if there are no errors, the control passes to the TEE
> >>    entry point.
> >>
> >> 2. PPA_SERV_HAL_TEE_LOAD_SLAVE - Called on other CPU cores only after
> >>    a TEE_LOAD_MASTER call. Takes no arguments. Checks if TEE was
> >>    successfully loaded (on core 0) and transfers control to the same TEE
> >>    entry point.
> >>
> >> The code at TEE entry point is expected perform OS initialization steps
> >> and return back to non-secure world (U-Boot).
> >>
> >> Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
> >> Signed-off-by: Andrew F. Davis <afd@ti.com>
> > [snip]
> >> +/* TEE header (From OPTEE) */
> >> +struct tee_header {
> >> +	u32 magic;
> >> +	u8 version;
> >> +	u8 arch;
> >> +	u16 flags;
> >> +	u32 init_size;
> >> +	u32 loadaddr_hi;
> >> +	u32 loadaddr_lo;
> >> +	u32 init_mem_usage;
> >> +	u32 paged_size;
> >> +};
> > 
> > This, and anything else that's OPTEE specific should go in a more
> > generically visible header as others will be doing OPTEE stuff too.
> > 
> 
> Any preference on location, include/tee/optee.h?

Sure.

> > [snip]
> >> +	if ((hdr->magic != 0x4554504f) ||
> > 
> > This too probably belongs in the generic OPTEE header.
> > 
> >> +	/* The return value is ignored. If something went wrong, the function
> >> +	 * would probably not return at all
> >> +	 */
> >> +	(void)secure_rom_call(PPA_SERV_HAL_TEE_LOAD_MASTER, 0, 0, 1, &tee_info);
> > 
> > "probably".  We must save and check the return value all the same.
> > 
> 
> Will check.

OK, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/a3ebae18/attachment.sig>

  reply	other threads:[~2016-11-29 21:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 19:03 [U-Boot] [PATCH v2 0/6] Add FIT loadable custom processing Andrew F. Davis
2016-11-29 19:03 ` [U-Boot] [PATCH v2 1/6] image: Add FIT image loadable section " Andrew F. Davis
2016-11-29 19:03 ` [U-Boot] [PATCH v2 2/6] image: Add Trusted Execution Environment image type Andrew F. Davis
2016-11-29 19:03 ` [U-Boot] [PATCH v2 3/6] arm: omap5: add function to make an SMC call on cpu1 Andrew F. Davis
2016-11-29 20:16   ` Tom Rini
2016-11-29 19:03 ` [U-Boot] [PATCH v2 4/6] arm: omap5: Add TEE loading support Andrew F. Davis
2016-11-29 20:18   ` Tom Rini
2016-11-29 20:51     ` Andrew F. Davis
2016-11-29 21:08       ` Tom Rini [this message]
2016-11-29 19:03 ` [U-Boot] [PATCH v2 5/6] board: ti: dra7xx: add FIT image TEE processing Andrew F. Davis
2016-11-29 20:17   ` Tom Rini
2016-11-29 19:03 ` [U-Boot] [PATCH v2 6/6] board: ti: am57xx: " Andrew F. Davis
2016-11-29 20:18   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161129210813.GI2546@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox