blob: a892c4921d79b9179e310d3b286a9eca198f053d [file] [log] [blame]
Shawn Shan6e7be072019-11-29 17:56:29 +08001/*
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
Shawn Shan6e7be072019-11-29 17:56:29 +080011#ifdef __cplusplus
12extern "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 */
34uint32_t psa_rot_lifecycle_state(void);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif /* __PSA_LIFECYCLE_H__ */