Skip to content

Commit

Permalink
td-shim-tools: fix the wrong IPL checksum
Browse files Browse the repository at this point in the history
Update the checksum after setting the FV header.

Signed-off-by: Jiaqi Gao <[email protected]>
  • Loading branch information
gaojiaqi7 committed Aug 8, 2024
1 parent b67b30e commit f01e020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion td-shim-tools/src/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl FvHeaderByte {
let mut tdx_ipl_fv_header = IplFvHeader::default();
tdx_ipl_fv_header.fv_header.fv_length =
(TD_SHIM_IPL_SIZE + TD_SHIM_RESET_VECTOR_SIZE) as u64;
tdx_ipl_fv_header.fv_header.checksum = 0x3d21;
tdx_ipl_fv_header.fv_header.update_checksum();
tdx_ipl_fv_header.fv_block_map[0].num_blocks =
(TD_SHIM_IPL_SIZE + TD_SHIM_RESET_VECTOR_SIZE) / 0x1000;
tdx_ipl_fv_header.fv_block_map[0].length = 0x1000;
Expand Down

0 comments on commit f01e020

Please sign in to comment.