mirror of https://github.com/acidanthera/audk.git
OVMF BlockMmioToBlockIoDxe: Fix build error for VS2005
The previous code would generate compiler intrinsic function calls. Patch provided by Scott Wang. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10305 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
571f4f52d4
commit
f46d494a8e
|
@ -109,11 +109,11 @@ ReadOrWriteBlocks (
|
|||
//
|
||||
// BufferSize must be a multiple of the intrinsic block size of the device.
|
||||
//
|
||||
if ((BufferSize % Media->BlockSize) != 0) {
|
||||
if (ModU64x32 (BufferSize, Media->BlockSize) != 0) {
|
||||
return EFI_BAD_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
TotalBlock = BufferSize / Media->BlockSize;
|
||||
TotalBlock = (UINTN) DivU64x32 (BufferSize, Media->BlockSize);
|
||||
|
||||
//
|
||||
// Make sure the range to read is valid.
|
||||
|
@ -131,9 +131,9 @@ ReadOrWriteBlocks (
|
|||
}
|
||||
|
||||
Address = Private->BlockMmio->BaseAddress;
|
||||
Address += Media->BlockSize * Lba;
|
||||
Address += MultU64x32 (Lba, Media->BlockSize);
|
||||
|
||||
Count = BufferSize / 8;
|
||||
Count = BufferSize >> 3;
|
||||
|
||||
if (ReadData) {
|
||||
CpuAccessFunction = Private->CpuIo->Mem.Read;
|
||||
|
|
Loading…
Reference in New Issue