arch/x86: Allow bootblock code to use CAR_GLOBAL variables

Since cbmem is not initialized in bootblock, CAR_GLOBAL variables
can only be accessed directly similar to verstage.

Change-Id: Ifc705016290807c49dc8c49b581864cac2ad3f80
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/13641
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Andrey Petrov 2016-02-08 17:13:35 -08:00 committed by Aaron Durbin
parent ee9e4ae5bf
commit 6a1219cfe0
1 changed files with 4 additions and 3 deletions

View File

@ -29,10 +29,11 @@ asm(".previous");
#endif /* __clang__ */ #endif /* __clang__ */
/* /*
* On x86 verstage, all CAR_GLOBAL variables are accessed unconditionally * In stages that use CAR (verstage, C bootblock) all CAR_GLOBAL variables are
* because cbmem is never initialized until romstage when dram comes up. * accessed unconditionally because cbmem is never initialized until romstage
* when dram comes up.
*/ */
#if ENV_VERSTAGE #if ENV_VERSTAGE || ENV_BOOTBLOCK
static inline void *car_get_var_ptr(void *var) static inline void *car_get_var_ptr(void *var)
{ {
return var; return var;