soc/intel/pantherlake: Centralize FSP-M eSOL UX with common APIs

Refactor the FSP-M early Sign-of-Life (eSOL) implementation to utilize
the UX APIs defined in `ux.c`.

This eliminates redundant code and ensures consistent messaging during
critical boot phases, such as memory training.

BUG=b:339673254
TEST=Verified eSOL message over eDP while booting google/fatcat.

Change-Id: Icf22c39c21e2357b2a548398700a1488f4ef463a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86592
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Subrata Banik 2025-02-25 13:37:37 +05:30
commit 2f57986700

View file

@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootmode.h>
#include <cpu/intel/common/common.h>
#include <cpu/x86/msr.h>
#include <elog.h>
@ -13,7 +12,8 @@
#include <soc/pcie.h>
#include <soc/romstage.h>
#include <static.h>
#include <ux_locales.h>
#include "ux.h"
#define FSP_CLK_NOTUSED 0xff
#define FSP_CLK_LAN 0x70
@ -360,31 +360,16 @@ static void fill_fsp_event_handler(FSPM_UPD *mupd)
static void fill_fspm_sign_of_life(FSPM_UPD *mupd)
{
FSP_M_CONFIG *m_cfg = &mupd->FspmConfig;
FSPM_ARCHx_UPD *arch_upd = &mupd->FspmArchUpd;
void *vbt;
size_t vbt_size;
if (arch_upd->NvsBufferPtr)
return;
/* To enhance the user experience, let's display on-screen guidance during memory
training, acknowledging that the process may require patience. */
vbt = cbfs_map("vbt.bin", &vbt_size);
if (!vbt) {
printk(BIOS_ERR, "Could not load vbt.bin\n");
return;
}
printk(BIOS_INFO, "Enabling FSP-M Sign-of-Life\n");
elog_add_event_byte(ELOG_TYPE_FW_EARLY_SOL, ELOG_FW_EARLY_SOL_MRC);
m_cfg->VgaInitControl = 1;
m_cfg->VbtPtr = (efi_uintn_t)vbt;
m_cfg->VbtSize = vbt_size;
m_cfg->LidStatus = CONFIG(VBOOT_LID_SWITCH) ? get_lid_switch() : CONFIG(RUN_FSP_GOP);
m_cfg->VgaMessage = (efi_uintn_t)ux_locales_get_text(UX_LOCALE_MSG_MEMORY_TRAINING);
ux_inform_user_of_update_operation("memory training", mupd);
}
void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)