fix ia32 build error.
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Mar 2010 11:06:21 +0000 (11:06 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Mar 2010 11:06:21 +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@10267 6f19259b-4bc3-4df7-8a09-765794883524

edk2/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c

index d11ebd9..b10a7a7 100644 (file)
@@ -304,8 +304,8 @@ IdentifyAtaDevice (
       // Check lowest alignment of logical blocks within physical block\r
       //\r
       if ((IdentifyData->alignment_logic_in_phy_blocks & (BIT14 | BIT15)) == BIT14) {\r
-        BlockMedia->LowestAlignedLba = (EFI_LBA) (BlockMedia->LogicalBlocksPerPhysicalBlock - (IdentifyData->alignment_logic_in_phy_blocks & 0x3fff)) %\r
-          BlockMedia->LogicalBlocksPerPhysicalBlock;\r
+        BlockMedia->LowestAlignedLba = (EFI_LBA) ((BlockMedia->LogicalBlocksPerPhysicalBlock - ((UINT32)IdentifyData->alignment_logic_in_phy_blocks & 0x3fff)) %\r
+          BlockMedia->LogicalBlocksPerPhysicalBlock);\r
       }\r
     }\r
     //\r