Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44406 )
Change subject: drivers/intel/fsp2_0: add Kconfig for separate stack in DRAM
......................................................................
drivers/intel/fsp2_0: add Kconfig for separate stack in DRAM
soc/amd/picasso selected FSP_USES_CB_STACK even though it is FSP 2.0
based, so it doesn't reuse coreboot's stack, but sets up its own stack.
In contrast to all other FSP 2.0 based platforms, this stack isn't in
the CAR region, since AMD Picasso doesn't support CAR and the DRAM is
already available when the x86 cores are released from reset. Selecting
FSP_USES_CB_STACK ended up doing the right thing, but is semantically
wrong. This patch introduces the new Kconfig option
FSP_USES_STACK_IN_DRAM that will also result in the right code path in
the FSP driver being taken.
BUG=b:155501050
TEST=Mandolin still boots.
Change-Id: Icd0ff8e17a535e2c247793b64f4b0565887183d8
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
M src/drivers/intel/fsp2_0/Kconfig
M src/drivers/intel/fsp2_0/memory_init.c
M src/soc/amd/picasso/Kconfig
3 files changed, 19 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/44406/1
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig
index 3caa04a..2d04a0b 100644
--- a/src/drivers/intel/fsp2_0/Kconfig
+++ b/src/drivers/intel/fsp2_0/Kconfig
@@ -130,14 +130,24 @@
without reinitializing stack pointer. This feature is
supported Icelake onwards.
+config FSP_USES_STACK_IN_DRAM
+ bool
+ default n
+ help
+ Enable support for FSP to use a DRAM region as stack. This is used in
+ non-CAR platforms where FSP still uses its own separate stack.
+
config FSP_TEMP_RAM_SIZE
hex
- depends on FSP_USES_CB_STACK
+ depends on FSP_USES_CB_STACK || FSP_USES_STACK_IN_DRAM
help
- The amount of anticipated heap usage in CAR by FSP to setup HOB.
- This configuration is applicable for FSP specification using shared
- stack with coreboot/bootloader.
- Sync this value with Platform FSP integration guide recommendation.
+ 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 recommened 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 FSP2_0_USES_TPM_MRC_HASH
bool
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 7f5d389..8190c5e 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -184,8 +184,9 @@
* top and does not reinitialize stack pointer. The parameters passed
* as StackBase and StackSize are actually for temporary RAM and HOBs
* and are not related to FSP stack at all.
+ * Non-CAR FSP 2.0 platforms pass a DRAM location for the FSP stack.
*/
- if (CONFIG(FSP_USES_CB_STACK)) {
+ if (CONFIG(FSP_USES_CB_STACK) || CONFIG(FSP_USES_STACK_IN_DRAM)) {
arch_upd->StackBase = temp_ram;
arch_upd->StackSize = sizeof(temp_ram);
} else if (setup_fsp_stack_frame(arch_upd, memmap)) {
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index 526900a..8ebe9b6 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -53,7 +53,7 @@
select PLATFORM_USES_FSP2_0
select FSP_COMPRESS_FSP_M_LZMA
select FSP_COMPRESS_FSP_S_LZMA
- select FSP_USES_CB_STACK
+ select FSP_USES_STACK_IN_DRAM
select UDK_2017_BINDING
select HAVE_CF9_RESET
select SUPPORT_CPU_UCODE_IN_CBFS
@@ -377,7 +377,7 @@
config FSP_TEMP_RAM_SIZE
hex
- depends on FSP_USES_CB_STACK
+ depends on FSP_USES_STACK_IN_DRAM
default 0x40000
help
The amount of coreboot-allocated heap and stack usage by the FSP.
--
To view, visit https://review.coreboot.org/c/coreboot/+/44406
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Icd0ff8e17a535e2c247793b64f4b0565887183d8
Gerrit-Change-Number: 44406
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newchange
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44404 )
Change subject: xeon_sp/cpx: Enable ACPI P-state support
......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/44404/4//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/coreboot/+/44404/4//COMMIT_MSG@7
PS4, Line 7: xeon_sp/cpx: Enable ACPI P-state support
Please also cleanup the redundant definition in include/soc/cpu.h .
--
To view, visit https://review.coreboot.org/c/coreboot/+/44404
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3bf3ad7f82fbf196a2134a8138b10176fc8be2cc
Gerrit-Change-Number: 44404
Gerrit-PatchSet: 4
Gerrit-Owner: Jingle Hsu <jingle_hsu(a)wiwynn.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Morgan Jang <Morgan_Jang(a)wiwynn.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Thu, 13 Aug 2020 16:00:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44430 )
Change subject: cse_lite: Move global reset after MRC writeback.
......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/44430/2//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/coreboot/+/44430/2//COMMIT_MSG@7
PS2, Line 7: cse_lite: Move global reset after MRC writeback.
Please remove the dot/period at the end of the summary.
https://review.coreboot.org/c/coreboot/+/44430/2/src/soc/intel/common/block…
File src/soc/intel/common/block/cse/cse_lite.c:
https://review.coreboot.org/c/coreboot/+/44430/2/src/soc/intel/common/block…
PS2, Line 660: * memory training sequence.
Please use 96 character text width.
--
To view, visit https://review.coreboot.org/c/coreboot/+/44430
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia42d72fdec41f9792ab8f04205b20a55758a4235
Gerrit-Change-Number: 44430
Gerrit-PatchSet: 2
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Shelley Chen <shchen(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Thu, 13 Aug 2020 15:38:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment