All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/6] ARM: opcodes: add opcodes definitions for ARM security extensions
Date: Mon, 17 Dec 2012 16:35:37 +0000	[thread overview]
Message-ID: <1355762141-29616-3-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1355762141-29616-1-git-send-email-will.deacon@arm.com>

The ARM security extensions introduced the smc instruction, which is not
supported by all versions of GAS.

This patch introduces opcodes-sec.h, so that smc is made available in a
similar manner to hvc.

Acked-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm/include/asm/opcodes-sec.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 arch/arm/include/asm/opcodes-sec.h

diff --git a/arch/arm/include/asm/opcodes-sec.h b/arch/arm/include/asm/opcodes-sec.h
new file mode 100644
index 0000000..bc3a917
--- /dev/null
+++ b/arch/arm/include/asm/opcodes-sec.h
@@ -0,0 +1,24 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Copyright (C) 2012 ARM Limited
+ */
+
+#ifndef __ASM_ARM_OPCODES_SEC_H
+#define __ASM_ARM_OPCODES_SEC_H
+
+#include <asm/opcodes.h>
+
+#define __SMC(imm4) __inst_arm_thumb32(					\
+	0xE1600070 | (((imm4) & 0xF) << 0),				\
+	0xF7F08000 | (((imm4) & 0xF) << 16)				\
+)
+
+#endif /* __ASM_ARM_OPCODES_SEC_H */
-- 
1.8.0

  parent reply	other threads:[~2012-12-17 16:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 16:35 [PATCH v2 0/6] Add support for a fake, para-virtualised machine Will Deacon
2012-12-17 16:35 ` [PATCH v2 1/6] ARM: opcodes: add missing include of linux/linkage.h Will Deacon
2012-12-17 16:35 ` Will Deacon [this message]
2012-12-17 16:35 ` [PATCH v2 3/6] ARM: psci: add devicetree binding for describing PSCI firmware Will Deacon
2012-12-17 20:00   ` Arnd Bergmann
2012-12-18 10:08     ` Will Deacon
2012-12-17 16:35 ` [PATCH v2 4/6] ARM: psci: add support for PSCI invocations from the kernel Will Deacon
2012-12-17 20:51   ` Nicolas Pitre
2012-12-18 10:11     ` Will Deacon
2012-12-18 21:59       ` Nicolas Pitre
2012-12-19 11:27         ` Will Deacon
2012-12-17 16:35 ` [PATCH v2 5/6] ARM: Dummy Virtual Machine platform support Will Deacon
2012-12-18 12:04   ` [Xen-devel] " Stefano Stabellini
2012-12-18 13:14     ` Will Deacon
2012-12-18 13:32       ` Stefano Stabellini
2012-12-18 18:01       ` Christopher Covington
2012-12-18 18:18         ` Marc Zyngier
2012-12-19 15:25           ` Christopher Covington
2012-12-20 13:12             ` Stefano Stabellini
2012-12-20 13:25               ` Marc Zyngier
2012-12-17 16:35 ` [PATCH v2 6/6] ARM: mach-virt: add SMP support using PSCI Will Deacon
2012-12-17 21:45   ` Nicolas Pitre
2012-12-18 10:49     ` Will Deacon
2012-12-18 12:19   ` [Xen-devel] " Stefano Stabellini
2012-12-18 13:12     ` 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=1355762141-29616-3-git-send-email-will.deacon@arm.com \
    --to=will.deacon@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.