summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorTarun Tuli <taruntuli@google.com>2023-01-31 18:24:38 +0000
committerJulius Werner <jwerner@chromium.org>2023-02-02 21:44:13 +0000
commit5044dc48f34dfd7f0ff08363b2155e27b2f71830 (patch)
tree83878e7a56ada63716fb00801699f7743542b6db /util
parent0b40ea2f6e7218b062e019f0270166e6230ff786 (diff)
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>
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/eventlog.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/util/cbfstool/eventlog.c b/util/cbfstool/eventlog.c
index 0ab8930548..058a3f7c0d 100644
--- a/util/cbfstool/eventlog.c
+++ b/util/cbfstool/eventlog.c
@@ -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;
}