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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14765
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
This commit is contained in:
Aaron Durbin 2016-05-10 15:12:08 -05:00
parent 044e4b5745
commit bf1e481944
8 changed files with 11 additions and 28 deletions

View File

@ -65,7 +65,6 @@
<li>Configure coreboot build: <li>Configure coreboot build:
<ol type="A"> <ol type="A">
<li>Set LOCALVERSION</li> <li>Set LOCALVERSION</li>
<li>FLASHMAP_OFFSET = 0x00700000</li>
<li>Select vendor for the board</li> <li>Select vendor for the board</li>
<li>Select the board</li> <li>Select the board</li>
<li>CBFS_SIZE = 0x00100000</li> <li>CBFS_SIZE = 0x00100000</li>

View File

@ -269,15 +269,6 @@ config NO_STAGE_CACHE
Do not save any component in stage cache for resume path. On resume, Do not save any component in stage cache for resume path. On resume,
all components would be read back from CBFS again. all components would be read back from CBFS again.
config FLASHMAP_OFFSET
hex "Flash Map Offset"
default 0x00670000 if NORTHBRIDGE_INTEL_SANDYBRIDGE
default 0x00610000 if NORTHBRIDGE_INTEL_IVYBRIDGE
default CBFS_SIZE if !ARCH_X86
default 0
help
Offset of flash map in firmware image
# TODO: This doesn't belong here, move to src/arch/x86/Kconfig # TODO: This doesn't belong here, move to src/arch/x86/Kconfig
choice choice
prompt "Bootblock behaviour" prompt "Bootblock behaviour"

View File

@ -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,verstage,$(dir)/cbfs.c) : $(obj)/fmap_config.h
$(call src-to-obj,postcar,$(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 romstage-y += bootmode.c
ramstage-y += bootmode.c ramstage-y += bootmode.c
verstage-y += bootmode.c verstage-y += bootmode.c

View File

@ -21,6 +21,8 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "fmap_config.h"
/* /*
* See http://code.google.com/p/flashmap/ for more information on FMAP. * 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; const struct region_device *boot;
struct fmap *fmap; struct fmap *fmap;
size_t fmap_size; size_t fmap_size;
size_t offset = CONFIG_FLASHMAP_OFFSET; size_t offset = FMAP_OFFSET;
boot_device_init(); boot_device_init();
boot = boot_device_ro(); boot = boot_device_ro();

View File

@ -82,10 +82,6 @@ config EC_GOOGLE_CHROMEEC_SPI_BUS
hex hex
default 1 default 1
config FLASHMAP_OFFSET
hex
default 0x00100000
config DRIVER_TPM_I2C_BUS config DRIVER_TPM_I2C_BUS
hex hex
default 0x2 default 0x2

View File

@ -83,10 +83,6 @@ config EC_GOOGLE_CHROMEEC_SPI_BUS
hex hex
default 1 default 1
config FLASHMAP_OFFSET
hex
default 0x00100000
config DRIVER_TPM_I2C_BUS config DRIVER_TPM_I2C_BUS
hex hex
default 0x2 default 0x2

View File

@ -84,10 +84,6 @@ config EC_GOOGLE_CHROMEEC_SPI_BUS
hex hex
default 1 default 1
config FLASHMAP_OFFSET
hex
default 0x00100000
config DRIVER_TPM_I2C_BUS config DRIVER_TPM_I2C_BUS
hex hex
default 0x2 default 0x2

View File

@ -46,10 +46,6 @@ config IFD_BIOS_START
hex hex
default 0x1000 default 0x1000
config FLASHMAP_OFFSET
hex
default 0x200000
config MAX_CPUS config MAX_CPUS
int int
default 8 default 8