arch/x86: Reserve space for stack in CAR layout

Some platforms may want to use C code in bootblock so they need
writable memory and CAR can be used for it. This change reserves
memory in CAR that can be used by bootblock and other CAR stages.

Change-Id: I8dec768cf8763dbe235f0ba1339079ebc49cbd9a
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/13640
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Andrey Petrov 2016-02-08 17:17:05 -08:00 committed by Aaron Durbin
parent a02bb653fd
commit ee9e4ae5bf
1 changed files with 8 additions and 0 deletions

View File

@ -22,6 +22,14 @@
* romstage. Appropriate code needs to handle the transition. */ * romstage. Appropriate code needs to handle the transition. */
#if IS_ENABLED(CONFIG_SEPARATE_VERSTAGE) #if IS_ENABLED(CONFIG_SEPARATE_VERSTAGE)
VBOOT2_WORK(., 16K) VBOOT2_WORK(., 16K)
#endif
/* Stack for CAR stages. Since it persists across all stages that
* use CAR it can be reused. The chipset/SoC is expected to provide
* the stack size. */
#if IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)
_car_stack_start = .;
. += CONFIG_DCACHE_BSP_STACK_SIZE;
_car_stack_end = .;
#endif #endif
/* The pre-ram cbmem console as well as the timestamp region are fixed /* The pre-ram cbmem console as well as the timestamp region are fixed
* in size. Therefore place them at the beginning .car.data section * in size. Therefore place them at the beginning .car.data section