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>
This commit is contained in:
parent
0651072597
commit
7f5897a1c5
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue