From 4587f847578beacd7d18d03a6bd5e1d4069e2295 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 31 Oct 2018 09:41:59 -0600 Subject: [PATCH] arch/x86: clarify raw CAR_GLOBAL access guards Romstage is where DRAM comes online. Therefore, allow raw CAR_GLOBAL object access in all cache-as-ram stages that are not romstage. In practice, this should be a nop. However, the explicit check for romstage is clearer. Change-Id: I31454c05029140a946ef663b8fa1b2fa6a788154 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/29401 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Furquan Shaikh --- src/arch/x86/include/arch/early_variables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index d215e47bc0..e95a45c55d 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -34,7 +34,7 @@ asm(".previous"); * accessed unconditionally because cbmem is never initialized until romstage * when dram comes up. */ -#if ENV_VERSTAGE || ENV_BOOTBLOCK +#if !ENV_ROMSTAGE static inline void *car_get_var_ptr(void *var) { return var; @@ -58,7 +58,7 @@ void *car_sync_var_ptr(void *var); /* Return 1 when currently running with globals in Cache-as-RAM, 0 otherwise. */ int car_active(void); -#endif /* ENV_VERSTAGE */ +#endif /* !ENV_ROMSTAGE */ /* Get and set a primitive type global variable. */ #define car_get_var(var) \