Patrick Georgi has submitted this change. ( 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/37033 Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Patrick Georgi pgeorgi@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/lib/fmap.c 1 file changed, 9 insertions(+), 15 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved HAOUAS Elyes: Looks good to me, but someone else must approve
diff --git a/src/lib/fmap.c b/src/lib/fmap.c index 48aab8f..af26152 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <boot_device.h> #include <cbmem.h> #include <console/console.h> @@ -29,11 +28,11 @@ * 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)) \ + if (!fmap_print_once) \ printk(__VA_ARGS__); \ } while (0)
@@ -55,7 +54,7 @@ fmap->name, fmap->ver_major, fmap->ver_minor, FMAP_OFFSET); print_once(BIOS_DEBUG, "FMAP: base = %#llx size = %#x #areas = %d\n", (long long)fmap->base, fmap->size, fmap->nareas); - car_set_var(fmap_print_once, 1); + fmap_print_once = 1; }
static void setup_preram_cache(struct mem_region_device *cache_mrdev) @@ -114,15 +113,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)) - setup_preram_cache(cache); - if (region_device_sz(&cache->rdev)) - return rdev_chain_full(fmrd, &cache->rdev); + if (!region_device_sz(&fmap_cache.rdev)) + setup_preram_cache(&fmap_cache); + if (region_device_sz(&fmap_cache.rdev)) + return rdev_chain_full(fmrd, &fmap_cache.rdev);
boot_device_init(); boot = boot_device_ro(); @@ -277,9 +274,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 +281,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)); }
/*