From 80db7cdae04bb2a5c47035c3a0ad3bb5b6380d6b Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 25 Feb 2025 13:10:23 +0530 Subject: [PATCH] soc/intel/pantherlake: Add early shutdown notification hook This commit display UX message for low-battery shutdown using platform_display_early_shutdown_notification(). This commit also enables the HAVE_ESOL_SUPPORT_FOR_LOW_BATTERY_INDICATOR Kconfig option, which is required for displaying the VGA text message during early shutdown. BUG=b:339673254 TEST=Verified low battery boot event logging and controlled shutdown. Change-Id: I45c0fb07b984fcde6209631612cb8b4a08ac2041 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/86476 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Jayvik Desai --- src/soc/intel/pantherlake/Kconfig | 1 + src/soc/intel/pantherlake/romstage/fsp_params.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/soc/intel/pantherlake/Kconfig b/src/soc/intel/pantherlake/Kconfig index a54f0defe5..fc8664a927 100644 --- a/src/soc/intel/pantherlake/Kconfig +++ b/src/soc/intel/pantherlake/Kconfig @@ -22,6 +22,7 @@ config SOC_INTEL_PANTHERLAKE_BASE select FSPS_HAS_ARCH_UPD select GENERIC_GPIO_LIB select HAVE_DEBUG_RAM_SETUP + select HAVE_ESOL_SUPPORT_FOR_LOW_BATTERY_INDICATOR if CHROMEOS_ENABLE_ESOL select HAVE_FSP_GOP select HAVE_FSP_LOGO_SUPPORT if RUN_FSP_GOP select HAVE_HYPERTHREADING diff --git a/src/soc/intel/pantherlake/romstage/fsp_params.c b/src/soc/intel/pantherlake/romstage/fsp_params.c index a8f86a8e56..93c8777d82 100644 --- a/src/soc/intel/pantherlake/romstage/fsp_params.c +++ b/src/soc/intel/pantherlake/romstage/fsp_params.c @@ -289,6 +289,14 @@ static void fill_fspm_vr_config_params(FSP_M_CONFIG *m_cfg, m_cfg->EnableFastVmode[i] = 0; } +#if CONFIG(PLATFORM_HAS_EARLY_LOW_BATTERY_INDICATOR) +void platform_display_early_shutdown_notification(void *arg) +{ + FSPM_UPD *mupd = arg; + ux_inform_user_of_poweroff_operation("low-battery shutdown", mupd); +} +#endif + static void soc_memory_init_params(FSP_M_CONFIG *m_cfg, const struct soc_intel_pantherlake_config *config) {