AR# 59460

2013.4 FSBL: MD5 Checksum failure for encrypted images

描述

The FSBL MD5 checksum is failing for encrypted images.

The failure is due to incorrect length fields being considered for validating the MD5 checksum for encrypted images.

For encrypted images, PartitionImageLength and PartitionDataLen are not the same.

The whole Partition Image length should be copied for checksum validation.

However, when copying the partition for checksum validation, FSBL is using both
PartitionImageLength and PartitionDataLen for PCAP DMA which results in some bytes being missed.

解决方案

The fix for this issue would be to use only one of these variables (for example PartitionImageLength) consistently.
 
u32 PartitionMove(u32 ImageBaseAddress, PartHeader *Header)
{
                // Update the length fields for header
/*
                 * For Signed or checksum enabled partition,
                 * Total partition image need to copied to DDR
                 */
                if (SignedPartitionFlag || PartitionChecksumFlag) {
                                ImageWordLen = Header->PartitionWordLen;
                                DataWordLen = Header->PartitionWordLen;
                }
               
                // For Linear devices, copy data to DDR using PCAP
                Status = PcapDataTransfer((u32*)SourceAddr,
                                                                                (u32*)LoadAddr,
                                                                                ImageWordLen,
                                                                                DataWordLen,
                                                                                SecureTransferFlag);
 
                // For non-linear devices copy data using MoveImage
}

AR# 59460
日期 05/16/2014
状态 Active
Type 已知问题
器件