aboutsummaryrefslogtreecommitdiff
path: root/bl31/bl31_main.c
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2014-02-01 07:51:28 +0000
committerDan Handley <dan.handley@arm.com>2014-02-17 18:51:44 +0000
commit7aea908761a6a2923940b8c9491cc1e749142ad1 (patch)
treea9becb56474891281bd5abdf70a85b6520908b20 /bl31/bl31_main.c
parent9ac63c59c4b6de7e48a6702ad799dc961a4fd6de (diff)
downloadarm-trusted-firmware-7aea908761a6a2923940b8c9491cc1e749142ad1.tar.gz
Add context management library
This patch adds support for a cpu context management library. This library will be used to: 1. Share pointers to secure and non-secure state cpu contexts between runtime services e.g. PSCI and Secure Payload Dispatcher services 2. Set SP_EL3 to a context structure which will be used for programming an ERET into a lower EL 3. Provide wrapper functions to save and restore EL3 & EL1 state. These functions will in turn use the helper functions in context.S Change-Id: I655eeef83dcd2a0c6f2eb2ac23efab866ac83ca0
Diffstat (limited to 'bl31/bl31_main.c')
-rw-r--r--bl31/bl31_main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c
index 538280a..fb69718 100644
--- a/bl31/bl31_main.c
+++ b/bl31/bl31_main.c
@@ -38,6 +38,15 @@
#include <bl_common.h>
#include <bl31.h>
#include <runtime_svc.h>
+#include <context_mgmt.h>
+
+/*******************************************************************************
+ * Simple function to initialise all BL31 helper libraries.
+ ******************************************************************************/
+void bl31_lib_init()
+{
+ cm_init();
+}
void bl31_arch_next_el_setup(void);
@@ -59,7 +68,8 @@ void bl31_main(void)
#if defined (__GNUC__)
printf("BL31 Built : %s, %s\n\r", __TIME__, __DATE__);
#endif
-
+ /* Initialise helper libraries */
+ bl31_lib_init();
/* Initialize the runtime services e.g. psci */
runtime_svc_init(mpidr);