diff --git a/drivers/measured_boot/event_log/event_log.c b/drivers/measured_boot/event_log/event_log.c index 1755dd95e..52ed2782d 100644 --- a/drivers/measured_boot/event_log/event_log.c +++ b/drivers/measured_boot/event_log/event_log.c @@ -250,11 +250,11 @@ int event_log_measure_and_record(uintptr_t data_base, uint32_t data_size, const event_log_metadata_t *metadata_ptr = plat_metadata_ptr; /* Get the metadata associated with this image. */ - while ((metadata_ptr->id != INVALID_ID) && + while ((metadata_ptr->id != EVLOG_INVALID_ID) && (metadata_ptr->id != data_id)) { metadata_ptr++; } - assert(metadata_ptr->id != INVALID_ID); + assert(metadata_ptr->id != EVLOG_INVALID_ID); /* Calculate hash */ rc = crypto_mod_calc_hash((unsigned int)MBEDTLS_MD_ID, diff --git a/include/drivers/measured_boot/event_log/event_log.h b/include/drivers/measured_boot/event_log/event_log.h index c6eb29cfe..78712af65 100644 --- a/include/drivers/measured_boot/event_log/event_log.h +++ b/include/drivers/measured_boot/event_log/event_log.h @@ -36,9 +36,9 @@ #endif /* Number of hashing algorithms supported */ -#define HASH_ALG_COUNT 1U +#define HASH_ALG_COUNT 1U -#define INVALID_ID MAX_NUMBER_IDS +#define EVLOG_INVALID_ID MAX_NUMBER_IDS #define MEMBER_SIZE(type, member) sizeof(((type *)0)->member) diff --git a/plat/arm/board/fvp/fvp_bl1_measured_boot.c b/plat/arm/board/fvp/fvp_bl1_measured_boot.c index 47af1f554..546855527 100644 --- a/plat/arm/board/fvp/fvp_bl1_measured_boot.c +++ b/plat/arm/board/fvp/fvp_bl1_measured_boot.c @@ -17,7 +17,8 @@ const event_log_metadata_t fvp_event_log_metadata[] = { { FW_CONFIG_ID, EVLOG_FW_CONFIG_STRING, PCR_0 }, { TB_FW_CONFIG_ID, EVLOG_TB_FW_CONFIG_STRING, PCR_0 }, { BL2_IMAGE_ID, EVLOG_BL2_STRING, PCR_0 }, - { INVALID_ID, NULL, (unsigned int)(-1) } /* Terminator */ + + { EVLOG_INVALID_ID, NULL, (unsigned int)(-1) } /* Terminator */ }; void bl1_plat_mboot_init(void) diff --git a/plat/arm/board/fvp/fvp_bl2_measured_boot.c b/plat/arm/board/fvp/fvp_bl2_measured_boot.c index 5ebfedea0..decf13d92 100644 --- a/plat/arm/board/fvp/fvp_bl2_measured_boot.c +++ b/plat/arm/board/fvp/fvp_bl2_measured_boot.c @@ -24,7 +24,8 @@ const event_log_metadata_t fvp_event_log_metadata[] = { { SCP_BL2_IMAGE_ID, EVLOG_SCP_BL2_STRING, PCR_0 }, { SOC_FW_CONFIG_ID, EVLOG_SOC_FW_CONFIG_STRING, PCR_0 }, { TOS_FW_CONFIG_ID, EVLOG_TOS_FW_CONFIG_STRING, PCR_0 }, - { INVALID_ID, NULL, (unsigned int)(-1) } /* Terminator */ + + { EVLOG_INVALID_ID, NULL, (unsigned int)(-1) } /* Terminator */ }; void bl2_plat_mboot_init(void)