diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index 5d06444784..401facf475 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -599,10 +599,10 @@ PartitionInstallChildHandle ( Private->ParentBlockIo = ParentBlockIo; Private->DiskIo = ParentDiskIo; - Private->BlockIo.Revision = EFI_BLOCK_IO_PROTOCOL_REVISION; + Private->BlockIo.Revision = ParentBlockIo->Revision; Private->BlockIo.Media = &Private->Media; - CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA)); + CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, SIZE_OF_EFI_BLOCK_IO_MEDIA_REV1); Private->Media.LogicalPartition = TRUE; Private->Media.LastBlock = DivU64x32 ( MultU64x32 ( diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h index d0d0d52a25..f36c9d411e 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h @@ -86,6 +86,9 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gPartitionComponentName2; (((UINT8 *) a)[3] << 24) ) +#define SIZE_OF_EFI_BLOCK_IO_MEDIA_REV1 ((UINTN)&((EFI_BLOCK_IO_MEDIA *)0)->LastBlock + sizeof(EFI_LBA)) +#define SIZE_OF_EFI_BLOCK_IO_MEDIA_REV2 sizeof(EFI_BLOCK_IO_MEDIA) + // // GPT Partition Entry Status // diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf b/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf index dd8a5fcea3..a52491aa40 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf +++ b/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf @@ -2,7 +2,7 @@ # Module that produces EBC Interprete and EBC Debug Support protocols. # # This module implements EFI Byte Code (EBC) Virtual Machine that can provide -# platform and processor-independent mechanisms forloading and executing EFI +# platform and processor-independent mechanisms for loading and executing EFI # device drivers. # # Copyright (c) 2006 - 2008, Intel Corporation.