coreboot-kgpe-d16/src/commonlib
Eddie Vas 1df1cf994a commonlib/fsp_relocate: add PE32 section support
Recently published Intel CedarIslandFSP binary contains PE images in
FSP-M and FSP-S. This causes coreboot boot hang on DeltaLake servers.
PI spec PI_Spec_1_7_final_Jan_2019 on uefi.org talks about FV files
requiring to support SECTION_PE32 sections and FSP specification
states that FSP images are created in alignment with PI specification.

FSP images are relocated at build time and run time using the func
fsp_component_relocate. That code only supported TE image relocation
so far.

The change required to add support for pe_relocate in fsp-relocate.c
I had to move a few functions to top of file as they need to be used
by pe_relocate but were placed below the te_relocate function. I chose
to place pe_relocate function next to te_relocate.
The code supports PE32 format, not PE32+, at this time.

Links for PE and FSP specs are provided below for reference.

Link= https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/fsp-architecture-spec-v2.pdf
Link= https://uefi.org/sites/default/files/resources/PI_Spec_1_7_final_Jan_2019.pdf

TESTED=
This code is tested with FSP version 33A for DeltaLake boot which has
FSP-M and FSP-S as PE32 sections. This FSP version does not boot on
DeltaLake without this change.

Change-Id: I01e2c123d74f735a647b994aa66419c9796f193e
Signed-off-by: Eddie Sharma <aeddiesharma@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66819
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nathaniel L Desimone <nathaniel.l.desimone@intel.com>
2022-09-24 01:19:13 +00:00
..
bsd cbfs/vboot: Adapt to new vb2_digest API 2022-09-02 23:51:29 +00:00
include/commonlib commonlib/clamp.h: Relicense file to be BSD-compatible 2022-08-17 19:49:13 +00:00
storage treewide: Remove "ERROR: "/"WARN: " prefixes from log messages 2022-02-07 23:29:09 +00:00
fsp_relocate.c commonlib/fsp_relocate: add PE32 section support 2022-09-24 01:19:13 +00:00
iobuf.c
Makefile.inc commonlib: Add support for rational number approximation 2022-08-03 03:26:13 +00:00
mem_pool.c commonlib/mem_pool: Allow configuring the alignment 2021-11-04 10:33:52 +00:00
rational.c commonlib: Add support for rational number approximation 2022-08-03 03:26:13 +00:00
region.c commonlib: Substitude macro "__unused" in compiler.h 2022-07-14 23:08:09 +00:00
sort.c