diff options
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r-- | src/arch/x86/include/arch/early_variables.h | 10 |
1 files changed, 6 insertions, 4 deletions
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 |