Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9a348cb authored by Marc Zyngier's avatar Marc Zyngier
Browse files

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 508514ed
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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 */