soc/intel/xeon_sp/gnr: Support fast boot
Fast boot will used pre-saved hardware configuration data to accelerate the boot process, e.g. DDR training is skipped by using pre-saved training data. Enable fast boot on cold and warm resets by default. Change-Id: Ib5dc76176b16ea1be5dd9b05a375c9179411f590 Signed-off-by: Gang Chen <gang.c.chen@intel.com> Signed-off-by: Shuo Liu <shuo.liu@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82080 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
committed by
Lean Sheng Tan
parent
409860687b
commit
cae81a5674
@@ -6,3 +6,8 @@ __weak enum xeonsp_cxl_mode get_cxl_mode(void)
|
||||
{
|
||||
return XEONSP_CXL_DISABLED;
|
||||
}
|
||||
|
||||
__weak enum xeonsp_fast_boot_mode get_fast_boot_mode(void)
|
||||
{
|
||||
return XEONSP_FAST_BOOT_COLD | XEONSP_FAST_BOOT_WARM;
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <console/console.h>
|
||||
#include <soc/config.h>
|
||||
#include <soc/romstage.h>
|
||||
|
||||
static uint8_t get_mmcfg_base_upd_index(const uint64_t base_addr)
|
||||
@@ -48,6 +50,19 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
|
||||
m_cfg->mmCfgBase = get_mmcfg_base_upd_index(CONFIG_ECAM_MMCONF_BASE_ADDRESS);
|
||||
m_cfg->mmCfgSize = get_mmcfg_size_upd_index(CONFIG_ECAM_MMCONF_LENGTH);
|
||||
|
||||
/* fast boot setting */
|
||||
int fast_boot_mode = get_fast_boot_mode();
|
||||
m_cfg->AttemptFastBoot = !!(fast_boot_mode & XEONSP_FAST_BOOT_WARM);
|
||||
m_cfg->AttemptFastBootCold = !!(fast_boot_mode & XEONSP_FAST_BOOT_COLD);
|
||||
|
||||
FSPM_ARCH2_UPD *arch_upd = &mupd->FspmArchUpd;
|
||||
if (fast_boot_mode == XEONSP_FAST_BOOT_DISABLED) {
|
||||
arch_upd->BootMode =
|
||||
FSP_BOOT_WITH_FULL_CONFIGURATION;
|
||||
printk(BIOS_NOTICE, "Reset BootMode as "
|
||||
"FSP_BOOT_WITH_FULL_CONFIGURATION.\n");
|
||||
}
|
||||
|
||||
/* Board level settings */
|
||||
mainboard_memory_init_params(mupd);
|
||||
}
|
||||
|
@@ -11,4 +11,12 @@ enum xeonsp_cxl_mode {
|
||||
|
||||
enum xeonsp_cxl_mode get_cxl_mode(void);
|
||||
|
||||
enum xeonsp_fast_boot_mode {
|
||||
XEONSP_FAST_BOOT_DISABLED = 0x0,
|
||||
XEONSP_FAST_BOOT_COLD = 0x1,
|
||||
XEONSP_FAST_BOOT_WARM = 0x2,
|
||||
};
|
||||
|
||||
enum xeonsp_fast_boot_mode get_fast_boot_mode(void);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user