summaryrefslogtreecommitdiff
path: root/fwu
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-07-13 17:55:08 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-09-26 14:44:55 +0100
commit3dba8936dbf4745bc08475096bdb93be82a8e61d (patch)
tree035d31af77bc912ef769dd94b3beaef6cc40ea21 /fwu
parent93d4f89187e2bf24b1bf64736a7c0084683aebff (diff)
AArch32: Rework SMC helpers
This patch introduces SMC framework for AArch32. The existing SMC helper functions have been made architecture-agnostic. The `smc64_args` structure is renamed to just `smc_args`. Similarly the `smc64_ret_values` is renamed to `smc_ret_values`. All the users of the SMC helpers are also modified in this patch. This patch also removes the `noinline` directive from the function prototype of `asm_tftf_smc64()`. This is because this assembly function is a separate compilation unit and the compiler cannot inline it anyway hence making the `noinline` directive redundant. Change-Id: I6fc34fc95dc7c0ac030113e43f681dff8d2d7ccf
Diffstat (limited to 'fwu')
-rw-r--r--fwu/ns_bl1u/ns_bl1u.mk4
-rw-r--r--fwu/ns_bl1u/ns_bl1u_main.c6
-rw-r--r--fwu/ns_bl2u/ns_bl2u.mk4
-rw-r--r--fwu/ns_bl2u/ns_bl2u_main.c8
4 files changed, 11 insertions, 11 deletions
diff --git a/fwu/ns_bl1u/ns_bl1u.mk b/fwu/ns_bl1u/ns_bl1u.mk
index d546e8c..a717f61 100644
--- a/fwu/ns_bl1u/ns_bl1u.mk
+++ b/fwu/ns_bl1u/ns_bl1u.mk
@@ -38,8 +38,8 @@ NS_BL1U_SOURCES := drivers/io/io_fip.c \
lib/aarch64/cache_helpers.S \
lib/aarch64/misc_helpers.S \
lib/locks/aarch64/spinlock.S \
- lib/smc/asm_smc.S \
- lib/smc/smc.c \
+ lib/smc/aarch64/asm_smc.S \
+ lib/smc/aarch64/smc.c \
${STD_LIB_SOURCES} \
lib/utils/mp_printf.c \
lib/utils/uuid.c \
diff --git a/fwu/ns_bl1u/ns_bl1u_main.c b/fwu/ns_bl1u/ns_bl1u_main.c
index 47f218c..35c2a7f 100644
--- a/fwu/ns_bl1u/ns_bl1u_main.c
+++ b/fwu/ns_bl1u/ns_bl1u_main.c
@@ -118,9 +118,9 @@ void ns_bl1u_fwu_smc_call(unsigned int smc_id,
unsigned long x3,
unsigned long x4)
{
- smc64_ret_values fwu_result = {0};
- smc64_args fwu_params = {smc_id, x1, x2, x3, x4};
- fwu_result = tftf_smc64(&fwu_params);
+ smc_ret_values fwu_result = {0};
+ smc_args fwu_params = {smc_id, x1, x2, x3, x4};
+ fwu_result = tftf_smc(&fwu_params);
smc_result = fwu_result.ret0;
}
diff --git a/fwu/ns_bl2u/ns_bl2u.mk b/fwu/ns_bl2u/ns_bl2u.mk
index a83b617..09aceb9 100644
--- a/fwu/ns_bl2u/ns_bl2u.mk
+++ b/fwu/ns_bl2u/ns_bl2u.mk
@@ -36,8 +36,8 @@ NS_BL2U_SOURCES := framework/aarch64/arch.c \
lib/aarch64/cache_helpers.S \
lib/aarch64/misc_helpers.S \
lib/locks/aarch64/spinlock.S \
- lib/smc/asm_smc.S \
- lib/smc/smc.c \
+ lib/smc/aarch64/asm_smc.S \
+ lib/smc/aarch64/smc.c \
${STD_LIB_SOURCES} \
lib/utils/mp_printf.c \
lib/utils/uuid.c \
diff --git a/fwu/ns_bl2u/ns_bl2u_main.c b/fwu/ns_bl2u/ns_bl2u_main.c
index e08e108..3513dd7 100644
--- a/fwu/ns_bl2u/ns_bl2u_main.c
+++ b/fwu/ns_bl2u/ns_bl2u_main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -39,8 +39,8 @@ extern const char version_string[];
void ns_bl2u_main(void)
{
- smc64_args fwu_params = {0};
- smc64_ret_values fwu_result = {0};
+ smc_args fwu_params = {0};
+ smc_ret_values fwu_result = {0};
NOTICE("NS_BL2U: %s\n", version_string);
NOTICE("NS_BL2U: %s\n", build_message);
@@ -76,7 +76,7 @@ void ns_bl2u_main(void)
/* Call FWU_SMC_UPDATE_DONE to indicate image update done. */
INFO("NS_BL2U: Calling FWU_SMC_UPDATE_DONE\n");
fwu_params.arg0 = FWU_SMC_UPDATE_DONE;
- fwu_result = tftf_smc64(&fwu_params);
+ fwu_result = tftf_smc(&fwu_params);
ERROR("NS_BL2U: Unexpected return from FWU process (%d)\n",
(int)fwu_result.ret0);
panic();