mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00

Any FF-A SMC that arrives from the normal world is handled by the SPMD before being forwarded to the SPMC. Similarly any SMC arriving from the secure world will hit the SPMC first and be forwarded to the SPMD if required, otherwise the SPMC will respond directly. This allows for the existing flow of handling FF-A ABI's when the SPMC resides at a lower EL to be preserved. In order to facilitate this flow the spmd_smc_forward function has been split and control is either passed to the SPMC or it is forwarded as before. To allow this the flags and cookie parameters must now also be passed into this method as the SPMC must be able to provide these when calling back into the SPMD handler as appropriate. Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I84fee8390023295b9689067e14cd25cba23ca39b
40 lines
897 B
C
40 lines
897 B
C
/*
|
|
* Copyright (c) 2020-2022, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SPMD_SVC_H
|
|
#define SPMD_SVC_H
|
|
|
|
#ifndef __ASSEMBLER__
|
|
#include <services/ffa_svc.h>
|
|
#include <stdint.h>
|
|
|
|
int spmd_setup(void);
|
|
uint64_t spmd_ffa_smc_handler(uint32_t smc_fid,
|
|
uint64_t x1,
|
|
uint64_t x2,
|
|
uint64_t x3,
|
|
uint64_t x4,
|
|
void *cookie,
|
|
void *handle,
|
|
uint64_t flags);
|
|
uint64_t spmd_smc_handler(uint32_t smc_fid,
|
|
uint64_t x1,
|
|
uint64_t x2,
|
|
uint64_t x3,
|
|
uint64_t x4,
|
|
void *cookie,
|
|
void *handle,
|
|
uint64_t flags);
|
|
uint64_t spmd_smc_switch_state(uint32_t smc_fid,
|
|
bool secure_origin,
|
|
uint64_t x1,
|
|
uint64_t x2,
|
|
uint64_t x3,
|
|
uint64_t x4,
|
|
void *handle);
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* SPMD_SVC_H */
|