Files
Zhiguang Liu 426da7fb1a IntelFsp2WrapperPkg: Rebase FSP-S and FSP-I if Image Base not match
FSP Spec says: "The FSP is not Position Independent Code (PIC) and
each FSP component has to be rebased if it is placed at a location
which is different from the preferred base address specified during
the FSP build."
Normally, the FSP location in flash is the same preferred base
address specified during the FSP build. To avoid FSP-S and FSP-I
running directly from flash, platform may copy the FSP binaries into
physical memory. This causes FSP location to be different from the
preferred base address.
To support this, this commit checks the Image Base from FSP header
and the FSP base address PCD. If these two are different, This commit
assumes the FSP is copied into physical memory and FSP location is
changed. In such scenario, the commit will rebase the FSP to the address
provided by the PCD.

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2025-10-30 08:13:29 +00:00
..