From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c0c::22b; helo=mail-wr0-x22b.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7B8A121E43B49 for ; Sun, 24 Sep 2017 18:43:00 -0700 (PDT) Received: by mail-wr0-x22b.google.com with SMTP id c23so5205618wrg.9 for ; Sun, 24 Sep 2017 18:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1//VL5mBW5jm8XEx4gE9ikWDIwbkP/HicJgHS5QOD4k=; b=a/JlMr/xdPYRULR9Xq3Bcdb9I+lKrUeiQbyAeH3fy+PF35FdJAX3n7w4E5h3pQN1de 9T3fg1kRseohbLOhNvyujEKQLa4d1noDeLbU2q/q6HLoHZkxcCcy0LY5vjU3gTbqrxs3 BDhhSmdn/qc2yceNcj14133eqUuknbMr8HAZucwNwGyiq3hl9R3Q5WO9E1z2at6j4EB+ VumleqKnamXmHw2sO769wKyhvGN+OHZryYwS4CEl2mn4QtfAEwxlK4Uwz2nzvcPJMX/o QWS7eQaHhcMPmUrtIDf1XT02AUlRPmCdUrXuv2fWDWe7WxMn/zGpgnHEDzU96gzeY0qM KBcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1//VL5mBW5jm8XEx4gE9ikWDIwbkP/HicJgHS5QOD4k=; b=FPAkRQO8b6RyAxuOK2TxETJIA0n+DBWoSXEsTTj+szfKLi07GLMU8RePc10I0Rka2b +qD4fJsBZ6T7maeGlzs1fOwWEirYr+8zL63lrSADQMnJiITdJloid9o341DyvW/UN5yL AjSf/tPQE7RX/o1zX0IdaiKGh5cz110DqlMamB1qVGG4V8pNAHbxKhBRYBY0wRiOxgg+ lGijE26gLdHbEMmuoUvBdFcDTYCqrBDWI433QQvGHjQPgrACVoaTQCui182gvYhbf4QF AoDLPw9cTD6DWRqemaBs/Xw24nz8c2cCQU7OvtafkH/n3c9vOXwcXqrKWj4Rs6pih+pa WxJw== X-Gm-Message-State: AHPjjUhVovbzuUk+cbW1bVIoa6AySOy2hS4etgzmPoqNNhuO+dThs9Dm A6/zgkM3sjWYvkX7Apsi28LzE7ub4mw= X-Google-Smtp-Source: AOwi7QD+pm4iIUeX1mnHdiizJ/VQ5CjuVozDTB8saLsGqXDAkqdnQeC/qqyzyEO8MZEe4FXLzvqefQ== X-Received: by 10.46.77.9 with SMTP id a9mr2065788ljb.127.1506303969817; Sun, 24 Sep 2017 18:46:09 -0700 (PDT) Received: from enkidu.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id f16sm809520lfe.66.2017.09.24.18.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:09 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, neta@marvell.com, kostap@marvell.com, jinghua@marvell.com, agraf@suse.de, mw@semihalf.com, jsd@semihalf.com Date: Mon, 25 Sep 2017 03:51:56 +0200 Message-Id: <1506304319-8620-8-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1506304319-8620-1-git-send-email-mw@semihalf.com> References: <1506304319-8620-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH 07/10] Marvell/Applications/FirmwareUpdate: Fix 32-bit issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 01:43:00 -0000 From: Ard Biesheuvel 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 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 1.8.3.1