diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-10-31 09:41:59 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-11-01 21:33:13 +0000 |
commit | 4587f847578beacd7d18d03a6bd5e1d4069e2295 (patch) | |
tree | 06ce92e3df750aa62dde1aa9e9f3de148a2169cf /src/arch/x86 | |
parent | 76ab2b7a8a62e80b0ccdad60f15113fa6d73187f (diff) |
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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/29401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/include/arch/early_variables.h | 4 |
1 files 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) \ |