diff options
author | Julius Werner <jwerner@chromium.org> | 2019-12-04 20:32:15 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-12-11 11:42:26 +0000 |
commit | 8245bd25a35466248c00bc7a4d0cf96f8391924a (patch) | |
tree | 5e3cc97038c161661fdaa0015ad37f1d73f4219c /src/lib | |
parent | ad27283a3c777f288254974cac233e47d1c0005d (diff) | |
download | coreboot-8245bd25a35466248c00bc7a4d0cf96f8391924a.tar.xz |
fmap: Make FMAP_CACHE mandatory if it is configured in
Now that we have a CONFIG_NO_FMAP_CACHE to completely configure out the
pre-RAM FMAP cache code, there's no point in allowing the region to be
optional anymore. This patch makes the section required by the linker.
If a board doesn't want to provide it, it has to select NO_FMAP_CACHE.
Adding FMAP_CACHE regions to a couple more targets that I think can use
them but I don't know anything about... please yell if one of these is
a bad idea and I should mark them NO_FMAP_CACHE instead.
Change-Id: Ic7d47772ab3abfa7e3a66815c3739d0af071abc2
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/fmap.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/lib/fmap.c b/src/lib/fmap.c index af26152d13..9d2b4e781f 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -36,8 +36,6 @@ static struct mem_region_device fmap_cache; printk(__VA_ARGS__); \ } while (0) -DECLARE_OPTIONAL_REGION(fmap_cache); - uint64_t get_fmap_flash_offset(void) { return FMAP_OFFSET; @@ -71,14 +69,6 @@ static void setup_preram_cache(struct mem_region_device *cache_mrdev) return; } - if (REGION_SIZE(fmap_cache) == 0) { - /* If you see this you should add FMAP_CACHE() to your memlayout - (or select NO_FMAP_CACHE if you can't afford the 2K). */ - print_once(BIOS_ERR, - "ERROR: FMAP_CACHE enabled but no region provided!\n"); - return; - } - struct fmap *fmap = (struct fmap *)_fmap_cache; if (!ENV_BOOTBLOCK) { /* NOTE: This assumes that for all platforms running this code, |