refactor(measured boot): rename a macro INVALID_ID to EVLOG_INVALID_ID

Renamed a macro 'INVALID_ID' to 'EVLOG_INVALID_ID' to avoid its clash
with other macro names and to show it is explicitly used for Event
Log driver.

Change-Id: Ie4c92b3cd1366d9a59cd6f43221e24734865f427
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
This commit is contained in:
Manish V Badarkhe 2021-10-31 14:47:49 +00:00 committed by Manish V Badarkhe
parent a1f02f4f3d
commit 426a111965
4 changed files with 8 additions and 6 deletions

View File

@ -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,

View File

@ -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)

View File

@ -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)

View File

@ -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)