diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-08-09 05:43:29 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2012-09-19 03:32:49 -0400 |
commit | b9a348cb12f3925a27fcf0a38a146b40978588d0 (patch) | |
tree | 1ae816b746be4d80b199660f7a26289857a09a82 /arch/arm | |
parent | 508514ed25315dd28340000831b17535d6f772da (diff) |
ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding
Enabling boot from HYP mode requires the use of some more
virt-specific instructions ("eret" and "msr elr_hyp, reg").
Add the necessary encoding to asm/opcode-virt.h.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/opcodes-virt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/opcodes-virt.h b/arch/arm/include/asm/opcodes-virt.h index b85665a96f8e..efcfdf92d9d5 100644 --- a/arch/arm/include/asm/opcodes-virt.h +++ b/arch/arm/include/asm/opcodes-virt.h | |||
@@ -26,4 +26,14 @@ | |||
26 | 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ | 26 | 0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF) \ |
27 | ) | 27 | ) |
28 | 28 | ||
29 | #define __ERET __inst_arm_thumb32( \ | ||
30 | 0xE160006E, \ | ||
31 | 0xF3DE8F00 \ | ||
32 | ) | ||
33 | |||
34 | #define __MSR_ELR_HYP(regnum) __inst_arm_thumb32( \ | ||
35 | 0xE12EF300 | regnum, \ | ||
36 | 0xF3808E30 | (regnum << 16) \ | ||
37 | ) | ||
38 | |||
29 | #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ | 39 | #endif /* ! __ASM_ARM_OPCODES_VIRT_H */ |