From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (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 D2A8021EB88D2 for ; Fri, 1 Sep 2017 08:13:41 -0700 (PDT) Received: by mail-io0-x229.google.com with SMTP id z67so3247137iof.2 for ; Fri, 01 Sep 2017 08:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=M1C6IU+ZUwhmkDSafIxLEkYXs05pe9TqIp64CCTljYc=; b=gZ2furelliFR4qHqyO30fvByWgOQ/Xp+v23FI9/actQSa9qRDsgd4rm4Zh5Ez08DEE tZ7NYEuhpQbT4jGcAcN6SpDUeaigCGrUq3PeNvJaIDjC0LbkAsa3m6slRS8H+zYDvDI4 6NqHRim2MJ1mhOf0y93fHL9O1mtTHkTJ/BGKA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=M1C6IU+ZUwhmkDSafIxLEkYXs05pe9TqIp64CCTljYc=; b=NW8DieY6iaxt5in1t9bUHJExa1pm5SXrQA6nZJT17c6thJTI7YY7Rv6mk+D69dWi4z 2EI5g6src11m9Jm+eW+nV9j6sQi5OWkW0ICO7Oy2aPwjypUC2ODbsBRabd6uF4Mf+vgx VqHesPsp4BQSXIScyj7+0UuxODfa3g8MfmP4nEb6ZFSX1U81BehNfW1WexjlfOaz+8gb OahuZi3QcVAxpHnL59oBk7g3TXZt1Pk+jTjyzxju8U7/wS6dgs/r14eivYCgKltApRqx JTI+SiUfZoWMfwhjjXAHH1En0gS0lUCgYRUHGk/iXXceqCyNjTSK9oPgh5DiJEaPrQm4 afOw== X-Gm-Message-State: AHPjjUh1Ic8PgTrW+4HyPFeE/EDW+b0rscx4XJq8QTttKB9lT65c3/9E kv3sS9ndvlCKdPjwPSc8jOCIZH4LlIVg X-Google-Smtp-Source: ADKCNb7DZbDJlBa7Jo4YL7vcIjZIrXYxfnHhyc2L+kc/coPXvr+OKImdNjPePrHxTAsPg628Y9xH6sWj6UEkmZ94qg8= X-Received: by 10.36.170.9 with SMTP id b9mr928518itf.63.1504278985840; Fri, 01 Sep 2017 08:16:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.162.1 with HTTP; Fri, 1 Sep 2017 08:16:24 -0700 (PDT) In-Reply-To: <20170901145450.ratc5spdlwlgzob2@bivouac.eciton.net> References: <1504271303-1782-1-git-send-email-mw@semihalf.com> <1504271303-1782-8-git-send-email-mw@semihalf.com> <20170901145450.ratc5spdlwlgzob2@bivouac.eciton.net> From: Ard Biesheuvel Date: Fri, 1 Sep 2017 16:16:24 +0100 Message-ID: To: Leif Lindholm Cc: Marcin Wojtas , "edk2-devel@lists.01.org" , Nadav Haklai , Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , Alexander Graf , =?UTF-8?B?SmFuIETEhWJyb8Wb?= Subject: Re: [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 15:13:42 -0000 Content-Type: text/plain; charset="UTF-8" On 1 September 2017 at 15:54, Leif Lindholm wrote: > On Fri, Sep 01, 2017 at 03:08:19PM +0200, Marcin Wojtas wrote: >> 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; >> + > > Rather than juggling around with temporary variables, why not make > FileSize in ShellCommandRunFUpdate() UINT64 and update > PrepareFirmwareImage() prototype accordingly? > I don't remember /exactly/, but I think it breaks in another place then.