mirror of
				https://github.com/acidanthera/audk.git
				synced 2025-10-31 19:23:54 +01:00 
			
		
		
		
	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@10265 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
		
							parent
							
								
									9f50cb977c
								
							
						
					
					
						commit
						fa03149c12
					
				| @ -304,7 +304,8 @@ IdentifyAtaDevice ( | |||||||
|       // Check lowest alignment of logical blocks within physical block
 |       // Check lowest alignment of logical blocks within physical block
 | ||||||
|       //
 |       //
 | ||||||
|       if ((IdentifyData->alignment_logic_in_phy_blocks & (BIT14 | BIT15)) == BIT14) { |       if ((IdentifyData->alignment_logic_in_phy_blocks & (BIT14 | BIT15)) == BIT14) { | ||||||
|         BlockMedia->LowestAlignedLba = (EFI_LBA) (IdentifyData->alignment_logic_in_phy_blocks & 0x3fff); |         BlockMedia->LowestAlignedLba = (EFI_LBA) (BlockMedia->LogicalBlocksPerPhysicalBlock - (IdentifyData->alignment_logic_in_phy_blocks & 0x3fff)) % | ||||||
|  |           BlockMedia->LogicalBlocksPerPhysicalBlock; | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     //
 |     //
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user