FSP: Fix relocation of TE Images

Adjust the calculations to eliminate the carry bit.  When doing 64-bit
math, this bit was showing up in the ImageBase address.

Also remove the second adjustment for the fixup_offset.  This was
causing an error in the ImageBase address.

Verified by manually running the bct tool on the FSP binary and
comparing the output with the code after relocation.

BRANCH=none
BUG=None
TEST=Build and run on cyan

Change-Id: Ifb277133d326336a08dd46138494a75cb1a1db3d
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/271223
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Hannah Williams <hannah.williams@intel.com>
Tested-by: Hannah Williams <hannah.williams@intel.com>
diff --git a/src/drivers/intel/fsp/fsp_relocate.c b/src/drivers/intel/fsp/fsp_relocate.c
index 4dc04ec..3cbc6a5 100644
--- a/src/drivers/intel/fsp/fsp_relocate.c
+++ b/src/drivers/intel/fsp/fsp_relocate.c
@@ -122,9 +122,8 @@
 		(void *)(uintptr_t)(teih->ImageBase + fixup_offset),
 		te, adj);
 
-	/* Adjust ImageBase for consistency. Need to subtract fixup_offset
-	 * so the image could be relocated if needed. */
-	teih->ImageBase += adj - fixup_offset;
+	/* Adjust ImageBase for consistency. */
+	teih->ImageBase = (uint32_t)(teih->ImageBase + adj);
 
 	relocd = &teih->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC];