mirror of https://github.com/acidanthera/audk.git
The ATA alignment_logic_in_phy_blocks field doesn’t directly report the lowest aligned LBA. Instead, there’s some modulo arithmetic involved.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10266 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fa03149c12
commit
c0d69d10f6
|
@ -2563,7 +2563,8 @@ AtaEnableLongPhysicalSector (
|
|||
//
|
||||
if ((AtaIdentifyData->alignment_logic_in_phy_blocks & 0xc000) == 0x4000) {
|
||||
IdeDev->BlkIo.Media->LowestAlignedLba =
|
||||
(EFI_LBA) (AtaIdentifyData->alignment_logic_in_phy_blocks & 0x3fff);
|
||||
(EFI_LBA) (IdeDev->BlkIo.Media->LogicalBlocksPerPhysicalBlock - (AtaIdentifyData->alignment_logic_in_phy_blocks & 0x3fff)) %
|
||||
IdeDev->BlkIo.Media->LogicalBlocksPerPhysicalBlock;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue