From patchwork Fri Sep 1 13:08:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 111485 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp904877ybm; Fri, 1 Sep 2017 06:04:48 -0700 (PDT) X-Received: by 10.98.158.12 with SMTP id s12mr2231034pfd.246.1504271088017; Fri, 01 Sep 2017 06:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504271088; cv=none; d=google.com; s=arc-20160816; b=Nv18W5wmZx2EYpNUMOqLK8LGOmYwvjI835j4EKdKPVL+N1yqz6kP2yYYzu/iUcSnGB pz2g0O+u7l8vTsQrMtHZr1QR0k5TbFi2xeLvXj1gzzQSlCLpRpXee/zE4VukvZkGdoNI WT66OQuEGJG3FH4RliDFlUr6hf/mQfewG60bH+d4Hof4gt0XyE8oGi8ABc8+j/jbFqhL hrq79mCti+5jCDLeRIJLg1Y1RjvhNNxZgN6XD5a/kw+z2vxGH9YcpUI03QDouYn2wc/j s0tLJEoRKT6Ur7yyNAywksZCASPj2JuHmMbvFU8ofTD2G/nlfSWb33270AULp9DqMsOs 7O+g== 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=B+uR9Ry87/CWGW0wKlMAYiTautf1JuTmhILtmxHyHq0=; b=GIQ0Ei+CkaX7sZPQxRzsQbYNMxuVqfviTjHncaNXiEk0nwkwiZAuKaSdww08cIfnvf SB9kR3iAooxHrnHDnirslfYXWlpHD+FY59Bs83PyuxxIlTzRsgCmiself+H6R2BzzBmG ca5xtlsSlBPZt9JVLgXhQIExoqIwVNZuiQGVIMrIiiwoxsu73y+4vn3fTEYPG6B4C5qV qP1ZRcgqLBcxHBWr/m5ec/UhDis0GKuimC1yZnBJ6kxuEtYLF2K5Eu9g2fNTQl1DZfJ0 HPfWZuy0/IoYvTIzTG6YFKkGTZ5dl3MUHFADk2rVWItOl91hRF9mLwJjfIec8BGYUTm2 pt7g== 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=Fp1ihyQZ; 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 o18si84048pfe.308.2017.09.01.06.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 06:04:47 -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=Fp1ihyQZ; 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 01EDE21E62BA0; Fri, 1 Sep 2017 06:01:50 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (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 5133C21E11D25 for ; Fri, 1 Sep 2017 06:01:48 -0700 (PDT) Received: by mail-lf0-x22f.google.com with SMTP id d202so557139lfd.5 for ; Fri, 01 Sep 2017 06:04:32 -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=h06660dwlWHHSH7YQcU/Z4bWewYIwED8BdU0volT4Uo=; b=Fp1ihyQZjA4KFjn9YuKrJXGHcm6IcEn6dFIyyNtfaqjIOEeeEAoN+R1m6uUfJL8CVv Vm+LqU7Dfawp0+vVG2WuuSex2fFPGtfecCjBeOUxuERbzb7RDBrZMJIgKZe2SxSAqbE/ xx36xE/AS22XQb9oZKVDaufsDfT3s6OQg4Pfh/WusHfn++Y3xYUuAOTA5OLr1kzXOPr8 jWlBFkQVI5SmrcfN9wP8r/wl7BYtibkhtCROII91TkBpCdSvo5LApyV23rwViQRxj7kC kw+w+vuxnUi4s7V2c2D/8s7lqLj+15OlY2J55v9HuBgMJRpgGKyvdSrom3vuSK4P1XAx NxOQ== 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=h06660dwlWHHSH7YQcU/Z4bWewYIwED8BdU0volT4Uo=; b=kxTKZPeiDhBr+36Lk1kHxwfAkYZjAw+uFybDtD9lSLQ5ek2pDDX5ehVKCYq3OzXRtg bHj/PnWV2Cvcu6A6L16yVHP5ZRE3C4ktvTXXn1tic2REi81u6B1q1Y/5kP5kkJ85VDi3 nkXdAOuuR/HJ0A3sl6fYyOrZl3eh33UuFR86kh3n5Mrp9YngypBnm7d/XVqbvA2z6OeL 1zxFLlo02W1bbJqQhgcA1ewustoOXWGY6bs825ty3XUCo29vmhuJyF3tHeNOcN7RV9XS RD6hF3t0QZXEq2oSWs+jvP0VK8pmvvWvxkmeXA4VoMyzrB67vJGvcxkaPnJNJAC3tAqO cO5A== X-Gm-Message-State: AHPjjUiU6VqhoUYsXEejJFTKdPA3KypuJjFMfS/eg24BRCdUoh4ZBVG3 16j3IYrRajlFIhoZjsRkUA== X-Google-Smtp-Source: ADKCNb6SNKTA5bq1qp/DUcDGLXnixMomq5JwTvGyADOC5r8bq5TQvARqx0Cl2frzzNduzzGDRASvGw== X-Received: by 10.25.163.74 with SMTP id m71mr930780lfe.63.1504271070916; Fri, 01 Sep 2017 06:04:30 -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 m129sm21754lfg.26.2017.09.01.06.04.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 06:04:30 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Date: Fri, 1 Sep 2017 15:08:19 +0200 Message-Id: <1504271303-1782-8-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1504271303-1782-1-git-send-email-mw@semihalf.com> References: <1504271303-1782-1-git-send-email-mw@semihalf.com> Subject: [edk2] [platforms: PATCH 07/11] 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 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..0951734 100644 --- a/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c +++ b/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.c @@ -172,6 +172,7 @@ PrepareFirmwareImage ( EFI_STATUS Status; UINT64 OpenMode; UINTN *Buffer; + UINT64 Size; // Parse string from commandline FileStr = ShellCommandLineGetRawValue (CheckPackage, 1); @@ -195,11 +196,13 @@ PrepareFirmwareImage ( return EFI_DEVICE_ERROR; } - Status = FileHandleGetSize (*FileHandle, FileSize); + Status = FileHandleGetSize (*FileHandle, &Size); if (EFI_ERROR (Status)) { Print (L"%s: Cannot get Image file size\n", CMD_NAME_STRING); } + *FileSize = (UINTN)Size; + // Read Image header into buffer Buffer = AllocateZeroPool (*FileSize);