summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-31 20:55:19 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-27 22:47:35 +0100
commit91fac61240612291f7be3362f7acad31803e8b03 (patch)
tree31c604a58e7b389b45d2f397eb7b37171c45dcc8 /src/cpu
parent3bf38548474697d11c935f23a610222c36df90c0 (diff)
downloadcoreboot-91fac61240612291f7be3362f7acad31803e8b03.tar.xz
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)
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/car.c8
1 files changed, 7 insertions, 1 deletions
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();
}