[edk2-devel] [PATCH] MdeModulePkg/PartitionDxe: Revert the child handler blocksize change
Ni, Ray
ray.ni at intel.com
Tue Oct 13 02:54:09 UTC 2020
Reviewed-by: Ray Ni <ray.ni at intel.com>
> -----Original Message-----
> From: Gao, Zhichao <zhichao.gao at intel.com>
> Sent: Monday, October 12, 2020 3:23 PM
> To: devel at edk2.groups.io
> Cc: Ni, Ray <ray.ni at intel.com>; Wu, Hao A <hao.a.wu at intel.com>
> Subject: [PATCH] MdeModulePkg/PartitionDxe: Revert the child handler blocksize change
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2843
>
> Revert the patch to change the block size in child handler. It would
> block the CD (Eltorito) Hard disk media type's sub partition being
> observed.
> The blocksize patch used to fix the CD image's MBR table issue. The
> CD MBR table would always be ignored because it would be handled
> by the Eltorito partition handler first and never go into the MBR
> handler. So directly revert it.
>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
> ---
> MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
> index f10ce7c65b..473e091320 100644
> --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
> +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c
> @@ -1149,8 +1149,8 @@ PartitionInstallChildHandle (
>
> Private->Signature = PARTITION_PRIVATE_DATA_SIGNATURE;
>
> - Private->Start = MultU64x32 (Start, BlockSize);
> - Private->End = MultU64x32 (End + 1, BlockSize);
> + Private->Start = MultU64x32 (Start, ParentBlockIo->Media->BlockSize);
> + Private->End = MultU64x32 (End + 1, ParentBlockIo->Media->BlockSize);
>
> Private->BlockSize = BlockSize;
> Private->ParentBlockIo = ParentBlockIo;
> @@ -1187,7 +1187,13 @@ PartitionInstallChildHandle (
>
> Private->Media.IoAlign = 0;
> Private->Media.LogicalPartition = TRUE;
> - Private->Media.LastBlock = End - Start;
> + Private->Media.LastBlock = DivU64x32 (
> + MultU64x32 (
> + End - Start + 1,
> + ParentBlockIo->Media->BlockSize
> + ),
> + BlockSize
> + ) - 1;
>
> Private->Media.BlockSize = (UINT32) BlockSize;
>
> --
> 2.21.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66150): https://edk2.groups.io/g/devel/message/66150
Mute This Topic: https://groups.io/mt/77455892/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list