]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Per UEFI Spec, LowestAlignedLba and LogicalBlocksPerPhysicalBlock must be 0 for logic...
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 Jul 2010 03:11:58 +0000 (03:11 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 Jul 2010 03:11:58 +0000 (03:11 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10668 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c

index 5629a746560153b69ea6bbb8d7e4d8bca07a7cc9..1b0c3b36eb61f3b33be779a89b2cfa771e1d5532 100644 (file)
@@ -4,7 +4,7 @@
   of the raw block devices media. Currently "El Torito CD-ROM", Legacy\r
   MBR, and GPT partition schemes are supported.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -658,6 +658,15 @@ PartitionInstallChildHandle (
 \r
   Private->Media.BlockSize      = (UINT32) BlockSize;\r
 \r
+  //\r
+  // Per UEFI Spec, LowestAlignedLba and LogicalBlocksPerPhysicalBlock must be 0\r
+  //  for logical partitions.\r
+  //\r
+  if (Private->BlockIo.Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION2) {\r
+    Private->BlockIo.Media->LowestAlignedLba              = 0;\r
+    Private->BlockIo.Media->LogicalBlocksPerPhysicalBlock = 0;\r
+  }\r
+\r
   Private->BlockIo.Reset        = PartitionReset;\r
   Private->BlockIo.ReadBlocks   = PartitionReadBlocks;\r
   Private->BlockIo.WriteBlocks  = PartitionWriteBlocks;\r