diff options
author | Furquan Shaikh <furquan@google.com> | 2016-05-09 12:23:01 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-05-11 18:38:28 +0200 |
commit | b0c2fe05544704bc13e7e9d1d9f27802c38ef00f (patch) | |
tree | 900030c1ef9e0274ab2719812f44c0792799e3b3 /util | |
parent | 61c1a05c07be4a7805a0595475cba3b9e8386b77 (diff) | |
download | coreboot-b0c2fe05544704bc13e7e9d1d9f27802c38ef00f.tar.xz |
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 <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14749
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/Makefile.inc | 2 | ||||
-rw-r--r-- | util/cbfstool/cbfstool.c | 7 |
2 files changed, 5 insertions, 4 deletions
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 <commonlib/fsp1_1.h> +#include <commonlib/fsp.h> #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. */ |