summaryrefslogtreecommitdiff
path: root/bl1/bl1_main.c
diff options
context:
space:
mode:
authordp-arm <dimitris.papastamos@arm.com>2017-02-15 11:07:55 +0000
committerdp-arm <dimitris.papastamos@arm.com>2017-05-15 16:34:27 +0100
commita44090080308beefe64d302bcc76de70f0d1d280 (patch)
tree0edd9b32b2e24f34b9d72d25cf29a80e6a95d175 /bl1/bl1_main.c
parentb6285d64c12ae653c39ecdc3a4c47369aca9d7b0 (diff)
AArch32: Add `TRUSTED_BOARD_BOOT` support
This patch adds `TRUSTED_BOARD_BOOT` support for AArch32 mode. To build this patch the "mbedtls/include/mbedtls/bignum.h" needs to be modified to remove `#define MBEDTLS_HAVE_UDBL` when `MBEDTLS_HAVE_INT32` is defined. This is a workaround for "https://github.com/ARMmbed/mbedtls/issues/708" NOTE: TBBR support on Juno AArch32 is not currently supported. Change-Id: I86d80e30b9139adc4d9663f112801ece42deafcf Signed-off-by: dp-arm <dimitris.papastamos@arm.com> Co-Authored-By: Yatharth Kochar <yatharth.kochar@arm.com>
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 71ece00d..fa4f3a4c 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);
+}