]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioBlkDxe/VirtioBlk.c
OvmfPkg/VirtioBlkDxe: Fix VS2012 IA32 build
[mirror_edk2.git] / OvmfPkg / VirtioBlkDxe / VirtioBlk.c
index 1ac36cd17b486b7a6b00b7f6d870e40f564eb4d0..199b9dd0ae895c86b894b0f6da3515a338c98555 100644 (file)
@@ -11,6 +11,7 @@
     synchronous requests and EFI_BLOCK_IO_PROTOCOL for now.\r
 \r
   Copyright (C) 2012, Red Hat, Inc.\r
+  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
   under the terms and conditions of the BSD License which accompanies this\r
@@ -271,7 +272,7 @@ SynchronousRequest (
                    (BufferSize == 0 ? VIRTIO_BLK_T_FLUSH : VIRTIO_BLK_T_OUT) :\r
                    VIRTIO_BLK_T_IN;\r
   Request.IoPrio = 0;\r
-  Request.Sector = Lba * (BlockSize / 512);\r
+  Request.Sector = MultU64x32(Lba, BlockSize / 512);\r
 \r
   VirtioPrepare (&Dev->Ring, &Indices);\r
 \r