summaryrefslogtreecommitdiff
path: root/src/cpu/x86/car.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-06-21 18:02:26 +0300
committerRonald G. Minnich <rminnich@gmail.com>2013-06-22 20:47:21 +0200
commit7f5897a1c5bcd6062169368b827975faa9feeebf (patch)
treeeb6660af0307e34397cb17e49b4dec4728e5e25c /src/cpu/x86/car.c
parent065107259774169db73c42e9a2d5777f63a78c29 (diff)
downloadcoreboot-7f5897a1c5bcd6062169368b827975faa9feeebf.tar.xz
Do CAR variable migration only once
Non-S3 resume paths of sandy/ivybridge call cbmem_initialize() more than once. Doing car_migrate_variables() more than twice caused at least loss of some lines in CBMEM console. Change-Id: Idd14aba9384984aa3a7d38937a4b3572aa5dc088 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3512 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/cpu/x86/car.c')
-rw-r--r--src/cpu/x86/car.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c
index 31fc67c57a..88f280796b 100644
--- a/src/cpu/x86/car.c
+++ b/src/cpu/x86/car.c
@@ -80,6 +80,10 @@ void car_migrate_variables(void)
car_migration_func_t *migrate_func;
size_t car_data_size = &_car_data_end[0] - &_car_data_start[0];
+ /* Check if already migrated. */
+ if (car_migrated)
+ return;
+
migrated_base = cbmem_add(CBMEM_ID_CAR_GLOBALS, car_data_size);
if (migrated_base == NULL) {