public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Michael Kinney <michael.d.kinney@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiewen Yao <jiewen.yao@intel.com>,
	David Wei <david.wei@intel.com>, Mang Guo <mang.guo@intel.com>
Subject: [Patch 5/6] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Fix IA32 build issues
Date: Tue, 29 Nov 2016 02:11:48 -0800	[thread overview]
Message-ID: <1480414309-8084-6-git-send-email-michael.d.kinney@intel.com> (raw)
In-Reply-To: <1480414309-8084-1-git-send-email-michael.d.kinney@intel.com>

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>
---
 .../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



  parent reply	other threads:[~2016-11-29 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 10:11 [Patch 0/6] Fix MinnowMax build and boot issues Michael Kinney
2016-11-29 10:11 ` [Patch 1/6] Vlv2TbltDevicePkg: Allow BaseTools to run from sources Michael Kinney
2016-11-29 10:11 ` [Patch 2/6] Vlv2TbltDevicePkg: Set CAPSULE_ENABLE to TRUE Michael Kinney
2016-11-29 10:11 ` [Patch 3/6] Vlv2TbltDevicePkg/PlatformInitPei: Workaround unaligned SMRAM size Michael Kinney
2016-11-29 10:11 ` [Patch 4/6] Vlv2TbltDevicePkg: Remove SMM binary modules from FDF Michael Kinney
2016-11-29 10:11 ` Michael Kinney [this message]
2016-11-29 10:11 ` [Patch 6/6] Vlv2TbltDevicePkg: Fix IA32 boot timeouts Michael Kinney
2016-11-29 11:33 ` [Patch 0/6] Fix MinnowMax build and boot issues Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480414309-8084-6-git-send-email-michael.d.kinney@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox