https://bugzilla.tianocore.org/show_bug.cgi?id=263
Fix IA32 build issues in the PlatformFlashAccessLib. Some of the
UINT64 FLASH addresses values need to be typecast to UINTN.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
}\r
\r
DEBUG((DEBUG_INFO, " - 0x%x(%x) - 0x%x\n", (UINTN)FlashAddress, (UINTN)FlashAddressType, Length));\r
}\r
\r
DEBUG((DEBUG_INFO, " - 0x%x(%x) - 0x%x\n", (UINTN)FlashAddress, (UINTN)FlashAddressType, Length));\r
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, FALSE);\r
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, FALSE);\r
\r
//\r
// Erase & Write\r
\r
//\r
// Erase & Write\r
Status = LibFvbFlashDeviceBlockErase((UINTN)FlashAddress, Length);\r
ASSERT_EFI_ERROR(Status);\r
if (EFI_ERROR(Status)) {\r
Status = LibFvbFlashDeviceBlockErase((UINTN)FlashAddress, Length);\r
ASSERT_EFI_ERROR(Status);\r
if (EFI_ERROR(Status)) {\r
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, TRUE);\r
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, TRUE);\r
DEBUG((DEBUG_ERROR, "Flash Erase error\n"));\r
return Status;\r
}\r
DEBUG((DEBUG_ERROR, "Flash Erase error\n"));\r
return Status;\r
}\r
Status = LibFvbFlashDeviceWrite((UINTN)FlashAddress, &Length, Buffer);\r
ASSERT_EFI_ERROR(Status);\r
if (EFI_ERROR(Status)) {\r
Status = LibFvbFlashDeviceWrite((UINTN)FlashAddress, &Length, Buffer);\r
ASSERT_EFI_ERROR(Status);\r
if (EFI_ERROR(Status)) {\r
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, TRUE);\r
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, TRUE);\r
DEBUG((DEBUG_ERROR, "Flash write error\n"));\r
return Status;\r
}\r
\r
DEBUG((DEBUG_ERROR, "Flash write error\n"));\r
return Status;\r
}\r
\r
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, TRUE);\r
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, TRUE);\r
\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
// Save original buffer\r
//\r
if (OffsetHead != 0) {\r
// Save original buffer\r
//\r
if (OffsetHead != 0) {\r
- CopyMem((UINT8 *)AlignedBuffer, (VOID *)AlignedFlashAddress, OffsetHead);\r
+ CopyMem((UINT8 *)AlignedBuffer, (VOID *)(UINTN)AlignedFlashAddress, OffsetHead);\r
}\r
if (OffsetTail != 0) {\r
}\r
if (OffsetTail != 0) {\r
- CopyMem((UINT8 *)AlignedBuffer + OffsetHead + Length, (VOID *)(AlignedFlashAddress + OffsetHead + Length), OffsetTail);\r
+ CopyMem((UINT8 *)AlignedBuffer + OffsetHead + Length, (VOID *)(UINTN)(AlignedFlashAddress + OffsetHead + Length), OffsetTail);\r
}\r
//\r
// Override new buffer\r
}\r
//\r
// Override new buffer\r