summaryrefslogtreecommitdiffstats
path: root/Vlv2TbltDevicePkg
diff options
context:
space:
mode:
authorMichael Kinney <michael.d.kinney@intel.com>2016-11-29 01:13:21 -0800
committerMichael Kinney <michael.d.kinney@intel.com>2016-11-29 08:17:50 -0800
commit71d86ec879ae573a264eed71dd1bff9d547e70b0 (patch)
tree5d1c25bfd3e7b1def38a5f26d9149ab814e3f9c9 /Vlv2TbltDevicePkg
parent97e862bbbdd112c0d9523292b0184e74c1a220fc (diff)
downloadedk2-71d86ec879ae573a264eed71dd1bff9d547e70b0.tar.gz
edk2-71d86ec879ae573a264eed71dd1bff9d547e70b0.tar.bz2
edk2-71d86ec879ae573a264eed71dd1bff9d547e70b0.zip
Vlv2TbltDevicePkg/PlatformFlashAccessLib: Fix IA32 build issues
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>
Diffstat (limited to 'Vlv2TbltDevicePkg')
-rw-r--r--Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
index efa1dca66e..f3cb31daaa 100644
--- a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
+++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c
@@ -59,7 +59,7 @@ PerformFlashWrite (
}
DEBUG((DEBUG_INFO, " - 0x%x(%x) - 0x%x\n", (UINTN)FlashAddress, (UINTN)FlashAddressType, Length));
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, FALSE);
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, FALSE);
//
// Erase & Write
@@ -67,7 +67,7 @@ PerformFlashWrite (
Status = LibFvbFlashDeviceBlockErase((UINTN)FlashAddress, Length);
ASSERT_EFI_ERROR(Status);
if (EFI_ERROR(Status)) {
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, TRUE);
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, TRUE);
DEBUG((DEBUG_ERROR, "Flash Erase error\n"));
return Status;
}
@@ -75,12 +75,12 @@ PerformFlashWrite (
Status = LibFvbFlashDeviceWrite((UINTN)FlashAddress, &Length, Buffer);
ASSERT_EFI_ERROR(Status);
if (EFI_ERROR(Status)) {
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, TRUE);
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, TRUE);
DEBUG((DEBUG_ERROR, "Flash write error\n"));
return Status;
}
- LibFvbFlashDeviceBlockLock(FlashAddress, Length, TRUE);
+ LibFvbFlashDeviceBlockLock((UINTN)FlashAddress, Length, TRUE);
return EFI_SUCCESS;
}
@@ -146,10 +146,10 @@ MicrocodeFlashWrite (
// Save original buffer
//
if (OffsetHead != 0) {
- CopyMem((UINT8 *)AlignedBuffer, (VOID *)AlignedFlashAddress, OffsetHead);
+ CopyMem((UINT8 *)AlignedBuffer, (VOID *)(UINTN)AlignedFlashAddress, OffsetHead);
}
if (OffsetTail != 0) {
- CopyMem((UINT8 *)AlignedBuffer + OffsetHead + Length, (VOID *)(AlignedFlashAddress + OffsetHead + Length), OffsetTail);
+ CopyMem((UINT8 *)AlignedBuffer + OffsetHead + Length, (VOID *)(UINTN)(AlignedFlashAddress + OffsetHead + Length), OffsetTail);
}
//
// Override new buffer