edk2/MdeModulePkg/Universal/Disk/PartitionDxe
Zhichao Gao a35de0aff3 MdeModulePkg/PartitionDxe: Correct the MBR last block value
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823

PartitionValidMbr function's second parameter should be the
last sector of the device. For MBR partition, the block size is
sector size, i.e. 512 bytes. The original value is media block
last LBA which is counted by the media block size. And media
block size is not always 512 bytes, it may be larger which would
cause the MBR boundary check incorrect. The boundary check is
based on the partition entry start LBA and size of LBA which
are both counted by the sector number (512 bytes).

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2020-07-15 01:18:13 +00:00
..
ComponentName.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
ElTorito.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Gpt.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Mbr.c MdeModulePkg/PartitionDxe: Correct the MBR last block value 2020-07-15 01:18:13 +00:00
Partition.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Partition.h MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PartitionDxe.inf MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PartitionDxe.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PartitionDxeExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Udf.c MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00