From c0d69d10f6f09bdecba70f5750c46b29795e8287 Mon Sep 17 00:00:00 2001 From: erictian Date: Wed, 17 Mar 2010 09:48:05 +0000 Subject: [PATCH] =?UTF-8?q?The=20ATA=20alignment=5Flogic=5Fin=5Fphy=5Fbloc?= =?UTF-8?q?ks=20field=20doesn=E2=80=99t=20directly=20report=20the=20lowest?= =?UTF-8?q?=20aligned=20LBA.=20=20Instead,=20there=E2=80=99s=20some=20modu?= =?UTF-8?q?lo=20arithmetic=20involved.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10266 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c index c22f7a3b30..7d92065b1c 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c +++ b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c @@ -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; } } //