util/cbfstool: Add eventLog support for ELOG_TYPE_FW_SPLASH_SCREEN

This patch adds support for logging the firmware splash screen event
to the event log. There could be two possible scenarios for this
event: enabled and disabled.

BUG=b:284799726
TEST=Verify that the event shows up in the event log when the user
selects the HAVE_FSP_LOGO_SUPPORT and BMP_LOGO configs to display
the firmware splash screen.

Change-Id: I1e224903df21159d6eef2849a7d6fb05de09f543
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Subrata Banik
2023-08-27 21:03:43 +00:00
parent 679b9af626
commit 1cfb28612e

View File

@@ -168,6 +168,7 @@ static void eventlog_print_type(const struct event_header *event)
{ELOG_TYPE_FW_EARLY_SOL, "Early Sign of Life"},
{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_EOL, "End of log"},
};
@@ -500,6 +501,7 @@ static int eventlog_print_data(const struct event_header *event)
[ELOG_TYPE_FW_VBOOT_INFO] = sizeof(uint16_t),
[ELOG_TYPE_FW_EARLY_SOL] = sizeof(uint8_t),
[ELOG_TYPE_PSR_DATA_BACKUP] = sizeof(uint8_t),
[ELOG_TYPE_FW_SPLASH_SCREEN] = sizeof(uint8_t),
[0xff] = 0,
};
@@ -661,6 +663,11 @@ static int eventlog_print_data(const struct event_header *event)
eventlog_printf("%s", val2str(*psr_backup_event, psr_data_backup_statuses));
break;
}
case ELOG_TYPE_FW_SPLASH_SCREEN: {
const uint8_t *fw_splash_screen_event = event_get_data(event);
eventlog_printf("%s", *fw_splash_screen_event ? "Enabled" : "Disabled");
break;
}
default:
break;
}