All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <van.freenix@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v4, 07/11] spl: add support to booting with OP-TEE
Date: Mon, 15 Jan 2018 12:48:29 +0800	[thread overview]
Message-ID: <20180115044828.GA22551@shlinux2> (raw)
In-Reply-To: <bd67014a-2c36-e00b-865c-5a84ac0e1691@rock-chips.com>

On Mon, Jan 15, 2018 at 11:25:00AM +0800, Kever Yang wrote:
>Bryan,
>
>
>On 01/12/2018 11:10 PM, Bryan O'Donoghue wrote:
>>
>>
>>On 12/01/18 11:27, Philipp Tomsich wrote:
>>>>OP-TEE is an open source trusted OS, in armv7, its loading and
>>>>running are like this:
>>>>loading:
>>>>- SPL load both OP-TEE and U-Boot
>>>>running:
>>>>- SPL run into OP-TEE in secure mode;
>>>>- OP-TEE run into U-Boot in non-secure mode;
>>>>
>>>>More detail:
>>>>https://github.com/OP-TEE/optee_os
>>>>and search for 'boot arguments' for detail entry parameter in:
>>>>core/arch/arm/kernel/generic_entry_a32.S
>>>>
>>>>Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>>>---
>>>>
>>>>Changes in v4:
>>>>- use NULL instead of '0'
>>>>- add fdt_addr as arg2 of entry
>>>>
>>>>Changes in v3: None
>>>>Changes in v2:
>>>>- Using new image type for op-tee
>>>>
>>>>  common/spl/Kconfig     |  7 +++++++
>>>>  common/spl/Makefile    |  1 +
>>>>  common/spl/spl.c       |  9 +++++++++
>>>>  common/spl/spl_optee.S | 13 +++++++++++++
>>>>  include/spl.h          | 13 +++++++++++++
>>>>  5 files changed, 43 insertions(+)
>>>>  create mode 100644 common/spl/spl_optee.S
>>>>
>>>
>>>Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>>>_______________________________________________
>>>U-Boot mailing list
>>>U-Boot at lists.denx.de
>>>https://lists.denx.de/listinfo/u-boot
>>>
>>
>>Kever, Philipp
>>
>>I have patches that define a IH_TYPE_OPTEE as a bootable OPTEE
>>image (one that never returns to u-boot).
>
>I don't understand how you use OP-TEE in your project.
>You are using U-Boot 'bootm' cmd to run into OP-TEE and 'PC' never
>get out of the OP-TEE os?
>The upstream OP-TEE will always be back to the pointer in 'lr'.
>
>We are using boot flow like ARMv8 for OP-TEE in armv7, could you
>introduce your flow?

The flow is ROM->U-Boot->OP-TEE->Linux.

Regards,
Peng.

>bootrom(BL1, secure word)->SPL(BL2, secure word)->OP-TEE(BL31/32,
>secure word)
>->U-Boot(BL33, non-secure word)->Linux kernel(non secure word).
>By the OP-TEE design we need jump to U-Boot with using 'lr' as
>pointer to next stage, that's why I add
>new type for SPL image:
>https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/generic_entry_a32.S#L186
>
>Thanks,
>- Kever
>>
>>The image type allows bootm to identify the type of binary it is
>>booting and perform image-specific checks.
>>
>>On this patch though, do you guys really need a new image type for
>>SPL ? Couldn't you use IH_TYPE_TEE in the same way ?
>>
>>+#if CONFIG_IS_ENABLED(OPTEE)
>>+    case IH_TYPE_TEE:
>>+        debug("Jumping to U-Boot via OP-TEE\n");
>>+        spl_optee_entry(NULL, NULL, spl_image->fdt_addr,
>>+                (void *)spl_image.entry_point);
>>+        break;
>>+#endif
>>
>>i.e. it appears to me as if you don't actually do anything
>>image-specific with IH_OS_OP_TEE that couldn't be done with the
>>existing IH_TYPE_TEE... as above you use spl_image->fdt_addr and
>>spl_image.entry_point - as opposed to any header specific data from
>>the binary you are booting..
>>
>>_______________________________________________
>>U-Boot mailing list
>>U-Boot at lists.denx.de
>>https://lists.denx.de/listinfo/u-boot
>
>
>_______________________________________________
>U-Boot mailing list
>U-Boot at lists.denx.de
>https://lists.denx.de/listinfo/u-boot

-- 

  reply	other threads:[~2018-01-15  4:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04  7:06 [U-Boot] [PATCH v4 00/11] rockchip: add tpl and OPTEE support for rk3229 Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 01/11] lib: add TPL_OF_LIBFDT option for TPL Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 02/11] arm: add option for TPL ARCH_MEM in arm 32bit Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 03/11] arm: add a separate stack for TPL Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 04/11] rockchip: rk322x: enable tpl support Kever Yang
2018-01-12 11:27   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2018-01-25  9:46   ` Philipp Tomsich
2018-01-04  7:07 ` [U-Boot] [PATCH v4 05/11] sysreset: enable driver support in SPL/TPL Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 06/11] image: add os type for OP-TEE Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 07/11] spl: add support to booting with OP-TEE Kever Yang
2018-01-12 11:27   ` [U-Boot] [U-Boot, v4, " Philipp Tomsich
2018-01-12 15:10     ` Bryan O'Donoghue
2018-01-15  3:25       ` Kever Yang
2018-01-15  4:48         ` Peng Fan [this message]
2018-01-17 17:48           ` Bryan O'Donoghue
2018-01-18  1:31             ` Kever Yang
2018-01-18 11:21               ` Bryan O'Donoghue
2018-01-25 10:09                 ` Bryan O'Donoghue
2018-02-02 15:02                   ` Dr. Philipp Tomsich
2018-02-02 15:37                     ` Bryan O'Donoghue
2018-02-02 15:56                       ` Dr. Philipp Tomsich
2018-02-19 15:44                         ` Tom Rini
2018-02-21  3:27                           ` Bryan O'Donoghue
2018-02-21 13:16                             ` Dr. Philipp Tomsich
2018-02-21 14:30                             ` Andrew F. Davis
2018-01-25  9:46   ` Philipp Tomsich
2018-01-04  7:07 ` [U-Boot] [PATCH v4 08/11] rockchip: rk322x: dts: enable uart2 for SPL/TPL Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 09/11] rockchip: add fit source file for pack itb with op-tee Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 10/11] rockchip: evb-rk3229: add README file for OP-TEE support Kever Yang
2018-01-04  7:07 ` [U-Boot] [PATCH v4 11/11] rockchip: evb-rk322x: update defconfig with tpl and optee support Kever Yang

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=20180115044828.GA22551@shlinux2 \
    --to=van.freenix@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.