audk/MdeModulePkg/Bus/Ufs/UfsBlockIoPei
Hao Wu 2df8798274 MdeModulePkg/UfsBlockIoPei: Correct use of 'DeviceIndex' in BlkIO PPI
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1474

Within UfsBlockIoPei, the current implementation of the Block IO(2)
services:

UfsBlockIoPeimGetMediaInfo
UfsBlockIoPeimReadBlocks
UfsBlockIoPeimGetMediaInfo2
UfsBlockIoPeimReadBlocks2

does not handle the input parameter 'DeviceIndex' properly.

According to both of the PI spec and the function description comments:

> DeviceIndex    Specifies the block device to which the function wants
>                to talk. ... This index is a number from one to
>                NumberBlockDevices.

But current codes incorrectly treat the valid range of 'DeviceIndex' as 0
to (NumberBlockDevices - 1).

This commit is to address this issue.

Cc: Jian J Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2019-02-25 16:33:49 +08:00
..
DmaMem.c MdeModulePkg/UfsBlockIoPei: Support IoMmu 2017-11-17 11:35:02 +08:00
UfsBlockIoPei.c MdeModulePkg/UfsBlockIoPei: Correct use of 'DeviceIndex' in BlkIO PPI 2019-02-25 16:33:49 +08:00
UfsBlockIoPei.h MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UfsBlockIoPei.inf MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UfsBlockIoPei.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UfsBlockIoPeiExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UfsHcMem.c MdeModulePkg UfsBlockIoPei: Remove redundant functions 2018-08-21 16:29:00 +08:00
UfsHcMem.h MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
UfsHci.c MdeModulePkg/Bus/Ufs: Ensure device not return more data than expected 2018-10-17 11:04:05 +08:00
UfsHci.h MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00