Support for extended register usage in SMCCC v1.2 spec
The new version of SMC Calling Convention spec makes X0-X7/W0-W7/R0-R7
registers available for returning results and X1-X7/W1-W7/R1-R7 for
passing arguments during SMC calls.
This patch makes necessary changes to support the update in register
usage and also enhances existing test case to check for expected
behavior across SMC call.
Link to the SMCCC spec:
https://developer.arm.com/docs/den0028/c
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Change-Id: I9e5a3e4f9de388cb9a7426b0eae1c0fa1229292a
diff --git a/include/lib/tftf_lib.h b/include/lib/tftf_lib.h
index 3f60fec..9812252 100644
--- a/include/lib/tftf_lib.h
+++ b/include/lib/tftf_lib.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -123,9 +123,9 @@
void waitus(uint64_t us);
/*
- * SMC calls take a function identifier and up to 6 arguments.
- * Additionally, for SMC calls that originate from EL2, an optional seventh
- * argument can be added. Given that TFTF runs in EL2, we need to be able to
+ * SMC calls take a function identifier and up to 7 arguments.
+ * Additionally, few SMC calls that originate from EL2 leverage the seventh
+ * argument explicitly. Given that TFTF runs in EL2, we need to be able to
* specify it.
*/
typedef struct {
@@ -141,12 +141,16 @@
u_register_t arg7;
} smc_args;
-/* SMC calls can return up to 4 register values */
+/* SMC calls can return up to 8 register values */
typedef struct {
u_register_t ret0;
u_register_t ret1;
u_register_t ret2;
u_register_t ret3;
+ u_register_t ret4;
+ u_register_t ret5;
+ u_register_t ret6;
+ u_register_t ret7;
} smc_ret_values;
/*