From 1d2aed2367b83cd2a0651fa85756c5f394c136f9 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Mon, 18 Dec 2017 16:01:49 +0800 Subject: drivers/mrc_cache: only add mrc.cache when CACHE_MRC_SETTINGS is set In commit decd0628 (drivers/mrc_cache: move mrc_cache support to drivers) mrc.cache is always added, but CONFIG_MRC_SETTINGS_CACHE_SIZE is not used in Sandy Bridge, which makes mrc.cache have zero size and the machine will fail to boot after the first boot. Change-Id: Iab3ac87e43408ef51f0158f319eb1c8ccfce8a55 Signed-off-by: Iru Cai Reviewed-on: https://review.coreboot.org/22925 Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/drivers/mrc_cache/Makefile.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/drivers/mrc_cache/Makefile.inc b/src/drivers/mrc_cache/Makefile.inc index 819d637e4f..7c8732fb73 100644 --- a/src/drivers/mrc_cache/Makefile.inc +++ b/src/drivers/mrc_cache/Makefile.inc @@ -1,6 +1,7 @@ +ifeq ($(CONFIG_CACHE_MRC_SETTINGS),y) -romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c -ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c +romstage-y += mrc_cache.c +ramstage-y += mrc_cache.c # Create and add the MRC cache to the cbfs image ifneq ($(CONFIG_CHROMEOS),y) @@ -9,8 +10,10 @@ $(obj)/mrc.cache: $(obj)/config.h bs=$(shell printf "%d" $(CONFIG_MRC_SETTINGS_CACHE_SIZE) ) | \ tr '\000' '\377' > $@ -cbfs-files-$(CONFIG_CACHE_MRC_SETTINGS) += mrc.cache +cbfs-files-y += mrc.cache mrc.cache-file := $(obj)/mrc.cache mrc.cache-position := $(CONFIG_MRC_SETTINGS_CACHE_BASE) mrc.cache-type := mrc_cache -endif +endif # ifneq ($(CONFIG_CHROMEOS),y) + +endif # ifeq ($(CONFIG_CACHE_MRC_SETTINGS),y) -- cgit v1.2.3