drivers/intel/fsp2_0: Add recipes for FSP blobs in CBFS

Add recipes that insert FSP blobs into CBFS and get rid of
CBFS names hardcoding.

Change-Id: I350abeffc4d23e45e339464d036716ecdb2ba83a
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/14818
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Andrey Petrov 2016-05-14 16:32:39 -07:00 committed by Aaron Durbin
parent 868679fe96
commit 9be1a115f1
4 changed files with 40 additions and 4 deletions

View File

@ -3,4 +3,32 @@ config PLATFORM_USES_FSP2_0
help
Include FSP 2.0 wrappers and functionality
if PLATFORM_USES_FSP2_0
config ADD_FSP_BINARIES
bool "Add Intel FSP 2.0 binaries to CBFS"
help
Add the FSP-M and FSP-S binaries to CBFS. Currently coreboot does not
use the FSP-T binary and it is not added.
config FSP_S_CBFS
string "Name of FSP-S in CBFS"
default "fsps.bin"
config FSP_M_CBFS
string "Name of FSP-M in CBFS"
default "fspm.bin"
config FSP_M_FILE
string "Intel FSP-M (memory init) binary path and filename"
depends on ADD_FSP_BINARIES
help
The path and filename of the Intel FSP-M binary for this platform.
config FSP_S_FILE
string "Intel FSP-S (silicon init) binary path and filename"
depends on ADD_FSP_BINARIES
help
The path and filename of the Intel FSP-S binary for this platform.
endif

View File

@ -25,4 +25,14 @@ ramstage-y += util.c
CPPFLAGS_common += -I$(src)/drivers/intel/fsp2_0/include
# Add FSP blobs into cbfs. SoC code may supply additional options with
# -options, e.g --xip or -b
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(CONFIG_FSP_M_CBFS)
$(CONFIG_FSP_M_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE))
$(CONFIG_FSP_M_CBFS)-type := fsp
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(CONFIG_FSP_S_CBFS)
$(CONFIG_FSP_S_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE))
$(CONFIG_FSP_S_CBFS)-type := fsp
endif

View File

@ -65,8 +65,7 @@ enum fsp_status fsp_memory_init(void **hob_list, struct range_entry *range)
{
struct fsp_header hdr;
/* TODO: do not hardcode CBFS file names */
if (fsp_load_binary(&hdr, "blobs/fspm.bin", range) != CB_SUCCESS)
if (fsp_load_binary(&hdr, CONFIG_FSP_M_CBFS, range) != CB_SUCCESS)
return FSP_NOT_FOUND;
return do_fsp_memory_init(hob_list, &hdr);

View File

@ -54,8 +54,7 @@ static enum fsp_status do_silicon_init(struct fsp_header *hdr)
enum fsp_status fsp_silicon_init(struct range_entry *range)
{
/* Load FSP-S and save FSP header. We will need it for Notify */
/* TODO: do not hardcode CBFS file names */
if (fsp_load_binary(&fsps_hdr, "blobs/fsps.bin", range) != CB_SUCCESS)
if (fsp_load_binary(&fsps_hdr, CONFIG_FSP_S_CBFS, range) != CB_SUCCESS)
return FSP_NOT_FOUND;
return do_silicon_init(&fsps_hdr);