Shuo Liu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80328?usp=email )
Change subject: drivers/intel/fsp2_0: Add FSP_DOES_NOT_NEED_TEMP_RAM ......................................................................
drivers/intel/fsp2_0: Add FSP_DOES_NOT_NEED_TEMP_RAM
FSP allocates temporary ram in its reserved memory ranges instead of requesting coreboot to do the allocation. This is supported by some FSP implementations for Xeon SP.
Change-Id: I17a73e4f627c91808ed17c712b72937662ae9293 Signed-off-by: Shuo Liu shuo.liu@intel.com --- M src/drivers/intel/fsp2_0/Kconfig M src/drivers/intel/fsp2_0/memory_init.c 2 files changed, 24 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/80328/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig index e27249f..33390e6 100644 --- a/src/drivers/intel/fsp2_0/Kconfig +++ b/src/drivers/intel/fsp2_0/Kconfig @@ -39,6 +39,26 @@ 1. Added ExtendedImageRevision field in FSP_INFO_HEADER 2. Added FSP_NON_VOLATILE_STORAGE_HOB2
+config FSP_DOES_NOT_NEED_TEMP_RAM + bool + default n + help + FSP allocates temporary ram in its reserved memory ranges + instead of requesting coreboot to do the allocation. This + is supported by some FSP implementations for Xeon SP. + +config FSP_TEMP_RAM_SIZE + hex + default 0x0 if FSP_DOES_NOT_NEED_TEMP_RAM + help + The amount of memory coreboot reserves for the FSP to use. In the + case of FSP 2.1 and newer that share the stack with coreboot instead + of having its own stack, this is the amount of anticipated heap usage + in CAR by FSP to setup HOB and needs to be the recommended value from + the Platform FSP integration guide. In the case of the FSP having its + own stack that will be placed in DRAM and not in CAR, this is the + amount of memory the FSP needs for its stack and heap. + if PLATFORM_USES_FSP2_0
config PLATFORM_USES_FSP2_X86_32 @@ -221,17 +241,6 @@ without reinitializing stack pointer. This feature is supported Icelake onwards.
-config FSP_TEMP_RAM_SIZE - hex - help - The amount of memory coreboot reserves for the FSP to use. In the - case of FSP 2.1 and newer that share the stack with coreboot instead - of having its own stack, this is the amount of anticipated heap usage - in CAR by FSP to setup HOB and needs to be the recommended value from - the Platform FSP integration guide. In the case of the FSP having its - own stack that will be placed in DRAM and not in CAR, this is the - amount of memory the FSP needs for its stack and heap. - config FSP_PLATFORM_MEMORY_SETTINGS_VERSIONS bool help diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c index f5de5c3..d2e86c8 100644 --- a/src/drivers/intel/fsp2_0/memory_init.c +++ b/src/drivers/intel/fsp2_0/memory_init.c @@ -152,6 +152,9 @@ bool s3wake, uint32_t version, const struct memranges *memmap) { + if (CONFIG(FSP_DOES_NOT_NEED_TEMP_RAM)) + goto temp_ram_assigned; + /* * FSP 2.1 version would use same stack as coreboot instead of * setting up separate stack frame. FSP 2.1 would not relocate stack @@ -177,6 +180,7 @@ return CB_ERR; }
+temp_ram_assigned: fsp_fill_mrc_cache(arch_upd, version);
/* Configure bootmode */