* Function declarations.
*/
static int bl1_fwu_image_copy(unsigned int image_id,
- uintptr_t image_addr,
+ uintptr_t image_src,
unsigned int block_size,
unsigned int image_size,
unsigned int flags);
static int bl1_fwu_image_auth(unsigned int image_id,
- uintptr_t image_addr,
+ uintptr_t image_src,
unsigned int image_size,
unsigned int flags);
static int bl1_fwu_image_execute(unsigned int image_id,
static unsigned int sec_exec_image_id = INVALID_IMAGE_ID;
/* Authentication status of each image. */
-extern unsigned int auth_img_flags[];
+extern unsigned int auth_img_flags[MAX_NUMBER_IDS];
/*******************************************************************************
* Top level handler for servicing FWU SMCs.
/*
- * Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/* Pointer to CoT */
extern const auth_img_desc_t *const cot_desc_ptr;
-extern unsigned int auth_img_flags[];
+extern unsigned int auth_img_flags[MAX_NUMBER_IDS];
static int cmp_auth_param_type_desc(const auth_param_type_desc_t *a,
const auth_param_type_desc_t *b)
/* NT_FW_CONFIG */
#define NT_FW_CONFIG_ID 27
+/* Define size of the array */
+#define MAX_NUMBER_IDS 28
+
#endif /* __TBBR_IMG_DEF_H__ */
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <auth_common.h>
#include <cot_def.h>
#include <img_parser_mod.h>
+#include <tbbr_img_def.h>
/*
* Image flags
#define REGISTER_COT(_cot) \
const auth_img_desc_t *const cot_desc_ptr = \
(const auth_img_desc_t *const)&_cot[0]; \
- unsigned int auth_img_flags[sizeof(_cot)/sizeof(_cot[0])]
+ unsigned int auth_img_flags[MAX_NUMBER_IDS]
#endif /* TRUSTED_BOARD_BOOT */
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
void crypto_mod_init(void);
int crypto_mod_verify_signature(void *data_ptr, unsigned int data_len,
void *sig_ptr, unsigned int sig_len,
- void *sig_alg, unsigned int sig_alg_len,
+ void *sig_alg_ptr, unsigned int sig_alg_len,
void *pk_ptr, unsigned int pk_len);
int crypto_mod_verify_hash(void *data_ptr, unsigned int data_len,
void *digest_info_ptr, unsigned int digest_info_len);
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/* Exported functions */
void img_parser_init(void);
int img_parser_check_integrity(img_type_t img_type,
- void *img, unsigned int img_len);
+ void *img_ptr, unsigned int img_len);
int img_parser_get_auth_param(img_type_t img_type,
const auth_param_type_desc_t *type_desc,
- void *img, unsigned int img_len,
+ void *img_ptr, unsigned int img_len,
void **param_ptr, unsigned int *param_len);
/* Macro to register an image parser library */