blob: 0a411f9a3f89cec1a0a1addefa897634f01d7cf7 [file] [log] [blame]
Imre Kis6fd73d82024-07-04 13:36:10 +02001/*
2 * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef FWU_PROVIDER_SHIM_H
8#define FWU_PROVIDER_SHIM_H
9
10#include "rpc/common/endpoint/rpc_service_interface.h"
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/**
17 * \brief PSA FWU provider shim layer
18 *
19 * The PSA FWU forwards the function ID and the service status in the beginning of the shared
20 * memory. This layer handles the extraction of the function ID and the insertion of service status,
21 * so individual function handlers don't have to do that.
22 */
23
24struct fwu_provider_shim {
25 struct rpc_service_interface shim_rpc_interface;
26};
27
28struct rpc_service_interface *fwu_provider_shim_init(
29 struct fwu_provider_shim *shim, struct rpc_service_interface *fwu_rpc_interface);
30
31void fwu_provider_shim_deinit(struct fwu_provider_shim *shim);
32
33#ifdef __cplusplus
34}
35#endif
36
37#endif /* FWU_PROVIDER_SHIM_H */