summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Petrov <andrey.petrov@intel.com>2016-02-08 17:13:35 -0800
committerAaron Durbin <adurbin@chromium.org>2016-02-11 06:21:58 +0100
commit6a1219cfe0e97af9aefc3b55397f5936af4e3e9d (patch)
tree34d13187bc7cb94d1755d9a7b4e4dd6df4a339ac /src
parentee9e4ae5bfbbb05ea34a2c2753c5517bcd3fb421 (diff)
downloadcoreboot-6a1219cfe0e97af9aefc3b55397f5936af4e3e9d.tar.xz
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)
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/include/arch/early_variables.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h
index 34d4a7dbb1..16eeacce62 100644
--- a/src/arch/x86/include/arch/early_variables.h
+++ b/src/arch/x86/include/arch/early_variables.h
@@ -29,10 +29,11 @@ asm(".previous");
#endif /* __clang__ */
/*
- * On x86 verstage, all CAR_GLOBAL variables are accessed unconditionally
- * because cbmem is never initialized until romstage when dram comes up.
+ * In stages that use CAR (verstage, C bootblock) all CAR_GLOBAL variables are
+ * 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)
{
return var;