diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-10-16 08:43:14 +0100 |
---|---|---|
committer | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-11-13 08:38:51 +0000 |
commit | b7cb133e5c56f149024a56873216f0c198aa9635 (patch) | |
tree | 433b74c05447effe493478659701ac64776310e1 /services/std_svc/std_svc_setup.c | |
parent | 3d732e23e71343f2ba18d456c8f2163015209768 (diff) |
BL31: Add SDEI dispatcher
The implementation currently supports only interrupt-based SDEI events,
and supports all interfaces as defined by SDEI specification version
1.0 [1].
Introduce the build option SDEI_SUPPORT to include SDEI dispatcher in
BL31.
Update user guide and porting guide. SDEI documentation to follow.
[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf
Change-Id: I758b733084e4ea3b27ac77d0259705565842241a
Co-authored-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'services/std_svc/std_svc_setup.c')
-rw-r--r-- | services/std_svc/std_svc_setup.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c index 977ed7f6..ffc34716 100644 --- a/services/std_svc/std_svc_setup.c +++ b/services/std_svc/std_svc_setup.c @@ -11,6 +11,7 @@ #include <psci.h> #include <runtime_instr.h> #include <runtime_svc.h> +#include <sdei.h> #include <smcc_helpers.h> #include <spm_svc.h> #include <std_svc.h> @@ -45,6 +46,11 @@ static int32_t std_svc_setup(void) } #endif +#if SDEI_SUPPORT + /* SDEI initialisation */ + sdei_init(); +#endif + return ret; } @@ -92,7 +98,6 @@ uintptr_t std_svc_smc_handler(uint32_t smc_fid, SMC_RET1(handle, ret); } - #if ENABLE_SPM /* * Dispatch SPM calls to SPM SMC handler and return its return @@ -104,6 +109,13 @@ uintptr_t std_svc_smc_handler(uint32_t smc_fid, } #endif +#if SDEI_SUPPORT + if (is_sdei_fid(smc_fid)) { + return sdei_smc_handler(smc_fid, x1, x2, x3, x4, cookie, handle, + flags); + } +#endif + switch (smc_fid) { case ARM_STD_SVC_CALL_COUNT: /* |