TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lifecycle.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __PSA_LIFECYCLE_H__
9 #define __PSA_LIFECYCLE_H__
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #define PSA_LIFECYCLE_PSA_STATE_MASK (0xff00u)
16 #define PSA_LIFECYCLE_IMP_STATE_MASK (0x00ffu)
17 #define PSA_LIFECYCLE_UNKNOWN (0x0000u)
18 #define PSA_LIFECYCLE_ASSEMBLY_AND_TEST (0x1000u)
19 #define PSA_LIFECYCLE_PSA_ROT_PROVISIONING (0x2000u)
20 #define PSA_LIFECYCLE_SECURED (0x3000u)
21 #define PSA_LIFECYCLE_NON_PSA_ROT_DEBUG (0x4000u)
22 #define PSA_LIFECYCLE_RECOVERABLE_PSA_ROT_DEBUG (0x5000u)
23 #define PSA_LIFECYCLE_DECOMMISSIONED (0x6000u)
24 
25 /*
26  * \brief This function retrieves the current PSA RoT lifecycle state.
27  *
28  * \return state The current security lifecycle state of the PSA
29  * RoT. The PSA state and implementation state are
30  * encoded as follows:
31  * \arg state[15:8] – PSA lifecycle state
32  * \arg state[7:0] – IMPLEMENTATION DEFINED state
33  */
34 uint32_t psa_rot_lifecycle_state(void);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* __PSA_LIFECYCLE_H__ */
uint32_t psa_rot_lifecycle_state(void)
Definition: psa_lifecycle.c:12