sign_gsc_firmware: add functions to determine ihex module base address
With the advent of D2 memory layout scheme it became impossible to
hardcode the base address of various components of the D2 firmware
image. Luckily, the components are represented as binary blobs in
Intel ihex format, which allows to retrieve the base address of the
component from the ihex records.
The address is composed of two elements: the segment base supplied in
the record type 02 or 04, and the record offset into the segment,
supplied in the data record of type 0.
The segment address is expressed as a 16 bit value, the actual value
shifted right either 4 bits (in case of record type 02) or 16 bits (in
case of record type 04). The data record offset is also a 16 bit
The base address of the blob is calculated as
<segment address> + <first data record offset>
and is available from the first two records in the ihex module.
Detailed information of ihex file format can be found in
TEST=with the next patch in the stack applied was able to successfully
build a multicomponent ti50 image.
Signed-off-by: Vadim Bendebury <firstname.lastname@example.org>
Tested-by: Vadim Bendebury <email@example.com>
Reviewed-by: George Engelbrecht <firstname.lastname@example.org>
Commit-Queue: Vadim Bendebury <email@example.com>
1 file changed