From a5be7fa5c14a56d8544502c54cccc43637fab258 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 10 Sep 2015 22:52:27 -0500 Subject: drivers/intel/fsp1_1: split relocation code for tool use In order for easier consumption in userland tools split the FSP 1.1 relocation logic into a single file w/ an aptly named function name. BUG=chrome-os-partner:44827 BRANCH=None TEST=Built and booted glados. Change-Id: I49998b8621611c638375bc90884e80d0cd3bdf78 Signed-off-by: Patrick Georgi Original-Commit-Id: bc898e1c528df60683575d553d6194a1e8200afa Original-Change-Id: I736c0059d43f6d0be4fdb6e6f47cdb5c189a7ae8 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://chromium-review.googlesource.com/298833 Original-Reviewed-by: Duncan Laurie Reviewed-on: http://review.coreboot.org/11665 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/drivers/intel/fsp1_1/include/fsp/util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/drivers/intel/fsp1_1/include/fsp/util.h') diff --git a/src/drivers/intel/fsp1_1/include/fsp/util.h b/src/drivers/intel/fsp1_1/include/fsp/util.h index 9695b3b697..041c0f1200 100644 --- a/src/drivers/intel/fsp1_1/include/fsp/util.h +++ b/src/drivers/intel/fsp1_1/include/fsp/util.h @@ -53,6 +53,12 @@ void *get_first_resource_hob(const EFI_GUID *guid); */ int fsp_relocate(struct prog *fsp_relocd, const struct region_device *fsp_src); +/* + * Relocate FSP held within buffer defined by size to new_addr. Returns < 0 + * on error, offset to FSP_INFO_HEADER on success. + */ +ssize_t fsp1_1_relocate(uintptr_t new_addr, void *fsp, size_t size); + /* Additional HOB types not included in the FSP: * #define EFI_HOB_TYPE_HANDOFF 0x0001 * #define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002 -- cgit v1.2.3