diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-12-19 09:19:29 +0200 |
---|---|---|
committer | Jonathan A. Kollasch <jakllsch@kollasch.net> | 2014-12-30 17:47:22 +0100 |
commit | 87accccdc2dda421dee967badbdbc701fea0753e (patch) | |
tree | 7209bacea804d88d24269fd33e440327c4659313 /src/arch/x86 | |
parent | 773485b8920145443da8b09712553c10c954fed1 (diff) | |
download | coreboot-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/arch/x86')
-rw-r--r-- | src/arch/x86/boot/Makefile.inc | 3 | ||||
-rw-r--r-- | src/arch/x86/include/arch/early_variables.h | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/arch/x86/boot/Makefile.inc b/src/arch/x86/boot/Makefile.inc index 9a68d81488..9f06b4f4eb 100644 --- a/src/arch/x86/boot/Makefile.inc +++ b/src/arch/x86/boot/Makefile.inc @@ -1,8 +1,7 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y) -romstage-$(CONFIG_EARLY_CBMEM_INIT) += cbmem.c -romstage-$(CONFIG_BROKEN_CAR_MIGRATE) += cbmem.c +romstage-y += cbmem.c endif # CONFIG_ARCH_ROMSTAGE_X86_32 diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index c850a8427d..f76c0481ab 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -45,16 +45,18 @@ void *car_get_var_ptr(void *var); #define car_set_var(var, val) \ do { car_get_var(var) = (val); } while(0) -/* Migrate the CAR variables to memory. */ -void car_migrate_variables(void); - #else #define CAR_MIGRATE(migrate_fn_) static inline void *car_get_var_ptr(void *var) { return var; } #define car_get_var(var) (var) #define car_set_var(var, val) do { (var) = (val); } while (0) -static inline void car_migrate_variables(void) { } #endif +#if defined(__PRE_RAM__) && IS_ENABLED(CONFIG_CACHE_AS_RAM) +/* Migrate the CAR variables to memory. */ +void car_migrate_variables(void); +#else +static inline void car_migrate_variables(void) { } +#endif #endif |