From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] ARM: opcodes: add __ERET/__MSR_ELR_HYP instruction encoding
Date: Sat, 11 Aug 2012 12:04:31 +0100 [thread overview]
Message-ID: <1344683077-12841-2-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1344683077-12841-1-git-send-email-marc.zyngier@arm.com>
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 | 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 b85665a..efcfdf9 100644
--- a/arch/arm/include/asm/opcodes-virt.h
+++ b/arch/arm/include/asm/opcodes-virt.h
@@ -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 */
--
1.7.8.6
next prev parent reply other threads:[~2012-08-11 11:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-11 11:04 [PATCH 0/7] Allow the kernel to be booted in HYP mode Marc Zyngier
2012-08-11 11:04 ` Marc Zyngier [this message]
2012-08-11 11:04 ` [PATCH 2/7] ARM: virt: allow the kernel to be entered " Marc Zyngier
2012-08-11 11:04 ` [PATCH 3/7] ARM: zImage/virt: hyp mode entry support for the zImage loader Marc Zyngier
2012-08-11 11:04 ` [PATCH 4/7] ARM: virt: Update documentation for hyp mode entry support Marc Zyngier
2012-08-11 11:04 ` [PATCH 5/7] ARM: virt: Add boot-time diagnostics Marc Zyngier
2012-08-11 11:04 ` [PATCH 6/7] ARM: virt: Add CONFIG_ARM_VIRT_EXT option Marc Zyngier
2012-08-11 11:04 ` [PATCH 7/7] ARM: virt: arch_timers: enable access to physical timers Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344683077-12841-2-git-send-email-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).