summaryrefslogtreecommitdiff
path: root/include/arch
diff options
context:
space:
mode:
authorRaghu Krishnamurthy <raghu.ncstate@gmail.com>2022-12-25 13:02:00 -0800
committerRaghu Krishnamurthy <raghu.ncstate@gmail.com>2023-02-13 08:47:41 -0800
commiteaaf517cd1bd8c9d5e3e6d2d202a69a0cbcb45bf (patch)
tree19c72d76d940c459c3482b29b6f6a485d3aabeaa /include/arch
parentec1c00a79c92c65bd568a2251ce614eae7eb7c77 (diff)
downloadarm-trusted-firmware-eaaf517cd1bd8c9d5e3e6d2d202a69a0cbcb45bf.tar.gz
feat(spmd): introduce FFA_PARTITION_INFO_GET_REGS
Add code in SPMD to forward calls to FFA_PARTITION_INFO_GET_REGS. This is a new ABI that allows getting partition information without the need for rx/tx buffer, that helps in situations where having an rx/tx buffer mapped and available is difficult (ex. uefi runtime services). Currently, the spmc at el3 does not support this new ABI. The new ABI uses registers x8-x17 to return partition information so changes are made to ensure those registers are passed through to the SPMC and restored on the return path. Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com> Change-Id: I1fe5956763e054e4f8d62292fc1247e7120bb5a4
Diffstat (limited to 'include/arch')
-rw-r--r--include/arch/aarch64/smccc_helpers.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/arch/aarch64/smccc_helpers.h b/include/arch/aarch64/smccc_helpers.h
index 920f2943e..950a811d6 100644
--- a/include/arch/aarch64/smccc_helpers.h
+++ b/include/arch/aarch64/smccc_helpers.h
@@ -75,6 +75,24 @@
#define SMC_SET_GP(_h, _g, _v) \
write_ctx_reg((get_gpregs_ctx(_h)), (_g), (_v))
+
+/* Useful for SMCCCv1.2 */
+#define SMC_RET18(_h, _x0, _x1, _x2, _x3, _x4, _x5, _x6, _x7, _x8, _x9, \
+ _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) { \
+ SMC_SET_GP(_h, CTX_GPREG_X8, _x8); \
+ SMC_SET_GP(_h, CTX_GPREG_X9, _x9); \
+ SMC_SET_GP(_h, CTX_GPREG_X10, _x10); \
+ SMC_SET_GP(_h, CTX_GPREG_X11, _x11); \
+ SMC_SET_GP(_h, CTX_GPREG_X12, _x12); \
+ SMC_SET_GP(_h, CTX_GPREG_X13, _x13); \
+ SMC_SET_GP(_h, CTX_GPREG_X14, _x14); \
+ SMC_SET_GP(_h, CTX_GPREG_X15, _x15); \
+ SMC_SET_GP(_h, CTX_GPREG_X16, _x16); \
+ SMC_SET_GP(_h, CTX_GPREG_X17, _x17); \
+ SMC_RET8(_h, (_x0), (_x1), (_x2), (_x3), (_x4), (_x5), (_x6), \
+ (_x7)); \
+}
+
/*
* Convenience macros to access EL3 context registers using handle provided to
* SMC handler. These take the offset values defined in context.h