summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/Kconfig1
-rw-r--r--src/arch/x86/include/arch/early_variables.h2
-rw-r--r--src/cpu/Kconfig9
-rw-r--r--src/cpu/x86/Makefile.inc2
4 files changed, 13 insertions, 1 deletions
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index c153a7438805..0c8b97d2f3ff 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -200,6 +200,7 @@ config VERSTAGE_ADDR
# from a program loaded in RAM and subsequently loading ramstage.
config POSTCAR_STAGE
def_bool n
+ select NO_CAR_GLOBAL_MIGRATION
config VERSTAGE_DEBUG_SPINLOOP
bool
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h
index a21781996efc..d0cfda75aa4f 100644
--- a/src/arch/x86/include/arch/early_variables.h
+++ b/src/arch/x86/include/arch/early_variables.h
@@ -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_VERSTAGE || ENV_BOOTBLOCK || IS_ENABLED(CONFIG_NO_CAR_GLOBAL_MIGRATION)
static inline void *car_get_var_ptr(void *var)
{
return var;
diff --git a/src/cpu/Kconfig b/src/cpu/Kconfig
index 009d80cac172..915526b2dcc0 100644
--- a/src/cpu/Kconfig
+++ b/src/cpu/Kconfig
@@ -10,6 +10,15 @@ config CACHE_AS_RAM
bool
default !ROMCC
+config NO_CAR_GLOBAL_MIGRATION
+ bool
+ default n
+ depends on CACHE_AS_RAM
+ help
+ This option is selected if there is no need to migrate CAR globals.
+ All stages which use CAR globals can directly access the variables
+ from their linked addresses.
+
config DCACHE_RAM_BASE
hex
diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc
index 1724a060b8f3..771784e6ffce 100644
--- a/src/cpu/x86/Makefile.inc
+++ b/src/cpu/x86/Makefile.inc
@@ -1,6 +1,8 @@
ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
+ifneq ($(CONFIG_NO_CAR_GLOBAL_MIGRATION),y)
romstage-$(CONFIG_CACHE_AS_RAM) += car.c
endif
+endif
subdirs-$(CONFIG_PARALLEL_MP) += name
ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c