public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH 0/6] ARMv7: Add HYP mode switching support
@ 2013-04-26 13:14 Andre Przywara
  2013-04-26 13:14 ` [U-Boot] [RFC PATCH 1/6] ARM: add secure monitor handler to switch to non-secure state Andre Przywara
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Andre Przywara @ 2013-04-26 13:14 UTC (permalink / raw)
  To: u-boot

ARM CPUs with the virtualization extension have a new mode called
HYP mode, which allows hypervisors to safely control and monitor
guests. The current hypervisor (KVM and Xen) implementations
require the kernel to be entered in that HYP mode.

This patch series introduces a new U-Boot command called "hypmode"
which can be used at any time at the U-Boot command prompt to
switch the CPU into HYP mode - ideally this would be done before
starting the kernel. Since U-Boot does not use the MMU, it runs fine
in HYP mode, so you could as well enter HYP mode earlier.

The process of switching into HYP mode requires the CPU to be in
non-secure state, which requires the GIC to be programmed properly
first. Explanations about the details are in the commit messages
of the respective patches.

The code aims to be as generic as possible, though currently it has
only been tested on the Versatile Express TC-2 board. The last patch
thus enables the feature for that board and relies on the Versatile
Express updates patches sent out lately[1]. 

I would like to get some feedback on the patches, especially about:
1) Is the code in the right places? I used arch/arm/lib/ and
arch/arm/cpu/armv7/ as directories for the ARM code and
common/ for the actual command.
2) Is a command to switch to HYP actually the right thing? Should
HYP be entered automatically instead? Or provide an option to skip
HYP mode if requested by the user?
3) Does it make sense to provide a "nonsec" command also? I cannot
name any usecases by now, but the implementation would be rather
easy with basically all the functionality already there.

In general I appreciate any comments about coding style, patch
layout or the actual implementation.

Thanks for watching!

Andre.

[1] http://lists.denx.de/pipermail/u-boot/2013-April/151366.html

Andre Przywara (6):
  ARM: add secure monitor handler to switch to non-secure state
  ARM: add assembly routine to switch to non-secure state
  ARM: add U-Boot command "hypmode" to switch to non-secure state
  ARM: add SMP support for non-secure switch
  ARM: extend non-secure switch to also go into HYP mode
  ARM: VExpress: enable ARMv7 virt support for VExpress A15

 arch/arm/cpu/armv7/start.S          | 116 ++++++++++++++++++++++++++++---
 arch/arm/include/asm/armv7.h        |   2 +
 arch/arm/lib/Makefile               |   2 +
 arch/arm/lib/virt-v7.c              | 132 ++++++++++++++++++++++++++++++++++++
 common/Makefile                     |   1 +
 common/cmd_virt.c                   |  65 ++++++++++++++++++
 include/configs/vexpress_ca15_tc2.h |   3 +
 7 files changed, 311 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/lib/virt-v7.c
 create mode 100644 common/cmd_virt.c

-- 
1.7.12.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-05-10 22:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 13:14 [U-Boot] [RFC PATCH 0/6] ARMv7: Add HYP mode switching support Andre Przywara
2013-04-26 13:14 ` [U-Boot] [RFC PATCH 1/6] ARM: add secure monitor handler to switch to non-secure state Andre Przywara
2013-04-26 22:11   ` Christoffer Dall
2013-04-26 13:14 ` [U-Boot] [RFC PATCH 2/6] ARM: add assembly routine " Andre Przywara
2013-04-26 13:14 ` [U-Boot] [RFC PATCH 3/6] ARM: add U-Boot command "hypmode" " Andre Przywara
2013-04-26 13:14 ` [U-Boot] [RFC PATCH 4/6] ARM: add SMP support for non-secure switch Andre Przywara
2013-04-26 22:13   ` Christoffer Dall
2013-05-06 13:19     ` Andre Przywara
2013-05-10 22:41       ` Christoffer Dall
2013-04-26 13:14 ` [U-Boot] [RFC PATCH 5/6] ARM: extend non-secure switch to also go into HYP mode Andre Przywara
2013-04-26 13:14 ` [U-Boot] [RFC PATCH 6/6] ARM: VExpress: enable ARMv7 virt support for VExpress A15 Andre Przywara
2013-04-26 13:18 ` [U-Boot] [RFC PATCH 0/6] ARMv7: Add HYP mode switching support Peter Maydell
2013-04-26 13:24   ` Andre Przywara
2013-04-26 13:42     ` Peter Maydell
2013-04-26 14:14       ` Andre Przywara
2013-04-26 18:29         ` Christoffer Dall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox