Imre Kis | 6fd73d8 | 2024-07-04 13:36:10 +0200 | [diff] [blame] | 1 | /* |
| 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 |
| 13 | extern "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 | |
| 24 | struct fwu_provider_shim { |
| 25 | struct rpc_service_interface shim_rpc_interface; |
| 26 | }; |
| 27 | |
| 28 | struct rpc_service_interface *fwu_provider_shim_init( |
| 29 | struct fwu_provider_shim *shim, struct rpc_service_interface *fwu_rpc_interface); |
| 30 | |
| 31 | void fwu_provider_shim_deinit(struct fwu_provider_shim *shim); |
| 32 | |
| 33 | #ifdef __cplusplus |
| 34 | } |
| 35 | #endif |
| 36 | |
| 37 | #endif /* FWU_PROVIDER_SHIM_H */ |