From patchwork Mon Sep 25 01:51:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 114165 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2068418qgf; Sun, 24 Sep 2017 18:46:25 -0700 (PDT) X-Received: by 10.99.102.1 with SMTP id a1mr6124467pgc.431.1506303985497; Sun, 24 Sep 2017 18:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506303985; cv=none; d=google.com; s=arc-20160816; b=vTCSdUrLAPuDGP/jHFK84oYA7oEBz66vpy/6yfOGrBFfqdq57vAc6yGKAXjjjIhS9A RVzHXZKskeVF7K9XmShqYkhkQE6N+o2UZQIb+sP1H4I/IFSWo9GpbRDSEE1M4/jwo1wy 9X7ZEiusjg7MzXMsQGTrW/XXERheTKTG63TzPSRbinSo8OrhSTUNWk2d6RzjCE70+q2y d2SBU9WXU0hVZP/JOl9Pr5vcW0g2NA1MSLdHWg81UPf/xtzwKq4GSq/Sv0CCv1xFd+8e mwPa7uDZFL6tJe5fxwjK5sUPUBmqe+Tn5qXZnQ7qdlIumgEoqLwketPoQmrQfp6WUFNQ TXZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=TEbFsWDFb4xeK0d4CslN0CD8oyQ4ULHeQSfOgTEwhJ4=; b=E5zbjmyg2UBZIvOXUoPRji+RCY/ku8tNRYtKpbZDjqK46sNNYctTh10GEliIkfMOKU MsaNHgDo5lrVWpfUclI9mg/6GWwEcpZlONdQc2d8peqROTaLR1/uU//CC5FH/zs01bRE pf/vMjOAbOjbIv7+aDnYX7UPdVIn2Nuej2qX63B7prF+VNh9KMCuRM9F4xdJ8Pa9vpc8 eTK+IgQQyDctRP/LuNWHwihBypUJSn/jQRvFLA2Jkl3fuRAj0fqQLzj2OgCWVggabvAV UmaJRXKwwOLURmARnT4cxjhfcB31r6bxx2cIS/5RBhNrIh1f2wD6kDQ8SIsnq0p7icjE OGZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=a/JlMr/x; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id o127si3192617pfg.588.2017.09.24.18.46.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=a/JlMr/x; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B561821E74920; Sun, 24 Sep 2017 18:43:05 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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 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: [edk2] [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: , Cc: jinghua@marvell.com, ard.biesheuvel@linaro.org, agraf@suse.de, leif.lindholm@linaro.org, nadavh@marvell.com, neta@marvell.com, kostap@marvell.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel 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;