Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/71296 )
Change subject: util/cbfstool: Add eventLog support for ELOG_TYPE_FW_EARLY_SOL ......................................................................
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 --- M util/cbfstool/eventlog.c 1 file changed, 36 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved Nick Vaccaro: Looks good to me, approved Subrata Banik: Looks good to me, approved Jérémy Compostella: Looks good to me, but someone else must approve
diff --git a/util/cbfstool/eventlog.c b/util/cbfstool/eventlog.c index 0ab8930..058a3f7 100644 --- a/util/cbfstool/eventlog.c +++ b/util/cbfstool/eventlog.c @@ -159,7 +159,7 @@ {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 @@ {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 @@ [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 @@ 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; }