aboutsummaryrefslogtreecommitdiffstats
path: root/bl1/bl1_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'bl1/bl1_main.c')
-rw-r--r--bl1/bl1_main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c
index 71ece00dd..fa4f3a4c0 100644
--- a/bl1/bl1_main.c
+++ b/bl1/bl1_main.c
@@ -279,3 +279,20 @@ register_t bl1_smc_handler(unsigned int smc_fid,
WARN("Unimplemented BL1 SMC Call: 0x%x \n", smc_fid);
SMC_RET1(handle, SMC_UNK);
}
+
+/*******************************************************************************
+ * BL1 SMC wrapper. This function is only used in AArch32 mode to ensure ABI
+ * compliance when invoking bl1_smc_handler.
+ ******************************************************************************/
+register_t bl1_smc_wrapper(uint32_t smc_fid,
+ void *cookie,
+ void *handle,
+ unsigned int flags)
+{
+ register_t x1, x2, x3, x4;
+
+ assert(handle);
+
+ get_smc_params_from_ctx(handle, x1, x2, x3, x4);
+ return bl1_smc_handler(smc_fid, x1, x2, x3, x4, cookie, handle, flags);
+}