From 5a1469d54b519958fadf933963785dfcabed935f Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 16 Jul 2013 11:03:27 -0700 Subject: [PATCH] Enable CAR_MIGRATION on Exynos 5250 and 5420 ... and move the Kconfig variable from cpu/x86/Kconfig to cpu/Kconfig Despite calling romstage memory CAR in this case, the variables actually do live in SRAM on the Exynos CPUs. However, in order to share as much generic code as possible, we're using the same infrastructure here. BRANCH=none BUG=chrome-os-partner:18637 TEST=none Change-Id: I85173c37099a25f3e55980e88120401826cdf29c Signed-off-by: Stefan Reinauer Reviewed-on: https://gerrit.chromium.org/gerrit/62188 Reviewed-by: David Hendricks Commit-Queue: Stefan Reinauer Tested-by: Stefan Reinauer --- src/arch/armv7/romstage.ld | 20 +++++++++++++++++++- src/cpu/Kconfig | 8 ++++++++ src/cpu/samsung/exynos5250/Kconfig | 1 + src/cpu/samsung/exynos5420/Kconfig | 1 + src/cpu/x86/Kconfig | 9 +-------- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/arch/armv7/romstage.ld b/src/arch/armv7/romstage.ld index 568ac1aa94..6e86acdfe0 100644 --- a/src/arch/armv7/romstage.ld +++ b/src/arch/armv7/romstage.ld @@ -47,10 +47,28 @@ SECTIONS *(.rodata); *(.machine_param); *(.data); - . = ALIGN(8); + . = ALIGN(16); + _car_migrate_start = .; + *(.car.migrate); + _car_migrate_end = .; + . = ALIGN(16); _erom = .; } + .car.data . (NOLOAD) : { + _car_data_start = .; + *(.car.global_data); + /* The cbmem_console section comes last to take advantage of + * a zero-sized array to hold the memconsole contents that + * grows to a bound of CONFIG_CONSOLE_CAR_BUFFER_SIZE. However, + * collisions within the cache-as-ram region cannot be + * statically checked because the cache-as-ram region usage is + * cpu/chipset dependent. */ + *(.car.cbmem_console); + _car_data_end = .; + } + + __image_copy_end = .; /* bss does not contain data, it is just a space that should be zero diff --git a/src/cpu/Kconfig b/src/cpu/Kconfig index b0b8e0c1d9..540f169c25 100644 --- a/src/cpu/Kconfig +++ b/src/cpu/Kconfig @@ -150,6 +150,14 @@ config CPU_MICROCODE_CBFS_NONE endchoice +config CAR_MIGRATION + def_bool n + depends on DYNAMIC_CBMEM || EARLY_CBMEM_INIT + help + Migrate the cache-as-ram variables to CBMEM once CBMEM is set up + in romstage. This option is only needed if one will be doing more + work in romstage after the cache-as-ram is torn down aside from + loading ramstage. config CPU_MICROCODE_FILE string "Path and filename of CPU microcode" depends on CPU_MICROCODE_CBFS_EXTERNAL diff --git a/src/cpu/samsung/exynos5250/Kconfig b/src/cpu/samsung/exynos5250/Kconfig index 6731bb60e4..83ff4cbe87 100644 --- a/src/cpu/samsung/exynos5250/Kconfig +++ b/src/cpu/samsung/exynos5250/Kconfig @@ -4,6 +4,7 @@ config CPU_SAMSUNG_EXYNOS5250 select HAVE_UART_SPECIAL select EARLY_CONSOLE select DYNAMIC_CBMEM + select CAR_MIGRATION bool default n diff --git a/src/cpu/samsung/exynos5420/Kconfig b/src/cpu/samsung/exynos5420/Kconfig index df721ae0c1..c6d88c69c4 100644 --- a/src/cpu/samsung/exynos5420/Kconfig +++ b/src/cpu/samsung/exynos5420/Kconfig @@ -4,6 +4,7 @@ config CPU_SAMSUNG_EXYNOS5420 select HAVE_UART_SPECIAL select EARLY_CONSOLE select DYNAMIC_CBMEM + select CAR_MIGRATION bool default n diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig index c10dd1579f..305c2f2422 100644 --- a/src/cpu/x86/Kconfig +++ b/src/cpu/x86/Kconfig @@ -116,11 +116,4 @@ config X86_AMD_FIXED_MTRRS This option informs the MTRR code to use the RdMem and WrMem fields in the fixed MTRR MSRs. -config CAR_MIGRATION - def_bool n - depends on DYNAMIC_CBMEM || EARLY_CBMEM_INIT - help - Migrate the cache-as-ram variables to CBMEM once CBMEM is set up - in romstage. This option is only needed if one will be doing more - work in romstage after the cache-as-ram is torn down aside from - loading ramstage. +