From b0c2fe05544704bc13e7e9d1d9f27802c38ef00f Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 9 May 2016 12:23:01 -0700 Subject: cbfstool/fsp: Rename fsp1_1_relocate FSP 2.0 uses the same relocate logic as FSP 1.1. Thus, rename fsp1_1_relocate to more generic fsp_component_relocate that can be used by cbfstool to relocate either FSP 1.1 or FSP 2.0 components. Allow FSP1.1 driver to still call fsp1_1_relocate which acts as a wrapper for fsp_component_relocate. Change-Id: I14a6efde4d86a340663422aff5ee82175362d1b0 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/14749 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Werner Zeh --- util/cbfstool/Makefile.inc | 2 +- util/cbfstool/cbfstool.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'util/cbfstool') diff --git a/util/cbfstool/Makefile.inc b/util/cbfstool/Makefile.inc index 568b934afa..aa42f012ad 100644 --- a/util/cbfstool/Makefile.inc +++ b/util/cbfstool/Makefile.inc @@ -12,7 +12,7 @@ cbfsobj += fit.o cbfsobj += partitioned_file.o # COMMONLIB cbfsobj += cbfs.o -cbfsobj += fsp1_1_relocate.o +cbfsobj += fsp_relocate.o cbfsobj += lz4_wrapper.o cbfsobj += mem_pool.o cbfsobj += region.o diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 744893cdef..0f24af99c9 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -29,7 +29,7 @@ #include "cbfs_sections.h" #include "fit.h" #include "partitioned_file.h" -#include +#include #define SECTION_WITH_FIT_TABLE "BOOTBLOCK" @@ -515,12 +515,13 @@ static int cbfstool_convert_fsp(struct buffer *buffer, memcpy(buffer_get(&fsp), buffer_get(buffer), buffer_size(buffer)); /* Replace the buffer contents w/ the relocated ones on success. */ - if (fsp1_1_relocate(address, buffer_get(&fsp), buffer_size(&fsp)) > 0) { + if (fsp_component_relocate(address, buffer_get(&fsp), buffer_size(&fsp)) + > 0) { buffer_delete(buffer); buffer_clone(buffer, &fsp); } else { buffer_delete(&fsp); - WARN("FSP was not a 1.1 variant.\n"); + WARN("Invalid FSP variant.\n"); } /* Let the raw path handle all the cbfs metadata logic. */ -- cgit v1.2.3