summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commonlib/Makefile.inc2
-rw-r--r--src/commonlib/fsp_relocate.c (renamed from src/commonlib/fsp1_1_relocate.c)11
-rw-r--r--src/commonlib/include/commonlib/fsp.h (renamed from src/commonlib/include/commonlib/fsp1_1.h)9
-rw-r--r--src/drivers/intel/fsp1_1/fsp_relocate.c2
4 files changed, 16 insertions, 8 deletions
diff --git a/src/commonlib/Makefile.inc b/src/commonlib/Makefile.inc
index 7c14f7cb8c..be22e0097d 100644
--- a/src/commonlib/Makefile.inc
+++ b/src/commonlib/Makefile.inc
@@ -11,7 +11,7 @@ ramstage-y += region.c
smm-y += region.c
postcar-y += region.c
-ramstage-$(CONFIG_PLATFORM_USES_FSP1_1) += fsp1_1_relocate.c
+ramstage-$(CONFIG_PLATFORM_USES_FSP1_1) += fsp_relocate.c
bootblock-y += cbfs.c
verstage-y += cbfs.c
diff --git a/src/commonlib/fsp1_1_relocate.c b/src/commonlib/fsp_relocate.c
index 501c08d3c9..7f1e49accf 100644
--- a/src/commonlib/fsp1_1_relocate.c
+++ b/src/commonlib/fsp_relocate.c
@@ -15,7 +15,7 @@
#include <console/console.h>
#include <commonlib/endian.h>
-#include <commonlib/fsp1_1.h>
+#include <commonlib/fsp.h>
/*
* Intel's code does not have a handle on changing global packing state.
* Therefore, one needs to protect against packing policies that are set
@@ -482,7 +482,7 @@ static ssize_t relocate_fvh(uintptr_t new_addr, void *fsp, size_t fsp_size,
}
/*
- * The entire FSP 1.1 image can be thought of as one
+ * The entire FSP image can be thought of as one
* program with a single link address even though there
* are multiple TEs linked separately. The reason is
* that each TE is linked for XIP. So in order to
@@ -511,7 +511,7 @@ static ssize_t relocate_fvh(uintptr_t new_addr, void *fsp, size_t fsp_size,
return fv_length;
}
-ssize_t fsp1_1_relocate(uintptr_t new_addr, void *fsp, size_t size)
+ssize_t fsp_component_relocate(uintptr_t new_addr, void *fsp, size_t size)
{
size_t offset;
size_t fih_offset;
@@ -542,3 +542,8 @@ ssize_t fsp1_1_relocate(uintptr_t new_addr, void *fsp, size_t size)
return relocate_remaining_items(fsp, size, new_addr, fih_offset);
}
+
+ssize_t fsp1_1_relocate(uintptr_t new_addr, void *fsp, size_t size)
+{
+ return fsp_component_relocate(new_addr, fsp, size);
+}
diff --git a/src/commonlib/include/commonlib/fsp1_1.h b/src/commonlib/include/commonlib/fsp.h
index a5bc193ed2..84e2c98a8b 100644
--- a/src/commonlib/include/commonlib/fsp1_1.h
+++ b/src/commonlib/include/commonlib/fsp.h
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright 2015 Google Inc.
+ * Copyright 2016 Google Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,8 +13,8 @@
* GNU General Public License for more details.
*/
-#ifndef _COMMONLIB_FSP1_1_H_
-#define _COMMONLIB_FSP1_1_H_
+#ifndef _COMMONLIB_FSP_H_
+#define _COMMONLIB_FSP_H_
#include <stddef.h>
#include <stdint.h>
@@ -23,6 +23,9 @@
* Relocate FSP held within buffer defined by size to new_addr. Returns < 0
* on error, offset to FSP_INFO_HEADER on success.
*/
+ssize_t fsp_component_relocate(uintptr_t new_addr, void *fsp, size_t size);
+
+/* API to relocate fsp 1.1 component. */
ssize_t fsp1_1_relocate(uintptr_t new_addr, void *fsp, size_t size);
#endif
diff --git a/src/drivers/intel/fsp1_1/fsp_relocate.c b/src/drivers/intel/fsp1_1/fsp_relocate.c
index 89d7cd9747..16d1dd59dc 100644
--- a/src/drivers/intel/fsp1_1/fsp_relocate.c
+++ b/src/drivers/intel/fsp1_1/fsp_relocate.c
@@ -15,7 +15,7 @@
#include <console/console.h>
#include <cbmem.h>
-#include <commonlib/fsp1_1.h>
+#include <commonlib/fsp.h>
#include <fsp/util.h>
int fsp_relocate(struct prog *fsp_relocd, const struct region_device *fsp_src)