]> git.baikalelectronics.ru Git - kernel.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)
commita2fac5a4c2fb2a4e5cfa78e25ca149fe04846642
tree1f9d36e82f58102722e3c3075fa9f3b73968cf33
parentfed5582fd6f9a45b4d89cb38138e1d0114feb157
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]