util/cbfstool: Add eventLog support for ELOG_TYPE_FW_EARLY_SOL

In order to support logging events for when we show early signs
of life to the user during CSE FW syncs and MRC trainings add
support for the ELOG_TYPE_FW_EARLY_SOL type.

BUG=b:266113626
TEST=verify event shows in eventlog CSE sync/MRC training

Change-Id: I3913cb8501de9a2605266cf9988a7195576cb91d
Signed-off-by: Tarun Tuli <tarun.tuli@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71296
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Tarun Tuli 2023-01-31 18:24:38 +00:00 committed by Julius Werner
parent 0b40ea2f6e
commit 5044dc48f3
1 changed files with 13 additions and 1 deletions

View File

@ -159,7 +159,7 @@ static void eventlog_print_type(const struct event_header *event)
{ELOG_TYPE_EXTENDED_EVENT, "Extended Event"},
{ELOG_TYPE_CROS_DIAGNOSTICS, "Diagnostics Mode"},
{ELOG_TYPE_FW_VBOOT_INFO, "Firmware vboot info"},
{ELOG_TYPE_FW_EARLY_SOL, "Early Sign of Life"},
{ELOG_TYPE_EOL, "End of log"},
};
@ -460,6 +460,12 @@ static int eventlog_print_data(const struct event_header *event)
{0, NULL},
};
static const struct valstr early_sol_path_types[] = {
{ELOG_FW_EARLY_SOL_CSE_SYNC, "CSE Sync Early SOL Screen Shown"},
{ELOG_FW_EARLY_SOL_MRC, "MRC Early SOL Screen Shown"},
{0, NULL},
};
size_t elog_type_to_min_size[] = {
[ELOG_TYPE_LOG_CLEAR] = sizeof(uint16_t),
[ELOG_TYPE_BOOT] = sizeof(uint32_t),
@ -478,6 +484,7 @@ static int eventlog_print_data(const struct event_header *event)
[ELOG_TYPE_EXTENDED_EVENT] = sizeof(struct elog_event_extended_event),
[ELOG_TYPE_CROS_DIAGNOSTICS] = sizeof(uint8_t),
[ELOG_TYPE_FW_VBOOT_INFO] = sizeof(uint16_t),
[ELOG_TYPE_FW_EARLY_SOL] = sizeof(uint8_t),
[0xff] = 0,
};
@ -629,6 +636,11 @@ static int eventlog_print_data(const struct event_header *event)
eventlog_printf("fw_prev_result=%s", vb2_result_string(info->prev_result));
break;
}
case ELOG_TYPE_FW_EARLY_SOL: {
const uint8_t *sol_event = event_get_data(event);
eventlog_printf("%s", val2str(*sol_event, early_sol_path_types));
break;
}
default:
break;
}