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>
This commit is contained in:
Aaron Durbin 2018-10-31 09:41:59 -06:00
parent 76ab2b7a8a
commit 4587f84757
1 changed files with 2 additions and 2 deletions

View File

@ -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) \