*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef __ARM_DYN_CFG_HELPERS_H__
-#define __ARM_DYN_CFG_HELPERS_H__
+#ifndef ARM_DYN_CFG_HELPERS_H
+#define ARM_DYN_CFG_HELPERS_H
#include <stddef.h>
#include <stdint.h>
int arm_set_dtb_mbedtls_heap_info(void *dtb, void *heap_addr,
size_t heap_size);
-#endif /* __ARM_DYN_CFG_HELPERS_H__ */
+#endif /* ARM_DYN_CFG_HELPERS_H */
void arm_load_tb_fw_config(void)
{
int err;
- uintptr_t config_base = 0;
- image_desc_t *image_desc;
+ uintptr_t config_base = 0UL;
+ image_desc_t *desc;
image_desc_t arm_tb_fw_info = {
.image_id = TB_FW_CONFIG_ID,
tb_fw_cfg_dtb_size = (size_t)arm_tb_fw_info.image_info.image_max_size;
/* The BL2 ep_info arg0 is modified to point to TB_FW_CONFIG */
- image_desc = bl1_plat_get_image_desc(BL2_IMAGE_ID);
- assert(image_desc != NULL);
- image_desc->ep_info.args.arg0 = config_base;
+ desc = bl1_plat_get_image_desc(BL2_IMAGE_ID);
+ assert(desc != NULL);
+ desc->ep_info.args.arg0 = config_base;
- INFO("BL1: TB_FW_CONFIG loaded at address = %p\n",
- (void *) config_base);
+ INFO("BL1: TB_FW_CONFIG loaded at address = 0x%lx\n", config_base);
#if TRUSTED_BOARD_BOOT && defined(DYN_DISABLE_AUTH)
int tb_fw_node;
*/
if (config_ids[i] != HW_CONFIG_ID) {
- if (check_uptr_overflow(image_base, image_size) != 0)
+ if (check_uptr_overflow(image_base, image_size))
continue;
/* Ensure the configs don't overlap with BL31 */