Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17165
-gerrit
commit 8dc96256bb9d132cd7301c95bafe8050000c49c0
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Thu Oct 27 10:12:22 2016 -0700
drivers/intel/fsp2_0: Allow use of MRC cache data in recovery
Add a configuration option to allow using MRC cache in recovery
boot, off by default. This can be overridden by Chrome EC if it
requests retrain.
BUG=chrome-os-partner:56643
BRANCH=none
TEST=invoke power-alt-refresh key combination, notice memory is retrained
in recovery
Change-Id: I31a87afc8a70c17e488c06e42da4acbb2dde3f5d
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/drivers/intel/fsp2_0/Kconfig | 7 +++++++
src/drivers/intel/fsp2_0/memory_init.c | 9 +++++++--
src/soc/intel/apollolake/Kconfig | 4 ++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index c653148..75e3901 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -94,4 +94,11 @@ config RESET_ON_INVALID_RAMSTAGE_CACHE
bool "Reset the system on S3 wake when ramstage cache invalid."
default n
+config FSP_RECOVERY_USE_MRCCACHE
+ bool "Use MRC cache in recovery boot"
+ depends on CACHE_MRC_SETTINGS
+ default n
+ help
+ Select yes if you want recovery boot to use MRC cache.
+
endif
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index d0a22ce..70379c3 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -113,12 +113,17 @@ static void fsp_fill_mrc_cache(FSPM_ARCH_UPD *arch_upd, bool s3wake,
if (!IS_ENABLED(CONFIG_CACHE_MRC_SETTINGS))
return;
- /* Don't use saved training data when recovery mode is enabled. */
- if (vboot_recovery_mode_enabled()) {
+ if (!IS_ENABLED(CONFIG_FSP_RECOVERY_USE_MRCCACHE)) {
printk(BIOS_SPEW, "Recovery mode. Not using MRC cache.\n");
return;
}
+ /* If recovery with full retrain is requested do not load cache */
+ if (vboot_recovery_mode_memory_retrain()) {
+ printk(BIOS_SPEW, "Recovery with forced memory retrain.\n");
+ return;
+ }
+
if (mrc_cache_get_current_with_version(&mrc_cache, fsp_version)) {
printk(BIOS_SPEW, "MRC cache was not found\n");
return;
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 187214a..b6fbcb4 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -260,4 +260,8 @@ config SMM_RESERVED_SIZE
hex
default 0x100000
+config CONFIG_FSP_RECOVERY_USE_MRCCACHE
+ bool
+ default y
+
endif
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17165
-gerrit
commit bb40003680503b4301d569eff898fc7e6b4fac0f
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Thu Oct 27 10:12:22 2016 -0700
drivers/intel/fsp2_0: Allow use of MRC cache data in recovery
Add a configuration option to allow using MRC cache in recovery
boot, off by default. This can be overridden by Chrome EC if it
requests retrain.
BUG=chrome-os-partner:56643
BRANCH=none
TEST=invoke power-alt-refresh key combination, notice memory is retrained
in recovery
Change-Id: I31a87afc8a70c17e488c06e42da4acbb2dde3f5d
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/drivers/intel/fsp2_0/Kconfig | 7 +++++++
src/drivers/intel/fsp2_0/memory_init.c | 9 +++++++--
src/soc/intel/apollolake/Kconfig | 4 ++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index c653148..75e3901 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -94,4 +94,11 @@ config RESET_ON_INVALID_RAMSTAGE_CACHE
bool "Reset the system on S3 wake when ramstage cache invalid."
default n
+config FSP_RECOVERY_USE_MRCCACHE
+ bool "Use MRC cache in recovery boot"
+ depends on CACHE_MRC_SETTINGS
+ default n
+ help
+ Select yes if you want recovery boot to use MRC cache.
+
endif
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index d0a22ce..70379c3 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -113,12 +113,17 @@ static void fsp_fill_mrc_cache(FSPM_ARCH_UPD *arch_upd, bool s3wake,
if (!IS_ENABLED(CONFIG_CACHE_MRC_SETTINGS))
return;
- /* Don't use saved training data when recovery mode is enabled. */
- if (vboot_recovery_mode_enabled()) {
+ if (!IS_ENABLED(CONFIG_FSP_RECOVERY_USE_MRCCACHE)) {
printk(BIOS_SPEW, "Recovery mode. Not using MRC cache.\n");
return;
}
+ /* If recovery with full retrain is requested do not load cache */
+ if (vboot_recovery_mode_memory_retrain()) {
+ printk(BIOS_SPEW, "Recovery with forced memory retrain.\n");
+ return;
+ }
+
if (mrc_cache_get_current_with_version(&mrc_cache, fsp_version)) {
printk(BIOS_SPEW, "MRC cache was not found\n");
return;
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 187214a..b6fbcb4 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -260,4 +260,8 @@ config SMM_RESERVED_SIZE
hex
default 0x100000
+config CONFIG_FSP_RECOVERY_USE_MRCCACHE
+ bool
+ default y
+
endif
the following patch was just integrated into master:
commit 46dd467648564a48cd40de8ffb75270197c19f0c
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Tue Oct 25 17:11:16 2016 +0200
Do not select SEABIOS_VGA_COREBOOT by default when building for QEMU
On QEMU using SeaVGABIOS breaks some bootloaders, e.g. ISOLINUX does not
work and GRUB works but is forced in txtmode, instead of graphical mode.
Change-Id: If31d4e5ed19cbeed3f8f9dbc23cc738dd55986e5
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17122
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/17122 for details.
-gerrit