summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/postcar_loader.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-06-28 10:08:51 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-07-04 06:53:12 +0000
commit6e2d0c1b90251b4b61af582d2598cdbd38591db7 (patch)
tree05dd94e809ddb67fbb5b1c6f1d1c6a2ad5736a68 /src/arch/x86/postcar_loader.c
parent8f23b5d4343c5c8ec1f7f7d453f9d8784fc0d5a2 (diff)
downloadcoreboot-6e2d0c1b90251b4b61af582d2598cdbd38591db7.tar.gz
coreboot-6e2d0c1b90251b4b61af582d2598cdbd38591db7.tar.bz2
coreboot-6e2d0c1b90251b4b61af582d2598cdbd38591db7.zip
arch/x86: Adjust size of postcar stack
With VBOOT=y && VBOOT_MEASURED_BOOT=y message digest will be allocated from the stack and 1 KiB reserve used with the recent platforms was no longer sufficient. The comment of LZMA scratchpad consuming stack was obsolete for postcar, so these can be reduced to same 4 KiB. Change-Id: Iba1fb5bfad6946f316feac2d8c998a782142a56a Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com> Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/arch/x86/postcar_loader.c')
-rw-r--r--src/arch/x86/postcar_loader.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c
index 732b767bf6ac..35e139fe1c9d 100644
--- a/src/arch/x86/postcar_loader.c
+++ b/src/arch/x86/postcar_loader.c
@@ -48,6 +48,15 @@ int postcar_frame_init(struct postcar_frame *pcf, size_t stack_size)
{
void *stack;
+ /*
+ * Use default postcar stack size of 4 KiB. This value should
+ * not be decreased, because if mainboards use vboot, 1 KiB will
+ * not be enough anymore.
+ */
+
+ if (stack_size == 0)
+ stack_size = 4 * KiB;
+
stack = cbmem_add(CBMEM_ID_ROMSTAGE_RAM_STACK, stack_size);
if (stack == NULL) {
printk(BIOS_ERR, "Couldn't add %zd byte stack in cbmem.\n",