diff mbox series

[edk2,platforms:,07/10] Marvell/Applications/FirmwareUpdate: Fix 32-bit issues

Message ID 1506304319-8620-8-git-send-email-mw@semihalf.com
State New
Headers show
Series None | expand

Commit Message

Marcin Wojtas Sept. 25, 2017, 1:51 a.m. UTC
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>


Fix casting and related issues to make this code build for 32-bit ARM.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Signed-off-by: Marcin Wojtas <mw@semihalf.com>

---
 Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
1.8.3.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c b/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c
index edb6986..664411a 100644
--- a/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c
+++ b/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c
@@ -165,7 +165,7 @@  PrepareFirmwareImage (
   IN LIST_ENTRY             *CheckPackage,
   IN OUT SHELL_FILE_HANDLE  *FileHandle,
   IN OUT UINTN              **FileBuffer,
-  IN OUT UINTN              *FileSize
+  IN OUT UINT64             *FileSize
   )
 {
   CONST CHAR16         *FileStr;
@@ -203,7 +203,7 @@  PrepareFirmwareImage (
   // Read Image header into buffer
   Buffer = AllocateZeroPool (*FileSize);
 
-  Status = FileHandleRead (*FileHandle, FileSize, Buffer);
+  Status = FileHandleRead (*FileHandle, (UINTN *)FileSize, Buffer);
   if (EFI_ERROR (Status)) {
     Print (L"%s: Cannot read Image file header\n", CMD_NAME_STRING);
     ShellCloseFile (FileHandle);
@@ -256,7 +256,7 @@  ShellCommandRunFUpdate (
 {
   IN SHELL_FILE_HANDLE    FileHandle;
   SPI_DEVICE              *Slave;
-  UINTN                   FileSize;
+  UINT64                  FileSize;
   UINTN                   *FileBuffer = NULL;
   CHAR16                  *ProblemParam;
   LIST_ENTRY              *CheckPackage;