From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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: 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: [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: , X-List-Received-Date: Fri, 01 Sep 2017 13:01:48 -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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 1.8.3.1