Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37033 )
Change subject: lib/fmap.c: Drop CAR_GLOBAL_MIGRATION support ......................................................................
lib/fmap.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: Ibf80d3e37f702c75c30394a14ce0a91af84a6b93 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/lib/fmap.c 1 file changed, 6 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/37033/1
diff --git a/src/lib/fmap.c b/src/lib/fmap.c index 48aab8f..1a2a5ea 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -29,8 +29,8 @@ * See http://code.google.com/p/flashmap/ for more information on FMAP. */
-static int fmap_print_once CAR_GLOBAL; -static struct mem_region_device fmap_cache CAR_GLOBAL; +static int fmap_print_once; +static struct mem_region_device fmap_cache;
#define print_once(...) do { \ if (!car_get_var(fmap_print_once)) \ @@ -114,15 +114,13 @@ { const struct region_device *boot; struct fmap *fmap; - struct mem_region_device *cache; size_t offset = FMAP_OFFSET;
/* Try FMAP cache first */ - cache = car_get_var_ptr(&fmap_cache); - if (!region_device_sz(&cache->rdev)) + if (!region_device_sz(&fmap_cache.rdev)) setup_preram_cache(cache); - if (region_device_sz(&cache->rdev)) - return rdev_chain_full(fmrd, &cache->rdev); + if (region_device_sz(&fmap_cache.rdev)) + return rdev_chain_full(fmrd, &fmap_cache.rdev);
boot_device_init(); boot = boot_device_ro(); @@ -277,9 +275,6 @@ static void fmap_register_cbmem_cache(int unused) { const struct cbmem_entry *e; - struct mem_region_device *mdev; - - mdev = car_get_var_ptr(&fmap_cache);
/* Find the FMAP cache installed by previous stage */ e = cbmem_entry_find(CBMEM_ID_FMAP); @@ -287,7 +282,7 @@ if (!e) return;
- mem_region_device_ro_init(mdev, cbmem_entry_start(e), cbmem_entry_size(e)); + mem_region_device_ro_init(&fmap_cache, cbmem_entry_start(e), cbmem_entry_size(e)); }
/*