summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commonlib/Makefile.inc3
-rw-r--r--src/drivers/intel/fsp2_0/util.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/commonlib/Makefile.inc b/src/commonlib/Makefile.inc
index 53975bcad8c4..9347f88f9c0d 100644
--- a/src/commonlib/Makefile.inc
+++ b/src/commonlib/Makefile.inc
@@ -22,6 +22,9 @@ smm-y += region.c
postcar-y += region.c
ramstage-$(CONFIG_PLATFORM_USES_FSP1_1) += fsp_relocate.c
+ifeq ($(CONFIG_FSP_M_XIP),)
+romstage-$(CONFIG_PLATFORM_USES_FSP2_0) += fsp_relocate.c
+endif
ramstage-$(CONFIG_PLATFORM_USES_FSP2_0) += fsp_relocate.c
bootblock-y += cbfs.c
diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c
index 112801333f99..49934fe6de0f 100644
--- a/src/drivers/intel/fsp2_0/util.c
+++ b/src/drivers/intel/fsp2_0/util.c
@@ -163,8 +163,8 @@ enum cb_err fsp_load_component(struct fsp_load_descriptor *fspld, struct fsp_hea
if (!dest)
return CB_ERR;
- /* Don't allow FSP-M relocation. */
- if (!fspm_env() && fsp_component_relocate((uintptr_t)dest, dest, output_size) < 0) {
+ /* Don't allow FSP-M relocation when XIP. */
+ if (!fspm_xip() && fsp_component_relocate((uintptr_t)dest, dest, output_size) < 0) {
printk(BIOS_ERR, "Unable to relocate FSP component!\n");
return CB_ERR;
}