Skip to contentSkip to conversation

arm64: Add SMC and HVC commands

PATCH Superseded Michalis Pappas 2 participants 4 messages Apr 9, 2018 – Apr 12, 2018

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 arm64: Add SMC and HVC commands

This patch adds smc and hvc commands, that allow issuing Secure Monitor Calls and Hypervisor Calls conforming to the ARM SMC Calling Convention.

Add Kconfig items to allow each command can be individually enabled.

---

 cmd/Kconfig  | 14 ++++++++++
 cmd/Makefile |  2 ++
 cmd/smccc.c  | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 88 insertions(+)
 create mode 100644 cmd/smccc.c
cmd/Kconfig +14 -0
index 136836d146..2176b98ccb 100644
@@ -1348,6 +1348,20 @@ config CMD_HASH
 	  saved to memory or to an environment variable. It is also possible
 	  to verify a hash against data in memory.
 
+config CMD_HVC
+	bool "Support the 'hvc' command"
+	depends on ARM_SMCCC
+	help
+	  Allows issuing Hypervisor Calls (HVCs). Mostly useful for
+	  development and testing.
+
+config CMD_SMC
+	bool "Support the 'smc' command"
+	depends on ARM_SMCCC
+	help
+	  Allows issuing Secure Monitor Calls (SMCs). Mostly useful for
+	  development and testing.
+
 config HASH_VERIFY
 	bool "hash -v"
 	depends on CMD_HASH
cmd/Makefile +2 -0
index 9a358e4801..5656a1a40a 100644
@@ -61,6 +61,7 @@ obj-$(CONFIG_CMD_FS_GENERIC) += fs.o
 obj-$(CONFIG_CMD_FUSE) += fuse.o
 obj-$(CONFIG_CMD_GETTIME) += gettime.o
 obj-$(CONFIG_CMD_GPIO) += gpio.o
+obj-$(CONFIG_CMD_HVC) += smccc.o
 obj-$(CONFIG_CMD_I2C) += i2c.o
 obj-$(CONFIG_CMD_IOTRACE) += iotrace.o
 obj-$(CONFIG_CMD_HASH) += hash.o
@@ -113,6 +114,7 @@ obj-$(CONFIG_CMD_SHA1SUM) += sha1sum.o
 obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
 obj-$(CONFIG_CMD_SPI) += spi.o
 obj-$(CONFIG_CMD_STRINGS) += strings.o
+obj-$(CONFIG_CMD_SMC) += smccc.o
 obj-$(CONFIG_CMD_TERMINAL) += terminal.o
 obj-$(CONFIG_CMD_TIME) += time.o
 obj-$(CONFIG_CMD_TRACE) += trace.o
cmd/smccc.c new file +72 -0

72 lines not on this page · raw message

--
2.17.0

#1 lore raw

PATCH v3 1/1 arm64: Add SMC and HVC commands

Quoted 5 lines · Michalis Pappas

This patch adds smc and hvc commands, that allow issuing Secure Monitor Calls and Hypervisor Calls conforming to the ARM SMC Calling Convention.

Add Kconfig items to allow each command can be individually enabled.

Quoted 9 lines

---

 cmd/Kconfig  | 14 ++++++++++
 cmd/Makefile |  2 ++
 cmd/smccc.c  | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 88 insertions(+)
 create mode 100644 cmd/smccc.c

But you need a change list

#2 lore raw

PATCH v3 1/1 arm64: Add SMC and HVC commands

Okay, i see. The change is the replacement of the dependency of ARM64 to ARM_SMCCC in Kconfig.

If you think it's necessary to issue a v4 and document the changes properly please let me know and I'll do so.

Michalis

Quoted 18 lines · Simon Glass
Quoted 5 lines · Michalis Pappas

This patch adds smc and hvc commands, that allow issuing Secure Monitor Calls and Hypervisor Calls conforming to the ARM SMC Calling Convention.

Add Kconfig items to allow each command can be individually enabled.

Quoted 9 lines

---

  cmd/Kconfig  | 14 ++++++++++
  cmd/Makefile |  2 ++
  cmd/smccc.c  | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 88 insertions(+)

create mode 100644 cmd/smccc.c

But you need a change list

#3 lore raw

PATCH v3 1/1 arm64: Add SMC and HVC commands

Hi,

Quoted 5 lines · Michalis Pappas

Okay, i see. The change is the replacement of the dependency of ARM64 to ARM_SMCCC in Kconfig.

If you think it's necessary to issue a v4 and document the changes properly please let me know and I'll do so.

Yes please.

Quoted 27 lines

Michalis

Quoted 20 lines · Simon Glass
Quoted 6 lines · Michalis Pappas

This patch adds smc and hvc commands, that allow issuing Secure Monitor Calls and Hypervisor Calls conforming to the ARM SMC Calling Convention.

Add Kconfig items to allow each command can be individually enabled.

Quoted 9 lines

---

  cmd/Kconfig  | 14 ++++++++++
  cmd/Makefile |  2 ++
  cmd/smccc.c  | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 88 insertions(+)

create mode 100644 cmd/smccc.c

But you need a change list

Regards,
Simon