From 91fac61240612291f7be3362f7acad31803e8b03 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 31 Dec 2014 20:55:19 +0200 Subject: CBMEM: Tidy up CAR migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the CAR migration call to arch -specific part of CBMEM init, it is truly a x86 specific thing. Change-Id: I715417e54f197b8745e0670d6b900a5660178141 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/7860 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/cpu/x86/car.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/cpu/x86') diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c index e757f0912c..cca9afd694 100644 --- a/src/cpu/x86/car.c +++ b/src/cpu/x86/car.c @@ -108,7 +108,6 @@ void *car_sync_var_ptr(void *var) static void do_car_migrate_variables(void) { void *migrated_base; - car_migration_func_t *migrate_func; size_t car_data_size = &_car_data_end[0] - &_car_data_start[0]; /* Check if already migrated. */ @@ -126,7 +125,11 @@ static void do_car_migrate_variables(void) /* Mark that the data has been moved. */ car_migrated = ~0; +} +static void do_car_migrate_hooks(void) +{ + car_migration_func_t *migrate_func; /* Call all the migration functions. */ migrate_func = &_car_migrate_start; while (*migrate_func != NULL) { @@ -139,4 +142,7 @@ void car_migrate_variables(void) { if (!IS_ENABLED(CONFIG_BROKEN_CAR_MIGRATE)) do_car_migrate_variables(); + + if (!IS_ENABLED(CONFIG_BROKEN_CAR_MIGRATE)) + do_car_migrate_hooks(); } -- cgit v1.2.3