From 716738a6b84535f731ee9749f161505945eab93c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 10 May 2013 00:33:32 -0500 Subject: x86: add cache-as-ram migration option 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 Reviewed-on: http://review.coreboot.org/3232 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/lib/cbmem_info.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/cbmem_info.c') diff --git a/src/lib/cbmem_info.c b/src/lib/cbmem_info.c index ad8c890666..7031a70d54 100644 --- a/src/lib/cbmem_info.c +++ b/src/lib/cbmem_info.c @@ -46,6 +46,7 @@ static struct cbmem_id_to_name { { CBMEM_ID_RAMSTAGE_CACHE, "RAMSTAGE $ " }, { CBMEM_ID_ROOT, "CBMEM ROOT " }, { CBMEM_ID_VBOOT_HANDOFF, "VBOOT " }, + { CBMEM_ID_CAR_GLOBALS, "CAR GLOBALS" }, }; void cbmem_print_entry(int n, u32 id, u64 base, u64 size) -- cgit v1.2.3