ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 9 Aug 2012 09:43:29 +0000 (10:43 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 19 Sep 2012 07:32:49 +0000 (08:32 +0100)
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>
arch/arm/include/asm/opcodes-virt.h

index b85665a..efcfdf9 100644 (file)
        0xF7E08000 | (((imm16) & 0xF000) << 4) | ((imm16) & 0x0FFF)     \
 )
 
+#define __ERET __inst_arm_thumb32(                                     \
+       0xE160006E,                                                     \
+       0xF3DE8F00                                                      \
+)
+
+#define __MSR_ELR_HYP(regnum)  __inst_arm_thumb32(                     \
+       0xE12EF300 | regnum,                                            \
+       0xF3808E30 | (regnum << 16)                                     \
+)
+
 #endif /* ! __ASM_ARM_OPCODES_VIRT_H */