Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18319
6f19259b-4bc3-4df7-8a09-
765794883524
/** @file\r
Routines that use BIOS to support INT 13 devices.\r
\r
/** @file\r
Routines that use BIOS to support INT 13 devices.\r
\r
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
// Otherwise when offset adding data size exceeds 0xFFFF, if OpROM does not normalize TransferBuffer,\r
// INT13 function 42H will return data boundary error 09H.\r
//\r
// Otherwise when offset adding data size exceeds 0xFFFF, if OpROM does not normalize TransferBuffer,\r
// INT13 function 42H will return data boundary error 09H.\r
//\r
- AddressPacket->SegOffset = (UINT32) ((TransferBuffer >> 4) << 16);\r
+ AddressPacket->SegOffset = (UINT32) LShiftU64 (RShiftU64(TransferBuffer, 4), 16);\r
AddressPacket->Lba = (UINT64) Lba;\r
\r
Regs.H.AH = 0x42;\r
AddressPacket->Lba = (UINT64) Lba;\r
\r
Regs.H.AH = 0x42;\r
// Otherwise when offset adding data size exceeds 0xFFFF, if OpROM does not normalize TransferBuffer,\r
// INT13 function 42H will return data boundary error 09H.\r
//\r
// Otherwise when offset adding data size exceeds 0xFFFF, if OpROM does not normalize TransferBuffer,\r
// INT13 function 42H will return data boundary error 09H.\r
//\r
- AddressPacket->SegOffset = (UINT32) ((TransferBuffer >> 4) << 16);\r
+ AddressPacket->SegOffset = (UINT32) LShiftU64 (RShiftU64(TransferBuffer, 4), 16);\r
AddressPacket->Lba = (UINT64) Lba;\r
\r
Regs.H.AH = 0x43;\r
AddressPacket->Lba = (UINT64) Lba;\r
\r
Regs.H.AH = 0x43;\r