diff options
author | Olivier Deprez <olivier.deprez@arm.com> | 2020-04-16 16:59:21 +0200 |
---|---|---|
committer | Max Shvetsov <maksims.svecovs@arm.com> | 2020-08-20 18:06:06 +0100 |
commit | c2901419b54ae5334b666bc8f4fc35c36246daac (patch) | |
tree | f3fbae3383ff1db44fde120125af6e58f87cf4ee /include/services | |
parent | a334c4e6915d111ba48da60f898d4922c01a16b3 (diff) | |
download | arm-trusted-firmware-c2901419b54ae5334b666bc8f4fc35c36246daac.tar.gz |
SPMD: introduce SPMC to SPMD messages
FF-A interface to handle SPMC to SPMD direct messages requests.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Change-Id: Ia707a308c55561a31dcfa86e554ea1c9e23f862a
Diffstat (limited to 'include/services')
-rw-r--r-- | include/services/ffa_svc.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/services/ffa_svc.h b/include/services/ffa_svc.h index 728507749..0513eab5e 100644 --- a/include/services/ffa_svc.h +++ b/include/services/ffa_svc.h @@ -138,4 +138,43 @@ */ #define FFA_PARAM_MBZ U(0x0) +/* + * Maximum FF-A endpoint id value + */ +#define FFA_ENDPOINT_ID_MAX U(1 << 16) + +/* + * Mask for source and destination endpoint id in + * a direct message request/response. + */ +#define FFA_DIRECT_MSG_ENDPOINT_ID_MASK U(0xffff) + +/* + * Bit shift for destination endpoint id in a direct message request/response. + */ +#define FFA_DIRECT_MSG_DESTINATION_SHIFT U(0) + +/* + * Bit shift for source endpoint id in a direct message request/response. + */ +#define FFA_DIRECT_MSG_SOURCE_SHIFT U(16) + +/****************************************************************************** + * ffa_endpoint_destination + *****************************************************************************/ +static inline uint16_t ffa_endpoint_destination(unsigned int ep) +{ + return (ep >> FFA_DIRECT_MSG_DESTINATION_SHIFT) & + FFA_DIRECT_MSG_ENDPOINT_ID_MASK; +} + +/****************************************************************************** + * ffa_endpoint_source + *****************************************************************************/ +static inline uint16_t ffa_endpoint_source(unsigned int ep) +{ + return (ep >> FFA_DIRECT_MSG_SOURCE_SHIFT) & + FFA_DIRECT_MSG_ENDPOINT_ID_MASK; +} + #endif /* FFA_SVC_H */ |