From 162d704b5720bcc22bdd5a17bd20ec29427430ef Mon Sep 17 00:00:00 2001 From: Frans Hendriks Date: Mon, 18 Jan 2021 15:51:01 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49639 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/drivers/intel/fsp1_1/temp_ram_exit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/drivers/intel') 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 #include #include @@ -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 { -- cgit v1.2.3