summaryrefslogtreecommitdiff
path: root/src/arch/x86/include
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-10-30 12:15:10 -0600
committerAaron Durbin <adurbin@chromium.org>2018-11-01 21:33:03 +0000
commit76ab2b7a8a62e80b0ccdad60f15113fa6d73187f (patch)
treec797159b96b0dc2bef96a365bae8d0b5089e4749 /src/arch/x86/include
parent946d3f9309c1d6d3d5fa057420ceab00b1ed89d1 (diff)
downloadcoreboot-76ab2b7a8a62e80b0ccdad60f15113fa6d73187f.tar.xz
arch/x86: allow global .bss objects without CAR_GLOBAL
For platforms utilizing CONFIG_NO_CAR_GLOBAL_MIGRATION there's no need to automatically migrate globals. Because of this it's possible to automatically allow for uninitialized global variables which reside in the .bss section without needing to decorate those objects with CAR_GLOBAL. Change-Id: Icae806fecd936ed2ebf0c13d30ffa07c77a95150 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/29359 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r--src/arch/x86/include/arch/early_variables.h4
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 1b6810de86..d215e47bc0 100644
--- a/src/arch/x86/include/arch/early_variables.h
+++ b/src/arch/x86/include/arch/early_variables.h
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <rules.h>
-#if ENV_CACHE_AS_RAM
+#if ENV_CACHE_AS_RAM && !IS_ENABLED(CONFIG_NO_CAR_GLOBAL_MIGRATION)
asm(".section .car.global_data,\"w\",@nobits");
asm(".previous");
#ifdef __clang__
@@ -34,7 +34,7 @@ asm(".previous");
* accessed unconditionally because cbmem is never initialized until romstage
* when dram comes up.
*/
-#if ENV_VERSTAGE || ENV_BOOTBLOCK || IS_ENABLED(CONFIG_NO_CAR_GLOBAL_MIGRATION)
+#if ENV_VERSTAGE || ENV_BOOTBLOCK
static inline void *car_get_var_ptr(void *var)
{
return var;