summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PiDxeS3BootScriptLib
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-09-10 01:23:42 +0300
committerLaszlo Ersek <lersek@redhat.com>2017-09-12 13:12:29 +0300
commitb19aeeb91e3c548a7f42828f4d474e23ae6b59b8 (patch)
treed8bebb28c04d0121402f4f22bf62c9e8b8770af7 /MdeModulePkg/Library/PiDxeS3BootScriptLib
parenteb928b17c5c4a3918ba1d16aed5fbd797e69e75e (diff)
downloadedk2-b19aeeb91e3c548a7f42828f4d474e23ae6b59b8.tar.xz
MdeModulePkg/PartitionDxe: don't divide 64-bit values with C operators
In edk2, the division and shifting of 64-bit values are forbidden with C-language operators, because the compiler may generate intrinsic calls for them. For example, clang-3.8 emits a call to "__umoddi3" for UDF_LOGICAL_SECTOR_SIZE % Media->BlockSize in PartitionInstallUdfChildHandles(), if PartitionDxe is built for IA32, which then fails to link. UDF_LOGICAL_SECTOR_SIZE has type UINT64, while EFI_BLOCK_IO_MEDIA.BlockSize has type UINT32(). Replace the % operator with a DivU64x32Remainder() call. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Paulo Alcantara <pcacjr@zytor.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib')
0 files changed, 0 insertions, 0 deletions