blob: 5e83cd54a4f7a544ef9b326c12aa3345609b712f [file] [log] [blame]
Anton Komlev4bfd6c52022-06-29 17:10:26 +01001/*
2 * Copyright (c) 2020, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "tfm_example_partition_api.h"
9
10#include "psa/client.h"
11#include "psa_manifest/sid.h"
12
13psa_status_t tfm_example_partition_call(uint32_t arg)
14{
15 psa_status_t status;
16 psa_handle_t handle;
17 psa_invec in_vec[] = {
18 { .base = &arg, .len = sizeof(arg) },
19 };
20
21 handle = psa_connect(TFM_EXAMPLE_SERVICE_SID, TFM_EXAMPLE_SERVICE_VERSION);
22 if (!PSA_HANDLE_IS_VALID(handle)) {
23 return PSA_HANDLE_TO_ERROR(handle);
24 }
25
26 status = psa_call(handle, PSA_IPC_CALL, in_vec, 1, NULL, 0);
27
28 psa_close(handle);
29
30 return status;
31}