Change Partition/ScsiDxe driver to produce Block IO revision 3.

Signed-off-by: niruiyu
Reviewed-by: erictian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11692 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu
2011-05-23 07:47:19 +00:00
parent b8a62661e4
commit 0e87144ee0
2 changed files with 107 additions and 43 deletions

View File

@@ -1049,12 +1049,18 @@ PartitionInstallChildHandle (
Private->Media2.BlockSize = (UINT32) BlockSize;
//
// Per UEFI Spec, LowestAlignedLba and LogicalBlocksPerPhysicalBlock must be 0
// Per UEFI Spec, LowestAlignedLba, LogicalBlocksPerPhysicalBlock and OptimalTransferLengthGranularity must be 0
// for logical partitions.
//
if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION2) {
Private->BlockIo.Media->LowestAlignedLba = 0;
Private->BlockIo.Media->LogicalBlocksPerPhysicalBlock = 0;
Private->BlockIo.Media->LowestAlignedLba = 0;
Private->BlockIo.Media->LogicalBlocksPerPhysicalBlock = 0;
Private->BlockIo2.Media->LowestAlignedLba = 0;
Private->BlockIo2.Media->LogicalBlocksPerPhysicalBlock = 0;
if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION3) {
Private->BlockIo.Media->OptimalTransferLengthGranularity = 0;
Private->BlockIo2.Media->OptimalTransferLengthGranularity = 0;
}
}
Private->DevicePath = AppendDevicePathNode (ParentDevicePath, DevicePathNode);