audk/EmbeddedPkg/Universal/MmcDxe
Gaurav Jain 567bc4b4ae 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 <gaurav.jain@nxp.com>
Reviewed-by: "Loh, Tien Hock" <tien.hock.loh@intel.com>
2020-06-12 08:12:27 +00:00
..
ComponentName.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
Diagnostics.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
Mmc.c EmbeddedPkg: rename gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuid 2020-04-30 08:11:42 +00:00
Mmc.h EmbeddedPkg: Fix various typos 2019-07-04 12:21:04 +01:00
MmcBlockIo.c EmbeddedPkg/MmcDxe: Added MaxBlock Transfer Limit 65535 in R/W. 2020-06-12 08:12:27 +00:00
MmcDebug.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
MmcDxe.inf EmbeddedPkg: rename gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuid 2020-04-30 08:11:42 +00:00
MmcIdentification.c EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00