coreboot-kgpe-d16/src/mainboard/google/volteer
Shelley Chen 6615c6eaf7 mrc_cache: Move code for triggering memory training into mrc_cache
Currently the decision of whether or not to use mrc_cache in recovery
mode is made within the individual platforms' drivers (ie: fsp2.0,
fsp1.1, etc.).  As this is not platform specific, but uses common
vboot infrastructure, the code can be unified and moved into
mrc_cache.  The conditions are as follows:

  1.  If HAS_RECOVERY_MRC_CACHE, use mrc_cache data (unless retrain
      switch is true)
  2.  If !HAS_RECOVERY_MRC_CACHE && VBOOT_STARTS_IN_BOOTBLOCK, this
      means that memory training will occur after verified boot,
      meaning that mrc_cache will be filled with data from executing
      RW code.  So in this case, we never want to use the training
      data in the mrc_cache for recovery mode.
  3.  If !HAS_RECOVERY_MRC_CACHE && VBOOT_STARTS_IN_ROMSTAGE, this
      means that memory training happens before verfied boot, meaning
      that the mrc_cache data is generated by RO code, so it is safe
      to use for a recovery boot.
  4.  Any platform that does not use vboot should be unaffected.

Additionally, we have removed the
MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN config because the
mrc_cache driver takes care of invalidating the mrc_cache data for
normal mode.  If the platform:
  1.  !HAS_RECOVERY_MRC_CACHE, always invalidate mrc_cache data
  2.  HAS_RECOVERY_MRC_CACHE, only invalidate if retrain switch is set

BUG=b:150502246
BRANCH=None
TEST=1. run dut-control power_state:rec_force_mrc twice on lazor
        ensure that memory retraining happens both times
        run dut-control power_state:rec twice on lazor
        ensure that memory retraining happens only first time
     2. remove HAS_RECOVERY_MRC_CACHE from lazor Kconfig
        boot twice to ensure caching of memory training occurred
	on each boot.

Change-Id: I3875a7b4a4ba3c1aa8a3c1507b3993036a7155fc
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46855
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-13 22:57:50 +00:00
..
spd mb: remove duplicated Make code for spd.bin generation 2020-09-06 14:57:06 +00:00
variants mb/google/volteer/variant/lindar: Update devicetree settings 2020-11-13 22:50:13 +00:00
board_info.txt
bootblock.c src: Remove extra lines in license header 2020-07-26 20:57:18 +00:00
chromeos.c src: Remove extra lines in license header 2020-07-26 20:57:18 +00:00
chromeos.fmd mb/google/volteer: Update flashmap descriptor for CSE Lite FW update 2020-08-30 22:06:39 +00:00
dsdt.asl {src/mb,util/autoport}: Use macro for DSDT revision 2020-10-13 18:27:04 +00:00
ec.c src: Remove extra lines in license header 2020-07-26 20:57:18 +00:00
fw_config.c mb/google/volteer: Add firmware configuration for MAX98373_ALC5682I_I2S_UP4 2020-09-21 08:06:38 +00:00
Kconfig mrc_cache: Move code for triggering memory training into mrc_cache 2020-11-13 22:57:50 +00:00
Kconfig.name soc/intel/tigerlake: Update Kconfig for NEM Enhanced Mode 2020-11-11 20:18:58 +00:00
mainboard.asl src: Remove extra lines in license header 2020-07-26 20:57:18 +00:00
mainboard.c mb/google/volteer: Skip TPM detection except on SPI 2020-11-09 07:24:54 +00:00
Makefile.inc mb/google/volteer: Switch to using auto-generated SPDs 2020-06-06 09:29:29 +00:00
romstage.c mb/google/volteer: disable TBT if no USB4 hardware available 2020-10-08 15:30:28 +00:00
smihandler.c mb/google/volteer: Log EC events in case of S0ix resume 2020-11-03 23:58:55 +00:00