From dd56de974ddc7d0d8d782b50d9260b0596f59a1a Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Thu, 25 Feb 2016 17:22:17 -0800 Subject: arch/x86: document CAR symbols and expose them in symbols.h Attempt to better document the symbol usage in car.ld for cache-as-ram usage. Additionally, add _car_region_[start|end] that completely covers the entire cache-as-ram region. The _car_data_[start|end] symbols were renamed to _car_relocatable_data_[start|end] in the hopes of making it clearer that objects within there move. Lastly, all these symbols were added to arch/symbols.h. Change-Id: I1f1af4983804dc8521d0427f43381bde6d23a060 Signed-off-by: Andrey Petrov Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/13804 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Furquan Shaikh --- src/arch/x86/car.ld | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/arch/x86/car.ld') diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld index d19e61300b..c221fb88b1 100644 --- a/src/arch/x86/car.ld +++ b/src/arch/x86/car.ld @@ -18,6 +18,7 @@ /* This file is included inside a SECTIONS block */ . = CONFIG_DCACHE_RAM_BASE; .car.data . (NOLOAD) : { + _car_region_start = . ; /* Vboot work buffer is completely volatile outside of verstage and * romstage. Appropriate code needs to handle the transition. */ #if IS_ENABLED(CONFIG_SEPARATE_VERSTAGE) @@ -36,12 +37,12 @@ * so that multiple stages (romstage and verstage) have a consistent * link address of these shared objects. */ PRERAM_CBMEM_CONSOLE(., (CONFIG_LATE_CBMEM_INIT ? 0 : 0xc00)) - _car_data_start = .; + _car_relocatable_data_start = .; /* The timestamp implementation relies on this storage to be around * after migration. One of the fields indicates not to use it as the * backing store once cbmem comes online. Therefore, this data needs - * to reside in the migrated area (between _car_data_start and - * _car_data_end). */ + * to reside in the migrated area (between _car_relocatable_data_start + * and _car_relocatable_data_end). */ TIMESTAMP(., 0x100) /* _car_global_start and _car_global_end provide symbols to per-stage * variables that are not shared like the timestamp and the pre-ram @@ -51,7 +52,9 @@ *(.car.global_data); . = ALIGN(ARCH_POINTER_ALIGN_SIZE); _car_global_end = .; - _car_data_end = .; + _car_relocatable_data_end = .; + + _car_region_end = . + CONFIG_DCACHE_RAM_SIZE - (. - _car_region_start); } /* Global variables are not allowed in romstage -- cgit v1.2.3