Mistake on this page?
Report an issue in GitHub or email us
pal_client_api_intf.h
Go to the documentation of this file.
1 /** @file
2  * Copyright (c) 2018-2020, Arm Limited or its affiliates. All rights reserved.
3  * SPDX-License-Identifier : Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16 **/
17 
18 #ifndef _PAL_CLIENT_API_H_
19 #define _PAL_CLIENT_API_H_
20 
21 #include "pal_common.h"
22 
23 #define PSA_VERSION_NONE (0)
24 #define PSA_CONNECTION_REFUSED (INT32_MIN + 1)
25 #define PSA_CONNECTION_BUSY (INT32_MIN + 2)
26 #define PSA_DROP_CONNECTION (INT32_MIN)
27 #define PSA_NULL_HANDLE ((psa_handle_t)0)
28 
29 typedef int32_t psa_status_t;
30 typedef int32_t psa_handle_t;
31 
32 typedef struct psa_invec {
33  const void *base;
34  size_t len;
35 } psa_invec;
36 
37 typedef struct psa_outvec {
38  void *base;
39  size_t len;
40 } psa_outvec;
41 
42 uint32_t psa_framework_version(void);
43 uint32_t psa_version(uint32_t sid);
44 psa_handle_t psa_connect(uint32_t sid, uint32_t minor_version);
45 psa_status_t psa_call(psa_handle_t handle,
46  const psa_invec *in_vec,
47  size_t in_len,
48  psa_outvec *out_vec,
49  size_t out_len);
50 void psa_close(psa_handle_t handle);
51 
52 uint32_t pal_ipc_framework_version(void);
53 uint32_t pal_ipc_version(uint32_t sid);
54 psa_handle_t pal_ipc_connect(uint32_t sid, uint32_t minor_version);
55 psa_status_t pal_ipc_call(psa_handle_t handle,
56  const psa_invec *in_vec,
57  size_t in_len,
58  psa_outvec *out_vec,
59  size_t out_len);
60 void pal_ipc_close(psa_handle_t handle);
61 #endif /* _PAL_CLIENT_API_H_ */
Copyright (c) 2018, Arm Limited or its affiliates.
size_t len
Length in bytes of the buffer.
uint32_t pal_ipc_version(uint32_t sid)
Retrieve the minor version of a Root of Trust Service by its SID.
psa_handle_t pal_ipc_connect(uint32_t sid, uint32_t minor_version)
Connect to given sid.
const void * base
Starting address of the buffer.
void pal_ipc_close(psa_handle_t handle)
Close a connection to a Root of Trust Service.
A writable output memory region provided to an RoT Service.
A read-only input memory region provided to an RoT Service.
psa_status_t pal_ipc_call(psa_handle_t handle, const psa_invec *in_vec, size_t in_len, psa_outvec *out_vec, size_t out_len)
Call a connected Root of Trust Service.
int32_t psa_status_t
Function return status.
uint32_t pal_ipc_framework_version(void)
Retrieve the version of the PSA Framework API that is implemented.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.