From 25fd2e97980dff6baf6c13db86d54700625896c5 Mon Sep 17 00:00:00 2001 From: Marcelo Povoa Date: Fri, 14 Feb 2014 15:35:12 -0800 Subject: [PATCH] aarch64: Remove CAR definitions from early_variables.h Copied from ARMv7 file to avoid build errors. BUG=None BRANCH=none TEST=Build coreboot successfully Change-Id: Ibe8c7fb10478622636f69cb51237beba000b7adb Signed-off-by: Marcelo Povoa Reviewed-on: https://chromium-review.googlesource.com/186743 Reviewed-by: David Hendricks --- .../aarch64/include/arch/early_variables.h | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/arch/aarch64/include/arch/early_variables.h b/src/arch/aarch64/include/arch/early_variables.h index 90ead9d44b..fc472e0882 100644 --- a/src/arch/aarch64/include/arch/early_variables.h +++ b/src/arch/aarch64/include/arch/early_variables.h @@ -20,40 +20,17 @@ #ifndef ARCH_EARLY_VARIABLES_H #define ARCH_EARLY_VARIABLES_H -#ifdef __PRE_RAM__ -#define CAR_GLOBAL __attribute__((section(".car.global_data,\"w\",%nobits@"))) -#define CAR_CBMEM __attribute__((section(".car.cbmem_console,\"w\",%nobits@"))) -#else -#define CAR_GLOBAL -#define CAR_CBMEM +#if CONFIG_CAR_MIGRATION + #error "This is ARM, silly... we don't have CAR here." #endif -#if defined(__PRE_RAM__) -#define CAR_MIGRATE_ATTR __attribute__ ((used,section (".car.migrate"))) +#define CAR_GLOBAL +#define CAR_CBMEM -/* Call migrate_fn_() when CAR globals are migrated. */ -#define CAR_MIGRATE(migrate_fn_) \ - static void (* const migrate_fn_ ## _ptr)(void) CAR_MIGRATE_ATTR = \ - migrate_fn_; - -/* Get the correct pointer for the CAR global variable. */ -void *car_get_var_ptr(void *var); - -/* Get and set a primitive type global variable. */ -#define car_get_var(var) \ - *(typeof(var) *)car_get_var_ptr(&(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 #endif