1 /*
2  * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef  _CC_BOOT_DEFS_H
8 #define  _CC_BOOT_DEFS_H
9 
10 /*!
11  @file
12  @brief This file contains general definitions of types and enums of Boot APIs.
13  */
14 
15 #ifdef __cplusplus
16 extern "C"
17 {
18 #endif
19 
20 /*! Version counters value. */
21 typedef enum {
22 
23     CC_SW_VERSION_TRUSTED = 0,          /*!<  Trusted counter. */
24     CC_SW_VERSION_NON_TRUSTED,          /*!<  Non trusted counter. */
25     CC_SW_VERSION_MAX = 0x7FFFFFFF      /*!< Reserved */
26 } CCSbSwVersionId_t;
27 
28 /*! The hash boot key definition. */
29 typedef enum {
30     CC_SB_HASH_BOOT_KEY_0_128B = 0,     /*!< Hbk0: 128-bit truncated SHA-256 digest of PubKB0. Used by ICV */
31     CC_SB_HASH_BOOT_KEY_1_128B = 1,     /*!< Hbk1: 128-bit truncated SHA-256 digest of PubKB1. Used by OEM */
32     CC_SB_HASH_BOOT_KEY_256B = 2,       /*!< Hbk: 256-bit SHA-256 digest of public key. */
33     CC_SB_HASH_BOOT_NOT_USED = 0xF,     /*!< Hbk is not used. */
34     CC_SB_HASH_MAX_NUM = 0x7FFFFFFF,    /*!< Reserved. */
35 } CCSbPubKeyIndexType_t;
36 
37 /*! Chip state. */
38 typedef enum {
39     CHIP_STATE_NOT_INITIALIZED = 0,     /*! Chip is not initialized. */
40     CHIP_STATE_TEST = 1,                /*! Chip is in Production state. */
41     CHIP_STATE_PRODUCTION = 2,          /*! Chip is in Production state. */
42     CHIP_STATE_ERROR = 3,               /*! Chip is in Error state. */
43 } CCBsvChipState_t;
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /*_CC_BOOT_DEFS_H */
49 
50 /**
51 @}
52  */
53