From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] commands: smc: make command usable when ARM_PSCI is undefined
Date: Fri, 15 Nov 2019 08:52:57 +0100 [thread overview]
Message-ID: <20191115075257.24079-5-ahmad@a3f.at> (raw)
In-Reply-To: <20191115075257.24079-1-ahmad@a3f.at>
The smc command can be useful whenever PSCI is used, regardless of
whether barebox provides the secure monitor or not. Have it depend
on ARM_SMCCC instead.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
commands/Kconfig | 2 +-
commands/smc.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/commands/Kconfig b/commands/Kconfig
index 08b3af8b20f2..7784966282ac 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1869,7 +1869,7 @@ config CMD_POWEROFF
config CMD_SMC
bool
- depends on ARM_PSCI
+ depends on ARM_SMCCC
prompt "PSCI test command"
default CONFIG_ARM_PSCI_DEBUG
help
diff --git a/commands/smc.c b/commands/smc.c
index 997103676eba..84102f3249bc 100644
--- a/commands/smc.c
+++ b/commands/smc.c
@@ -97,6 +97,11 @@ static int do_smc(int argc, char *argv[])
while ((opt = getopt(argc, argv, "nic")) > 0) {
switch (opt) {
case 'n':
+ if (!IS_ENABLED(CONFIG_ARM_SECURE_MONITOR)) {
+ printf("secure monitor support not compiled in\n");
+ return COMMAND_ERROR;
+ }
+
armv7_secure_monitor_install();
break;
case 'i':
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-11-15 7:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 7:52 [PATCH 1/5] ARM: psci: factor out smc command into commands/ Ahmad Fatoum
2019-11-15 7:52 ` [PATCH 2/5] ARM: psci: properly wire in command help Ahmad Fatoum
2019-11-15 7:52 ` [PATCH 3/5] commands: psci: make locally-used function static Ahmad Fatoum
2019-11-15 7:52 ` [PATCH 4/5] commands: smc: verify PSCI_POWER_ON with interprocessor handshake Ahmad Fatoum
2019-11-15 7:52 ` Ahmad Fatoum [this message]
2019-11-19 10:58 ` [PATCH 1/5] ARM: psci: factor out smc command into commands/ Sascha Hauer
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=20191115075257.24079-5-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@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