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. +