From 408b409c2df25c2eb8381c459f500490d9755a28 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 14 Jul 2024 19:55:01 +0000 Subject: util/cbfstool: Add eventLog support for ELOG_TYPE_FW_LATE_SOL In order to support logging events for when we show early signs of life to the user during CSE FW syncs add support for the ELOG_TYPE_FW_LATE_SOL type. BUG=b:305898363 TEST=verify event shows in eventlog CSE sync. Change-Id: I862db946f6ff622ac83072e6bf27832732c0c318 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/83462 Tested-by: build bot (Jenkins) Reviewed-by: Dinesh Gehlot --- util/cbfstool/eventlog.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'util/cbfstool') diff --git a/util/cbfstool/eventlog.c b/util/cbfstool/eventlog.c index e090ebee01..5e76df22cf 100644 --- a/util/cbfstool/eventlog.c +++ b/util/cbfstool/eventlog.c @@ -169,6 +169,7 @@ static void eventlog_print_type(const struct event_header *event) {ELOG_TYPE_PSR_DATA_BACKUP, "PSR data backup"}, {ELOG_TYPE_PSR_DATA_LOST, "PSR data lost"}, {ELOG_TYPE_FW_SPLASH_SCREEN, "Firmware Splash Screen"}, + {ELOG_TYPE_FW_LATE_SOL, "Late Sign of Life "}, {ELOG_TYPE_EOL, "End of log"}, }; @@ -483,6 +484,11 @@ static int eventlog_print_data(const struct event_header *event) {0, NULL}, }; + static const struct valstr late_sol_path_types[] = { + {ELOG_FW_LATE_SOL_CSE_SYNC, "CSE Sync Late 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), @@ -504,6 +510,7 @@ static int eventlog_print_data(const struct event_header *event) [ELOG_TYPE_FW_EARLY_SOL] = sizeof(uint8_t), [ELOG_TYPE_PSR_DATA_BACKUP] = sizeof(uint8_t), [ELOG_TYPE_FW_SPLASH_SCREEN] = sizeof(uint8_t), + [ELOG_TYPE_FW_LATE_SOL] = sizeof(uint8_t), [0xff] = 0, }; @@ -670,6 +677,11 @@ static int eventlog_print_data(const struct event_header *event) eventlog_printf("%s", *fw_splash_screen_event ? "Enabled" : "Disabled"); break; } + case ELOG_TYPE_FW_LATE_SOL: { + const uint8_t *sol_event = event_get_data(event); + eventlog_printf("%s", val2str(*sol_event, late_sol_path_types)); + break; + } default: break; } -- cgit v1.2.3