From bf1e48194494b52a06945490a4fbf322059e7ebd Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 10 May 2016 15:12:08 -0500 Subject: lib: remove FLASHMAP_OFFSET config variable The FLASHMAP_OFFSET config variable is used in lib/fmap.c, however the fmdtool creates a fmap_config.h with a FMAP_OFFSET #define. Those 2 values are not consistent. Therefore, remove the Kconfig variable and defer to the #define generated by fmdtool. Change-Id: Ib4ecbc429e142b3e250106eea59fea1caa222917 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/14765 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Leroy P Leahy --- src/lib/Makefile.inc | 7 +++++++ src/lib/fmap.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 4c6a395efc..734b517b01 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -186,6 +186,13 @@ $(call src-to-obj,smm,$(dir)/cbfs.c) : $(obj)/fmap_config.h $(call src-to-obj,verstage,$(dir)/cbfs.c) : $(obj)/fmap_config.h $(call src-to-obj,postcar,$(dir)/cbfs.c) : $(obj)/fmap_config.h +$(call src-to-obj,bootblock,$(dir)/fmap.c) : $(obj)/fmap_config.h +$(call src-to-obj,romstage,$(dir)/fmap.c) : $(obj)/fmap_config.h +$(call src-to-obj,ramstage,$(dir)/fmap.c) : $(obj)/fmap_config.h +$(call src-to-obj,smm,$(dir)/fmap.c) : $(obj)/fmap_config.h +$(call src-to-obj,verstage,$(dir)/fmap.c) : $(obj)/fmap_config.h +$(call src-to-obj,postcar,$(dir)/fmap.c) : $(obj)/fmap_config.h + romstage-y += bootmode.c ramstage-y += bootmode.c verstage-y += bootmode.c diff --git a/src/lib/fmap.c b/src/lib/fmap.c index 54e54ba6b7..bf99037f54 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -21,6 +21,8 @@ #include #include +#include "fmap_config.h" + /* * See http://code.google.com/p/flashmap/ for more information on FMAP. */ @@ -32,7 +34,7 @@ int find_fmap_directory(struct region_device *fmrd) const struct region_device *boot; struct fmap *fmap; size_t fmap_size; - size_t offset = CONFIG_FLASHMAP_OFFSET; + size_t offset = FMAP_OFFSET; boot_device_init(); boot = boot_device_ro(); -- cgit v1.2.3