Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 567bc4b4ae8a975791382dd30ac413bc0d3ce88c
      
https://github.com/tianocore/edk2/commit/567bc4b4ae8a975791382dd30ac413bc0d3ce88c
  Author: Gaurav Jain <[email protected]>
  Date:   2020-06-12 (Fri, 12 Jun 2020)

  Changed paths:
    M EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c

  Log Message:
  -----------
  EmbeddedPkg/MmcDxe: Added MaxBlock Transfer Limit 65535 in R/W.

Moved BlockCount calculation below BufferSize Validation checks.
First Ensure Buffersize is Not Zero and multiple of Media BlockSize.
then calculate BlockCount and perform Block checks.

Corrected BlockCount calculation, as BufferSize is multiple of BlockSize,
So adding (BlockSize-1) bytes to BufferSize and
then divide by BlockSize will have no impact on BlockCount.

Reading Large Images from MMC causes errors.
As per SD Host Controller Spec version 4.20,
Restriction of 16-bit Block Count transfer is 65535.
Max block transfer limit in single cmd is 65535 blocks.
Added Max Block check that can be processed is 0xFFFF.
then Update BlockCount on the basis of MaxBlock.

Signed-off-by: Gaurav Jain <[email protected]>
Reviewed-by: "Loh, Tien Hock" <[email protected]>




_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to