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 9 10 #ifndef _BOOT_IMAGES_VERIFIER_SWCOMP_H 11 #define _BOOT_IMAGES_VERIFIER_SWCOMP_H 12 13 14 #ifdef __cplusplus 15 extern "C" 16 { 17 #endif 18 19 /*---------------------------- 20 PUBLIC FUNCTIONS 21 -----------------------------------*/ 22 23 /************************ Public Functions ******************************/ 24 /** 25 * @brief This function is responsible to verification of the SW components. 26 * The function will go over the SW components load each component, 27 * compute its HASH and compare it with the HASH saved in the certificate. 28 * 29 * 30 * @param[in] flashRead_func - User's Flash read function used to read data from the flash to memory location 31 * @param[in] userContext - User's context for the usage of flashRead_func 32 * @param[in] hwBaseAddress - base address for the ARM CryptoCell HW engines 33 * @param[in] pSwImagesData - s/w comps data, pointers to certificate locations of the s/w comps HASH data 34 * @param[in] pSwImagesAddData - s/w comps additional data, pointers to certificate locations of the s/w comps additional data 35 * @param[in] workspace_ptr - temporary buffer to load the SW components to (SW components without 36 * loading address). 37 * @param[in] workspaceSize - the temporary buffer size in bytes 38 * 39 * @return CCError_t - On success the value CC_OK is returned, 40 * on failure - a value from BootImagesVerifier_error.h 41 */ 42 CCError_t CCCertValidateSWComps(CCSbFlashReadFunc flashRead_func, 43 void *userContext, 44 unsigned long hwBaseAddress, 45 CCSbPubKeyIndexType_t keyIndex, 46 CCSbCertParserSwCompsInfo_t *pSwImagesData, 47 uint32_t *pSwImagesAddData, 48 uint32_t *workspace_ptr, 49 uint32_t workspaceSize); 50 51 52 53 54 #ifdef __cplusplus 55 } 56 #endif 57 58 #endif 59 60 61