summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorFrans Hendriks <fhendriks@eltan.com>2021-01-18 15:51:01 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-01-21 11:02:43 +0000
commit162d704b5720bcc22bdd5a17bd20ec29427430ef (patch)
tree3f138ef5d1139df9311809780140c07487d62fd3 /src/drivers
parentbe5cc7da5f909cc0c8384a77777645caa8478879 (diff)
drivers/intel/fsp1_1/temp_ram_exit.c: Initialize CBMEM
prog_locate() will load FSP, before CBMEM is initialized. The vboot workbuffer is used for loading, but CBMEM_ID_VBOOT_WORKBUF is not available. A NULL pointer is returned as workbuffer resulting in error 'Ramstage was not loaded!' at second boot. Initialize CBMEM before calling prog_locate(). BUG = N/A TEST = Build and boot on Facebook FBG1701 Change-Id: I2f04a326a95840937b71f6ad65a7c011268ec6d6 Signed-off-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49639 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp1_1/temp_ram_exit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp1_1/temp_ram_exit.c b/src/drivers/intel/fsp1_1/temp_ram_exit.c
index 08324eb8cf..df7e67459b 100644
--- a/src/drivers/intel/fsp1_1/temp_ram_exit.c
+++ b/src/drivers/intel/fsp1_1/temp_ram_exit.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <cbmem.h>
#include <console/console.h>
#include <fsp/util.h>
@@ -10,6 +11,10 @@ asmlinkage void chipset_teardown_car_main(void)
FSP_TEMP_RAM_EXIT temp_ram_exit;
struct prog fsp = PROG_INIT(PROG_REFCODE, "fsp.bin");
+ /* CBMEM_ID_VBOOT_WORKBUF is used as vboot workbuffer.
+ * Init CBMEM before loading fsp, to have buffer available */
+ cbmem_initialize();
+
if (prog_locate(&fsp)) {
die("Unable to locate fsp.bin\n");
} else {