There are some boards that do a significant amount of work after cache-as-ram is torn down but before ramstage is loaded. For example, using vboot to verify the ramstage is one such operation. However, there are pieces of code that are executed that reference global variables that are linked in the cache-as-ram region. If those variables are referenced after cache-as-ram is torn down then the values observed will most likely be incorrect. Therefore provide a Kconfig option to select cache-as-ram migration to memory using cbmem. This option is named CAR_MIGRATION. When enabled, the address of cache-as-ram variables may be obtained dynamically. Additionally, when cache-as-ram migration occurs the cache-as-ram data region for global variables is copied into cbmem. There are also automatic callbacks for other modules to perform their own migration, if necessary. Change-Id: I2e77219647c2bd2b1aa845b262be3b2543f1fcb7 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/3232 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
126 lines
2.5 KiB
Text
126 lines
2.5 KiB
Text
config SERIAL_CPU_INIT
|
|
bool
|
|
default y
|
|
|
|
config UDELAY_IO
|
|
bool
|
|
default y if !UDELAY_LAPIC && !UDELAY_TSC && !UDELAY_TIMER2
|
|
default n
|
|
|
|
config UDELAY_LAPIC
|
|
bool
|
|
default n
|
|
|
|
config LAPIC_MONOTONIC_TIMER
|
|
def_bool n
|
|
depends on UDELAY_LAPIC
|
|
select HAVE_MONOTONIC_TIMER
|
|
help
|
|
Expose monotonic time using the local apic.
|
|
|
|
config UDELAY_LAPIC_FIXED_FSB
|
|
int
|
|
|
|
config UDELAY_TSC
|
|
bool
|
|
default n
|
|
|
|
config TSC_CONSTANT_RATE
|
|
def_bool n
|
|
depends on UDELAY_TSC
|
|
help
|
|
This option asserts that the TSC ticks at a known constant rate.
|
|
Therefore, no TSC calibration is required.
|
|
|
|
config TSC_MONOTONIC_TIMER
|
|
def_bool n
|
|
depends on UDELAY_TSC
|
|
select HAVE_MONOTONIC_TIMER
|
|
help
|
|
Expose monotonic time using the TSC.
|
|
|
|
config UDELAY_TIMER2
|
|
bool
|
|
default n
|
|
|
|
config TSC_CALIBRATE_WITH_IO
|
|
bool
|
|
default n
|
|
|
|
config TSC_SYNC_LFENCE
|
|
bool
|
|
default n
|
|
help
|
|
The CPU driver should select this if the CPU needs
|
|
to execute an lfence instruction in order to synchronize
|
|
rdtsc. This is true for all modern AMD CPUs.
|
|
|
|
config TSC_SYNC_MFENCE
|
|
bool
|
|
default n
|
|
help
|
|
The CPU driver should select this if the CPU needs
|
|
to execute an mfence instruction in order to synchronize
|
|
rdtsc. This is true for all modern Intel CPUs.
|
|
|
|
config XIP_ROM_SIZE
|
|
hex
|
|
default ROM_SIZE if ROMCC
|
|
default 0x10000
|
|
|
|
config CPU_ADDR_BITS
|
|
int
|
|
default 36
|
|
|
|
config LOGICAL_CPUS
|
|
bool
|
|
default y
|
|
|
|
config CACHE_ROM
|
|
bool "Allow for caching system ROM."
|
|
default n
|
|
help
|
|
When selected a variable range MTRR is allocated for coreboot and
|
|
the bootloader enables caching of the system ROM for faster access.
|
|
|
|
config SMM_TSEG
|
|
bool
|
|
default n
|
|
|
|
config SMM_TSEG_SIZE
|
|
hex
|
|
default 0
|
|
|
|
config SMM_MODULES
|
|
bool
|
|
default n
|
|
depends on HAVE_SMI_HANDLER
|
|
select RELOCATABLE_MODULES
|
|
help
|
|
If SMM_MODULES is selected then SMM handlers are built as modules.
|
|
A SMM stub along with a SMM loader/relocator. All the handlers are
|
|
written in C with stub being the only assembly.
|
|
|
|
config SMM_MODULE_HEAP_SIZE
|
|
hex
|
|
default 0x4000
|
|
depends on SMM_MODULES
|
|
help
|
|
This option determines the size of the heap within the SMM handler
|
|
modules.
|
|
|
|
config X86_AMD_FIXED_MTRRS
|
|
bool
|
|
default n
|
|
help
|
|
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.
|