1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/*
* Copyright (c) 2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#ifndef __TFM_FWU_REQ_MNGR_H__
#define __TFM_FWU_REQ_MNGR_H__
#include <stddef.h>
#include "psa/client.h"
#ifdef __cplusplus
extern "C" {
#endif
/* The maxinum of images that TF-M support to update concurrently. */
#define TFM_FWU_MAX_IMAGES 2
/**
* \brief Handles the write request.
*
* \param[in] in_vec Pointer to the input vector which contains the input
* parameters.
* \param[in] in_len Number of input parameters in the input vector.
* \param[out] out_vec Pointer to the output vector which contains the output
* parameters.
* \param[in] out_len Number of output parameters in the output vector.
*
* \return A status indicating the success/failure of the operation as
* specified in \ref psa_status_t
*/
psa_status_t tfm_fwu_write_req(psa_invec *in_vec, size_t in_len,
psa_outvec *out_vec, size_t out_len);
/**
* \brief Handles the install request.
*
* \param[in] in_vec Pointer to the input vector which contains the input
* parameters.
* \param[in] in_len Number of input parameters in the input vector.
* \param[out] out_vec Pointer to the output vector which contains the output
* parameters.
* \param[in] out_len Number of output parameters in the output vector.
*
* \return A status indicating the success/failure of the operation as
* specified in \ref psa_status_t
*/
psa_status_t tfm_fwu_install_req(psa_invec *in_vec, size_t in_len,
psa_outvec *out_vec, size_t out_len);
/**
* \brief Handles the abort request.
*
* \param[in] in_vec Pointer to the input vector which contains the input
* parameters.
* \param[in] in_len Number of input parameters in the input vector.
* \param[out] out_vec Pointer to the output vector which contains the output
* parameters.
* \param[in] out_len Number of output parameters in the output vector.
*
* \return A status indicating the success/failure of the operation as
* specified in \ref psa_status_t
*/
psa_status_t tfm_fwu_abort_req(psa_invec *in_vec, size_t in_len,
psa_outvec *out_vec, size_t out_len);
/**
* \brief Query the infor of the primary slot.
*
* \param[in] in_vec Pointer to the input vector which contains the input
* parameters.
* \param[in] in_len Number of input parameters in the input vector.
* \param[out] out_vec Pointer to the output vector which contains the output
* parameters.
* \param[in] out_len Number of output parameters in the output vector.
*
* \return A status indicating the success/failure of the operation as
* specified in \ref psa_status_t
*/
psa_status_t tfm_fwu_query_req(psa_invec *in_vec, size_t in_len,
psa_outvec *out_vec, size_t out_len);
psa_status_t tfm_fwu_request_reboot_req(psa_invec *in_vec, size_t in_len,
psa_outvec *out_vec, size_t out_len);
#ifdef __cplusplus
}
#endif
#endif /* __TFM_FWU_REQ_MNGR_H__ */
|