Browse Source

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>
pull/1978/merge
Manish V Badarkhe 3 years ago
committed by Manish V Badarkhe
parent
commit
426a111965
  1. 4
      drivers/measured_boot/event_log/event_log.c
  2. 4
      include/drivers/measured_boot/event_log/event_log.h
  3. 3
      plat/arm/board/fvp/fvp_bl1_measured_boot.c
  4. 3
      plat/arm/board/fvp/fvp_bl2_measured_boot.c

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

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

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

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

Loading…
Cancel
Save