public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 07/13] ARM: HYP/non-sec: allow relocation to secure RAM
Date: Wed, 12 Feb 2014 10:52:32 +0000	[thread overview]
Message-ID: <52FB5270.9020101@arm.com> (raw)
In-Reply-To: <20140212093637.76953896@lilith>

On 12/02/14 08:36, Albert ARIBAUD wrote:
> Hi Albert,
> 
> On Thu, 12 Dec 2013 11:47:31 +0100, Albert ARIBAUD
> <albert.u.boot@aribaud.net> wrote:
> 
>> Hi Marc,
>>
>> On Sat,  7 Dec 2013 11:19:12 +0000, Marc Zyngier <marc.zyngier@arm.com>
>> wrote:
>>
>>> The current non-sec switching code suffers from one major issue:
>>> it cannot run in secure RAM, as a large part of u-boot still needs
>>> to be run while we're switched to non-secure.
>>>
>>> This patch reworks the whole HYP/non-secure strategy by:
>>> - making sure the secure code is the *last* thing u-boot executes
>>>   before entering the payload
>>> - performing an exception return from secure mode directly into
>>>   the payload
>>> - allowing the code to be dynamically relocated to secure RAM
>>>   before switching to non-secure.
>>>
>>> This involves quite a bit of horrible code, specially as u-boot
>>> relocation is quite primitive.
>>>
>>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>>> ---
>>>  arch/arm/cpu/armv7/nonsec_virt.S | 161 +++++++++++++++++++--------------------
>>>  arch/arm/cpu/armv7/virt-v7.c     |  59 +++++---------
>>>  arch/arm/include/asm/armv7.h     |  10 ++-
>>>  arch/arm/include/asm/secure.h    |  26 +++++++
>>>  arch/arm/lib/bootm.c             |  21 ++---
>>>  5 files changed, 136 insertions(+), 141 deletions(-)
>>>  create mode 100644 arch/arm/include/asm/secure.h
>>
>> It seems like patch 07/13 does not apply properly on top of current ARM.
>> Can you have a look? If a rebased V3 is needed, you can remove patch 01
>> from the list (or if it is simpler to you, keep it in and I'll just
>> ignore it when applying). 
> 
> I don't think there was a V3 for this so far; correct?

Correct. I've been lazy. I'll try to repost something by the end of the
week.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2014-02-12 10:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07 11:19 [U-Boot] [PATCH v2 00/13] ARMv7: add PSCI support to u-boot Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 01/13] ARM: HYP/non-sec: fix alignment requirements for vectors Marc Zyngier
2013-12-09 10:52   ` Ian Campbell
2013-12-07 11:19 ` [U-Boot] [PATCH v2 02/13] ARM: HYP/non-sec: move switch to non-sec to the last boot phase Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 03/13] ARM: HYP/non-sec: add a barrier after setting SCR.NS==1 Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 04/13] ARM: non-sec: reset CNTVOFF to zero Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 05/13] ARM: add missing HYP mode constant Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 06/13] ARM: HYP/non-sec: add separate section for secure code Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 07/13] ARM: HYP/non-sec: allow relocation to secure RAM Marc Zyngier
2013-12-12 10:47   ` Albert ARIBAUD
2014-02-12  8:36     ` Albert ARIBAUD
2014-02-12 10:52       ` Marc Zyngier [this message]
2013-12-07 11:19 ` [U-Boot] [PATCH v2 08/13] ARM: HYP/non-sec: add generic ARMv7 PSCI code Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 09/13] ARM: HYP/non-sec: add the option for a second-stage monitor Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 10/13] ARM: HYP/non-sec/PSCI: emit DT nodes Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 11/13] sunxi: fix SRAM_B/SRAM_D memory map Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 12/13] sunxi: HYP/non-sec: add sun7i PSCI backend Marc Zyngier
2013-12-07 11:19 ` [U-Boot] [PATCH v2 13/13] sunxi: HYP/non-sec: configure CNTFRQ on all CPUs Marc Zyngier
2013-12-09 10:51 ` [U-Boot] [PATCH v2 00/13] ARMv7: add PSCI support to u-boot Ian Campbell
2013-12-09 10:57   ` Marc Zyngier
2013-12-09 11:29   ` [U-Boot] [linux-sunxi] " Hans de Goede
2013-12-09 12:20     ` Marc Zyngier
2013-12-09 12:28     ` Ian Campbell
2014-02-13 10:11 ` [U-Boot] " Albert ARIBAUD
2014-02-13 10:16   ` Marc Zyngier
2014-02-25 13:38     ` Ezaul Zillmer
2014-02-25 14:04       ` Marc Zyngier
2014-02-26 12:22         ` Ezaul Zillmer

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=52FB5270.9020101@arm.com \
    --to=marc.zyngier@arm.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