Attention is currently required from: Eran Mitrani, Kapil Porwal, Subrata Banik, Tarun.
Jérémy Compostella has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78244?usp=email )
Change subject: soc/intel/mtl: Display Sign-of-Life message during memory training ......................................................................
soc/intel/mtl: Display Sign-of-Life message during memory training
Meteor Lake FSP-M, compiled with the appropriate option, allows to display a text message on screen.
When the newly introduced SOC_INTEL_METEORLAKE_SIGN_OF_LIFE flag is set coreboot configures the appropriate UPD to display a text message during memory training.
BUG=b:279173035 TEST=Text message is displayed during memory training on rex
Change-Id: I8e7772582b1895fa8e38780932346683be998558 Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com --- M src/soc/intel/meteorlake/Kconfig M src/soc/intel/meteorlake/romstage/fsp_params.c 2 files changed, 48 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/78244/1
diff --git a/src/soc/intel/meteorlake/Kconfig b/src/soc/intel/meteorlake/Kconfig index 48030a1..032d533 100644 --- a/src/soc/intel/meteorlake/Kconfig +++ b/src/soc/intel/meteorlake/Kconfig @@ -451,4 +451,10 @@ int default 161
+config SOC_INTEL_METEORLAKE_SIGN_OF_LIFE + bool "Enable FSP-M Sign-of-Life feature" + select VBT_CBFS_COMPRESSION_DEFAULT_LZ4 + help + Enable the FSP-M Sign-of-Life feature which display a + configurable text message on screen during Memory training. endif diff --git a/src/soc/intel/meteorlake/romstage/fsp_params.c b/src/soc/intel/meteorlake/romstage/fsp_params.c index d53a0d4..8979a18 100644 --- a/src/soc/intel/meteorlake/romstage/fsp_params.c +++ b/src/soc/intel/meteorlake/romstage/fsp_params.c @@ -22,6 +22,7 @@ #include <soc/soc_chip.h> #include <soc/soc_info.h> #include <string.h> +#include <ux_locales.h>
#define FSP_CLK_NOTUSED 0xFF #define FSP_CLK_LAN 0x70 @@ -384,6 +385,46 @@ fill_fspm_params[i](m_cfg, config); }
+#define UX_MEMORY_TRAINING_DESC "memory_training_desc" + +#define VGA_INIT_CONTROL_ENABLE BIT(0) +/* Tear down legacy VGA mode before exiting FSP-M. */ +#define VGA_INIT_CONTROL_TEAR_DOWN BIT(1) + +static void fill_fspm_sign_of_life(FSP_M_CONFIG *m_cfg, + FSPM_ARCH_UPD *arch_upd) +{ + size_t vbt_size; + static char vbt[CONFIG_VBT_DATA_SIZE_KB * KiB]; + + if (!CONFIG(SOC_INTEL_METEORLAKE_SIGN_OF_LIFE)) + return; + + /* No memory training. */ + if (arch_upd->NvsBufferPtr) + return; + + const char *text = ux_locales_get_text(UX_MEMORY_TRAINING_DESC); + /* No localized text found; fallback to built-in English. */ + if (!text) + text = "Your device is finishing an update. " + "This may take 1-2 minutes.\n" + "Please do not turn off your device."; + + vbt_size = cbfs_load("vbt.bin", vbt, sizeof(vbt)); + if (!vbt_size) { + printk(BIOS_ERR, "Could not load vbt.bin\n"); + return; + } + + m_cfg->VgaInitControl = VGA_INIT_CONTROL_ENABLE \ + | VGA_INIT_CONTROL_TEAR_DOWN; + m_cfg->VbtPtr = (UINT32)vbt; + m_cfg->VbtSize = vbt_size; + m_cfg->LidStatus = 1; + m_cfg->VgaMessage = (UINT32)text; +} + void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version) { const struct soc_intel_meteorlake_config *config; @@ -409,6 +450,7 @@ config = config_of_soc();
soc_memory_init_params(m_cfg, config); + fill_fspm_sign_of_life(m_cfg, arch_upd); mainboard_memory_init_params(mupd); }