[coreboot-gerrit] New patch to review for coreboot: 1809bdf Do CAR variable migration only once

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Jun 21 18:31:18 CEST 2013

Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3512


commit 1809bdfaa4bf6be0b0729b02f28445c16a06b28a
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Fri Jun 21 18:02:26 2013 +0300

    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 at gmail.com>
 src/cpu/x86/car.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c
index 31fc67c..88f2807 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) {

More information about the coreboot-gerrit mailing list