* [PATCH 0/1] arm: Add generic smc wrapper @ 2015-10-09 15:33 ` Lars Persson 0 siblings, 0 replies; 4+ messages in thread From: Lars Persson @ 2015-10-09 15:33 UTC (permalink / raw) To: linux-arm-kernel This is intended for new machines that call secure monitors compliant with ARM DEN 0028A. Changes since RFC: * Build only for V6 and V7 CPUs. Lars Persson (1): arm: Add generic smc wrapper arch/arm/include/asm/smc-call.h | 12 ++++++++++++ arch/arm/kernel/Makefile | 3 +++ arch/arm/kernel/smc-call.S | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 arch/arm/include/asm/smc-call.h create mode 100644 arch/arm/kernel/smc-call.S -- 2.1.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/1] arm: Add generic smc wrapper @ 2015-10-09 15:33 ` Lars Persson 0 siblings, 0 replies; 4+ messages in thread From: Lars Persson @ 2015-10-09 15:33 UTC (permalink / raw) To: linux-arm-kernel, linux-kernel, linux; +Cc: Lars Persson This is intended for new machines that call secure monitors compliant with ARM DEN 0028A. Changes since RFC: * Build only for V6 and V7 CPUs. Lars Persson (1): arm: Add generic smc wrapper arch/arm/include/asm/smc-call.h | 12 ++++++++++++ arch/arm/kernel/Makefile | 3 +++ arch/arm/kernel/smc-call.S | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 arch/arm/include/asm/smc-call.h create mode 100644 arch/arm/kernel/smc-call.S -- 2.1.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] arm: Add generic smc wrapper 2015-10-09 15:33 ` Lars Persson @ 2015-10-09 15:33 ` Lars Persson -1 siblings, 0 replies; 4+ messages in thread From: Lars Persson @ 2015-10-09 15:33 UTC (permalink / raw) To: linux-arm-kernel This adds an smc wrapper according to the ARM standard for secure monitor calling conventions (ARM DEN 0028A). Signed-off-by: Lars Persson <larper@axis.com> --- arch/arm/include/asm/smc-call.h | 12 ++++++++++++ arch/arm/kernel/Makefile | 3 +++ arch/arm/kernel/smc-call.S | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 arch/arm/include/asm/smc-call.h create mode 100644 arch/arm/kernel/smc-call.S diff --git a/arch/arm/include/asm/smc-call.h b/arch/arm/include/asm/smc-call.h new file mode 100644 index 0000000..88a83d4 --- /dev/null +++ b/arch/arm/include/asm/smc-call.h @@ -0,0 +1,12 @@ +/* + * Wrapper for secure monitor calls using the ARM SMC calling + * convention. + */ +#ifndef __ASM_SMC_CALL_H +#define __ASM_SMC_CALL_H + +#include <linux/types.h> + +extern int invoke_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2); + +#endif diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index af9e59b..73c95e0 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -92,4 +92,7 @@ obj-y += psci-call.o obj-$(CONFIG_SMP) += psci_smp.o endif +obj-$(CONFIG_CPU_V6) += smc-call.o +obj-$(CONFIG_CPU_V7) += smc-call.o + extra-y := $(head-y) vmlinux.lds diff --git a/arch/arm/kernel/smc-call.S b/arch/arm/kernel/smc-call.S new file mode 100644 index 0000000..a07ebf9 --- /dev/null +++ b/arch/arm/kernel/smc-call.S @@ -0,0 +1,22 @@ +/* + * 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. + * + * Copied from: psci-call.S. + */ + +#include <linux/linkage.h> + +#include <asm/opcodes-sec.h> + +/* int invoke_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */ +ENTRY(invoke_smc) + __SMC(0) + bx lr +ENDPROC(invoke_smc) -- 2.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/1] arm: Add generic smc wrapper @ 2015-10-09 15:33 ` Lars Persson 0 siblings, 0 replies; 4+ messages in thread From: Lars Persson @ 2015-10-09 15:33 UTC (permalink / raw) To: linux-arm-kernel, linux-kernel, linux; +Cc: Lars Persson This adds an smc wrapper according to the ARM standard for secure monitor calling conventions (ARM DEN 0028A). Signed-off-by: Lars Persson <larper@axis.com> --- arch/arm/include/asm/smc-call.h | 12 ++++++++++++ arch/arm/kernel/Makefile | 3 +++ arch/arm/kernel/smc-call.S | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 arch/arm/include/asm/smc-call.h create mode 100644 arch/arm/kernel/smc-call.S diff --git a/arch/arm/include/asm/smc-call.h b/arch/arm/include/asm/smc-call.h new file mode 100644 index 0000000..88a83d4 --- /dev/null +++ b/arch/arm/include/asm/smc-call.h @@ -0,0 +1,12 @@ +/* + * Wrapper for secure monitor calls using the ARM SMC calling + * convention. + */ +#ifndef __ASM_SMC_CALL_H +#define __ASM_SMC_CALL_H + +#include <linux/types.h> + +extern int invoke_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2); + +#endif diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index af9e59b..73c95e0 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -92,4 +92,7 @@ obj-y += psci-call.o obj-$(CONFIG_SMP) += psci_smp.o endif +obj-$(CONFIG_CPU_V6) += smc-call.o +obj-$(CONFIG_CPU_V7) += smc-call.o + extra-y := $(head-y) vmlinux.lds diff --git a/arch/arm/kernel/smc-call.S b/arch/arm/kernel/smc-call.S new file mode 100644 index 0000000..a07ebf9 --- /dev/null +++ b/arch/arm/kernel/smc-call.S @@ -0,0 +1,22 @@ +/* + * 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. + * + * Copied from: psci-call.S. + */ + +#include <linux/linkage.h> + +#include <asm/opcodes-sec.h> + +/* int invoke_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */ +ENTRY(invoke_smc) + __SMC(0) + bx lr +ENDPROC(invoke_smc) -- 2.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-09 15:34 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-09 15:33 [PATCH 0/1] arm: Add generic smc wrapper Lars Persson 2015-10-09 15:33 ` Lars Persson 2015-10-09 15:33 ` [PATCH 1/1] " Lars Persson 2015-10-09 15:33 ` Lars Persson
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.