summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-20 19:57:49 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-29 09:10:11 +0000
commitdba22d2f9d309df0857159a22110339b04cd43cb (patch)
tree4c12a8669e636f6c8c3063bc642ab71fc804b5f1 /src/lib
parentf0664cfc7b305aed1726dc30d0940d5d7339e2c2 (diff)
downloadcoreboot-dba22d2f9d309df0857159a22110339b04cd43cb.tar.xz
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>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/fmap.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/fmap.c b/src/lib/fmap.c
index 48aab8f3d5..af26152d13 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 @@ static void report(const struct fmap *fmap)
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 @@ static int find_fmap_directory(struct region_device *fmrd)
{
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 @@ ssize_t fmap_overwrite_area(const char *name, const void *buffer, size_t size)
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 @@ static void fmap_register_cbmem_cache(int unused)
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));
}
/*