]> git.openfabrics.org - ~shefty/rdma-dev.git/commit
ARM: virt: allow the kernel to be entered in HYP mode
authorDave Martin <dave.martin@linaro.org>
Thu, 9 Feb 2012 16:47:17 +0000 (08:47 -0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 19 Sep 2012 07:32:50 +0000 (08:32 +0100)
commit80c59dafb1a9a86fa996e6e34d06b60567c925ca
tree1f9d36e82f58102722e3c3075fa9f3b73968cf33
parentb9a348cb12f3925a27fcf0a38a146b40978588d0
ARM: virt: allow the kernel to be entered in HYP mode

This patch does two things:

  * Ensure that asynchronous aborts are masked at kernel entry.
    The bootloader should be masking these anyway, but this reduces
    the damage window just in case it doesn't.

  * Enter svc mode via exception return to ensure that CPU state is
    properly serialised.  This does not matter when switching from
    an ordinary privileged mode ("PL1" modes in ARMv7-AR rev C
    parlance), but it potentially does matter when switching from a
    another privileged mode such as hyp mode.

This should allow the kernel to boot safely either from svc mode or
hyp mode, even if no support for use of the ARM Virtualization
Extensions is built into the kernel.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/assembler.h
arch/arm/include/asm/ptrace.h
arch/arm/include/asm/virt.h [new file with mode: 0644]
arch/arm/kernel/Makefile
arch/arm/kernel/head.S
arch/arm/kernel/hyp-stub.S [new file with mode: 0644]