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:
@@ -34,7 +34,7 @@ asm(".previous");
|
|||||||
* accessed unconditionally because cbmem is never initialized until romstage
|
* accessed unconditionally because cbmem is never initialized until romstage
|
||||||
* when dram comes up.
|
* when dram comes up.
|
||||||
*/
|
*/
|
||||||
#if ENV_VERSTAGE || ENV_BOOTBLOCK
|
#if !ENV_ROMSTAGE
|
||||||
static inline void *car_get_var_ptr(void *var)
|
static inline void *car_get_var_ptr(void *var)
|
||||||
{
|
{
|
||||||
return 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. */
|
/* Return 1 when currently running with globals in Cache-as-RAM, 0 otherwise. */
|
||||||
int car_active(void);
|
int car_active(void);
|
||||||
#endif /* ENV_VERSTAGE */
|
#endif /* !ENV_ROMSTAGE */
|
||||||
|
|
||||||
/* Get and set a primitive type global variable. */
|
/* Get and set a primitive type global variable. */
|
||||||
#define car_get_var(var) \
|
#define car_get_var(var) \
|
||||||
|
Reference in New Issue
Block a user