summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/northbridge/intel/sandybridge/Makefile.inc10
-rw-r--r--src/northbridge/intel/sandybridge/mrccache.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/src/northbridge/intel/sandybridge/Makefile.inc b/src/northbridge/intel/sandybridge/Makefile.inc
index 01b328b4bf..1428bdbd9e 100644
--- a/src/northbridge/intel/sandybridge/Makefile.inc
+++ b/src/northbridge/intel/sandybridge/Makefile.inc
@@ -43,4 +43,14 @@ mrc.bin-position := 0xfffe0000
endif
mrc.bin-type := 0xab
+$(obj)/mrc.cache:
+ dd if=/dev/zero count=1 \
+ bs=$(shell printf "%d" $(CONFIG_MRC_CACHE_SIZE) ) | \
+ tr '\000' '\377' > $@
+
+cbfs-files-$(CONFIG_HAVE_MRC) += mrc.cache
+mrc.cache-file := $(obj)/mrc.cache
+mrc.cache-position := 0xfff80000
+mrc.cache-type := 0xac
+
$(obj)/northbridge/intel/sandybridge/acpi.ramstage.o : $(obj)/build.h
diff --git a/src/northbridge/intel/sandybridge/mrccache.c b/src/northbridge/intel/sandybridge/mrccache.c
index 745958abe9..e19d2c5a8d 100644
--- a/src/northbridge/intel/sandybridge/mrccache.c
+++ b/src/northbridge/intel/sandybridge/mrccache.c
@@ -71,8 +71,8 @@ static u32 get_mrc_cache_region(struct mrc_data_container **mrc_region_ptr)
region_size = find_fmap_entry("RW_MRC_CACHE", (void **)mrc_region_ptr);
#else
region_size = CONFIG_MRC_CACHE_SIZE;
- *mrc_region_ptr = (struct mrc_data_container *)
- (CONFIG_MRC_CACHE_BASE + CONFIG_MRC_CACHE_LOCATION);
+ *mrc_region_ptr = cbfs_get_file_content(CBFS_DEFAULT_MEDIA,
+ "mrc.cache", 0xac);
#endif
return region_size;