summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-19 09:19:29 +0200
committerJonathan A. Kollasch <jakllsch@kollasch.net>2014-12-30 17:47:22 +0100
commit87accccdc2dda421dee967badbdbc701fea0753e (patch)
tree7209bacea804d88d24269fd33e440327c4659313 /src/cpu
parent773485b8920145443da8b09712553c10c954fed1 (diff)
downloadcoreboot-87accccdc2dda421dee967badbdbc701fea0753e.tar.xz
CBMEM: Always build for x86 romstage
Always build CBMEM for romstage, even for boards that will not use it. We further restrict car_migrate_variables() runs to non-ROMCC boards without BROKEN_CAR_MIGRATE. This fixes regression of commit 71b21455 that broke CBMEM console support for boards with a combination of !EARLY_CBMEM_INIT && !HAVE_ACPI_RESUME. Change-Id: Ife91d7baebdc9bd1e086896400059a165d3aa90f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7877 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/Makefile.inc3
-rw-r--r--src/cpu/x86/car.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc
index 418b5d7b66..2347f88500 100644
--- a/src/cpu/x86/Makefile.inc
+++ b/src/cpu/x86/Makefile.inc
@@ -1,6 +1,5 @@
ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y)
-romstage-$(CONFIG_EARLY_CBMEM_INIT) += car.c
-romstage-$(CONFIG_BROKEN_CAR_MIGRATE) += car.c
+romstage-$(CONFIG_CACHE_AS_RAM) += car.c
endif
subdirs-$(CONFIG_PARALLEL_MP) += name
diff --git a/src/cpu/x86/car.c b/src/cpu/x86/car.c
index a7e38420a8..c9cc6d6178 100644
--- a/src/cpu/x86/car.c
+++ b/src/cpu/x86/car.c
@@ -73,7 +73,7 @@ void *car_get_var_ptr(void *var)
return &migrated_base[offset];
}
-void car_migrate_variables(void)
+static void do_car_migrate_variables(void)
{
void *migrated_base;
car_migration_func_t *migrate_func;
@@ -102,3 +102,9 @@ void car_migrate_variables(void)
migrate_func++;
}
}
+
+void car_migrate_variables(void)
+{
+ if (!IS_ENABLED(CONFIG_BROKEN_CAR_MIGRATE))
+ do_car_migrate_variables();
+}