UPSTREAM: arch/x86: remove CAR global migration when postcar stage is used

When a platform is using postcar stage it's by definition not
tearing down cache-as-ram from within romstage prior to loading
ramstage. Because of this property there's no need to migrate
CAR_GLOBAL variables to cbmem.

BUG=none
BRANCH=none
TEST=none

Change-Id: I34c0ae5c9f5e862ad523c58ceeeb1ab3873bc4c3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bc17cdef0d
Original-Change-Id: I7c683e1937c3397cbbba15f0f5d4be9e624ac27f
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19215
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Tested-by: build bot (Jenkins)
Original-Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/472720
This commit is contained in:
Aaron Durbin 2017-04-07 15:20:14 -05:00 committed by chrome-bot
commit e1961389d4
4 changed files with 13 additions and 1 deletions

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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