Skip to content

Commit

Permalink
ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marc Zyngier committed Sep 19, 2012
1 parent 508514e commit b9a348c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/include/asm/opcodes-virt.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@
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 */

0 comments on commit b9a348c

Please sign in to comment.