1 /* 2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /*! 8 @addtogroup prod_mem 9 @{ 10 */ 11 12 /*! 13 @file 14 @brief This file contains all of the enums and definitions that are used for 15 the ICV and OEM production libraries. 16 */ 17 18 #ifndef _PROD_H 19 #define _PROD_H 20 21 22 /************************ Defines ******************************/ 23 24 /*! The definition of the number of bytes in a word. */ 25 #define CC_PROD_32BIT_WORD_SIZE sizeof(uint32_t) 26 /*! The size of the plain-asset in bytes. */ 27 #define PROD_ASSET_SIZE 16 28 /*! The size of the asset-package in bytes. */ 29 #define PROD_ASSET_PKG_SIZE 64 30 /*! The size of the asset-package in words. */ 31 #define PROD_ASSET_PKG_WORD_SIZE (PROD_ASSET_PKG_SIZE/CC_PROD_32BIT_WORD_SIZE) 32 /*! The number of words of the DCU lock. */ 33 #define PROD_DCU_LOCK_WORD_SIZE 4 34 35 /************************ Enums ********************************/ 36 37 /*! The type of the provided asset. */ 38 typedef enum { 39 /*! The asset is not provided. */ 40 ASSET_NO_KEY = 0, 41 /*! The asset is provided as plain, not in a package. */ 42 ASSET_PLAIN_KEY = 1, 43 /*! The asset is provided as a package. */ 44 ASSET_PKG_KEY = 2, 45 /*! Reserved. */ 46 ASSET_TYPE_RESERVED = 0x7FFFFFFF, 47 } CCAssetType_t; 48 49 /************************ Typedefs ****************************/ 50 51 /*! Defines the buffer of the plain asset, as a 16-byte array. */ 52 typedef uint8_t CCPlainAsset_t[PROD_ASSET_SIZE]; 53 /*! Defines the buffer of the asset-package, as a 64-byte array. */ 54 typedef uint32_t CCAssetPkg_t[PROD_ASSET_PKG_WORD_SIZE]; 55 56 57 /************************ Structs ******************************/ 58 59 /*! @brief The asset buffer. 60 61 If the asset is provided as plain asset, the \p plainAsset field is used. 62 Otherwise, the \p pkgAsset field is used. 63 */ 64 typedef union { 65 /*! Plain asset buffer. */ 66 CCPlainAsset_t plainAsset; 67 /*! Asset-package buffer. */ 68 CCAssetPkg_t pkgAsset; 69 } CCAssetBuff_t; 70 71 /*! 72 @} 73 */ 74 #endif //_PROD_H 75