fix ia32 build error.
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Mar 2010 11:06:45 +0000 (11:06 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Mar 2010 11:06:45 +0000 (11:06 +0000)
With IA32 tool chain, we can not use a 64bit data to divide a 32 bit data. MS tool chain may introduce an intrinsic function.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@10268 6f19259b-4bc3-4df7-8a09-765794883524

edk2/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c

index 7d92065..1743b4c 100644 (file)
@@ -2563,8 +2563,8 @@ AtaEnableLongPhysicalSector (
       //\r
       if ((AtaIdentifyData->alignment_logic_in_phy_blocks & 0xc000) == 0x4000) {\r
         IdeDev->BlkIo.Media->LowestAlignedLba =\r
-          (EFI_LBA) (IdeDev->BlkIo.Media->LogicalBlocksPerPhysicalBlock - (AtaIdentifyData->alignment_logic_in_phy_blocks & 0x3fff)) %\r
-          IdeDev->BlkIo.Media->LogicalBlocksPerPhysicalBlock;\r
+          (EFI_LBA) ((IdeDev->BlkIo.Media->LogicalBlocksPerPhysicalBlock - ((UINT32)AtaIdentifyData->alignment_logic_in_phy_blocks & 0x3fff)) %\r
+          IdeDev->BlkIo.Media->LogicalBlocksPerPhysicalBlock);\r
       }\r
     }\r
     //\r