CBMEM: Tidy up CAR migration

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 <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/7860
Reviewed-by: Aaron Durbin <adurbin@google.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Kyösti Mälkki
2014-12-31 20:55:19 +02:00
parent 3bf3854847
commit 91fac61240
9 changed files with 30 additions and 31 deletions

View File

@@ -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();
}