Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libflash: Don't merge ECC-protected ranges
Libflash currently merges contiguous ECC-protected ranges, but doesn't check that the ECC bytes at the end of the first and start of the second range actually match sanely. More importantly, if blocklevel_read() is called with a position at the start of a partition that is contained somewhere within a region that has been merged it will update the position assuming ECC wasn't being accounted for. This results in the position being somewhere well after the actual start of the partition which is incorrect. For now, remove the code merging ranges. This means more ranges must be held and checked however it prevents incorrectly reading ECC-correct regions like below: [ 174.334119453,7] FLASH: CAPP partition has ECC [ 174.437349574,3] ECC: uncorrectable error: ffffffffffffffff ff [ 174.437426306,3] FLASH: failed to read the first 0x1000 from CAPP partition, rc 14 [ 174.439919343,3] CAPP: Error loading ucode lid. index=201d1 Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
- Loading branch information