From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B1B8981EC9 for ; Tue, 29 Nov 2016 02:11:57 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 29 Nov 2016 02:11:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,568,1473145200"; d="scan'208";a="196887446" Received: from mdkinney-mobl.amr.corp.intel.com ([10.254.72.205]) by fmsmga004.fm.intel.com with ESMTP; 29 Nov 2016 02:11:57 -0800 From: Michael Kinney To: edk2-devel@lists.01.org Cc: Jiewen Yao , David Wei , Mang Guo Date: Tue, 29 Nov 2016 02:11:48 -0800 Message-Id: <1480414309-8084-6-git-send-email-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.6.3.windows.1 In-Reply-To: <1480414309-8084-1-git-send-email-michael.d.kinney@intel.com> References: <1480414309-8084-1-git-send-email-michael.d.kinney@intel.com> Subject: [Patch 5/6] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Fix IA32 build issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 10:11:57 -0000 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 Cc: David Wei Cc: Mang Guo Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney --- .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c index efa1dca..f3cb31d 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 -- 2.6.3.windows.1