Commit 2a7b403d authored by Achin Gupta's avatar Achin Gupta Committed by Max Shvetsov
Browse files

SPMD: hook SPMD into standard services framework



This patch adds support to initialise the SPM dispatcher as a standard
secure service. It also registers a handler for SPCI SMCs exported by
the SPM dispatcher.
Signed-off-by: default avatarAchin Gupta <achin.gupta@arm.com>
Signed-off-by: default avatarArtsem Artsemenka <artsem.artsemenka@arm.com>
Change-Id: I2183adf826d08ff3fee9aee75f021021162b6477
parent bdd2596d
/*
* Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014-2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -15,6 +15,7 @@
#include <lib/runtime_instr.h>
#include <services/sdei.h>
#include <services/spm_mm_svc.h>
#include <services/spmd_svc.h>
#include <services/std_svc.h>
#include <smccc_helpers.h>
#include <tools_share/uuid.h>
......@@ -51,6 +52,12 @@ static int32_t std_svc_setup(void)
}
#endif
#if defined(SPD_spmd)
if (spmd_setup() != 0) {
ret = 1;
}
#endif
#if SDEI_SUPPORT
/* SDEI initialisation */
sdei_init();
......@@ -114,6 +121,17 @@ static uintptr_t std_svc_smc_handler(uint32_t smc_fid,
}
#endif
#if defined(SPD_spmd)
/*
* Dispatch SPCI calls to the SPCI SMC handler implemented by the SPM
* dispatcher and return its return value
*/
if (is_spci_fid(smc_fid)) {
return spmd_smc_handler(smc_fid, x1, x2, x3, x4, cookie,
handle, flags);
}
#endif
#if SDEI_SUPPORT
if (is_sdei_fid(smc_fid)) {
return sdei_smc_handler(smc_fid, x1, x2, x3, x4, cookie, handle,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment