diff options
author | Dave Martin <dave.martin@linaro.org> | 2012-02-09 17:47:17 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2012-09-19 09:32:50 +0200 |
commit | 80c59dafb1a9a86fa996e6e34d06b60567c925ca (patch) | |
tree | 1f9d36e82f58102722e3c3075fa9f3b73968cf33 /arch/arm/include/asm/ptrace.h | |
parent | ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding (diff) | |
download | linux-80c59dafb1a9a86fa996e6e34d06b60567c925ca.tar.xz linux-80c59dafb1a9a86fa996e6e34d06b60567c925ca.zip |
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>
Diffstat (limited to 'arch/arm/include/asm/ptrace.h')
-rw-r--r-- | arch/arm/include/asm/ptrace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 355ece523f41..91ef6c231c47 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h @@ -44,6 +44,7 @@ #define IRQ_MODE 0x00000012 #define SVC_MODE 0x00000013 #define ABT_MODE 0x00000017 +#define HYP_MODE 0x0000001a #define UND_MODE 0x0000001b #define SYSTEM_MODE 0x0000001f #define MODE32_BIT 0x00000010 |