From patchwork Mon Sep 25 01:51:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 114166 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2068441qgf; Sun, 24 Sep 2017 18:46:28 -0700 (PDT) X-Received: by 10.84.218.71 with SMTP id f7mr6021774plm.145.1506303988679; Sun, 24 Sep 2017 18:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506303988; cv=none; d=google.com; s=arc-20160816; b=wU2BGq7zY+3lLa73wTk8/pWCjYyI0Co9adfGeKA0k4TkBTOP9lQQBC9k5116KhbUKl kzKkdBHGgzn59+UKyiRn7MVeAgSggz+deLYBuxtljKAnxOlFVZEPk8yf4qHWFvWk1LcF bhsMfgF1wQ7DiGZzS0pXnWNfnJM4zT2dmgi+9+ls30tY5HVJpqAyMb97+i4q82APykMs ffWOoFglNFmm1EmbwImeOoH/W+0Ey24rhcM+q19AaZ2NtMYilFDoCZLY6B+N/BGXqLJU FDOQI6u8yDOtPkDpIrcE3iKbye64bAntK1SdC7QjlXLbHRzdcaaQ0GLXq937HMwz/5Co ar1g== 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=zxvNOkTczaB2Kv+jjq55xjKWzhlMnnX9LN9F9OENko0=; b=klfrLdSQnlNueCvYBgrmegu/D0HsGkbfcR8noPtgKA9Ikob/myBNPpo7szB31zY4Cy Ljg6D0Moh1USxkwbTI0A2MiSS635ApYoacN33LifB6Po5zScEStdq/3b5eVsREHXYenc BIMKMYVJK2fyN8k5+I6Oy5CLH5IWtpgn1kRp/iw0YNo/LFTJnhD4yvsjtnProqSlzuPu gVQyAuYgq9Nvy/6A5luexieeEfzX4MyHWdob9uX6FMrYZKizPlY079Y30Xai1fyCfrbr wRdWpQJ/EEte7B+rRIKh3JgKMGQPIuks0FMffISDojJ+FITTPcqn+NaHhTYHs2eOuUO7 Yl/g== 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=kPk0zMbh; 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 p3si3364931plk.270.2017.09.24.18.46.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:28 -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=kPk0zMbh; 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 009F721E87996; Sun, 24 Sep 2017 18:43:06 -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::22f; helo=mail-wr0-x22f.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::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 B017321E43B6C for ; Sun, 24 Sep 2017 18:43:01 -0700 (PDT) Received: by mail-wr0-x22f.google.com with SMTP id 108so5233236wra.5 for ; Sun, 24 Sep 2017 18:46:12 -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=Mjk40BeVBzX2BPKw5ESD5R/yILPybKxgifQJsGCHarg=; b=kPk0zMbhzXjtViHwNbeOPmooJNzvDrFt9e/4pnxMruljABkAa5pWnZn1oLmmAvBBde 41YcaDEj3JLplB1cOWrCC6j9hpTwOmbh7U5YGBYG8zs/YBT+fE9hlHfC2V6+irZ7eFdk glh/h+dQE75R3ell3lze88CIKsrRF57pPR+nRrT8o37SDqHg7dOz87iDdwjVnI6EBXbU 7Lqv9IHMD0uTPC8LjgBmki64N3+ai/bXsahacgwIQqbdi+3D/QH68130aS2yQSv1Bai9 T7L9iNPjnGq3ht+7i2FAMeoGwjSj4cfwSrO9UcWpEYvenuDK5BjcSf4Vt+DnfEjTCGLY 4qLA== 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=Mjk40BeVBzX2BPKw5ESD5R/yILPybKxgifQJsGCHarg=; b=eQO2eQCW3buchzXENZ6FKblNGIqaNbOQ7tRsfvOfBJ9wQK6t8fgrJ9C3946vPxQn0O xPdPn2vS9bCIcSXcgK3IyX16rz4nLel8YC3FcjMF58IomVstHhOD8Itp17k1xgZainlz dra+1iSxDZnhWO+uMzRqa9QoAjxKtx1exHnZq/fNYwo4TtSz5Ei0uTNF8bukdfgnxb7/ fa3+es4FxvfHF/TejMA3LoVeqxhw6RMglyjpdOrW7p3jPROOOWe+2PNmnCPmDlydOEYV +IZUbxVzZlkAdP0E+rwUlBcJcwrftd2AuH9MPc3xTnkjHTJ1JqT5W1peSQ/WtznMicrB Lo9g== X-Gm-Message-State: AHPjjUjupvdv//okuZwPJ/zt+s0gsNsWYVMowEVfkIXR6qNkbvjACz9x 7LPjv3Ntu5BABvjWraGMUbkJ/BOhcBw= X-Google-Smtp-Source: AOwi7QCKDx9LjAHMEkbVP7jyhx5B8u3XwqjkKjVR40Vc86XyrpBtWGcZ0i2z7XACOEwRYtLYeb76ow== X-Received: by 10.46.71.193 with SMTP id u184mr2240078lja.166.1506303970967; Sun, 24 Sep 2017 18:46:10 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:10 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Date: Mon, 25 Sep 2017 03:51:57 +0200 Message-Id: <1506304319-8620-9-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 08/10] Marvell/Applications/SpiTool: 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/SpiTool/SpiFlashCmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 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/SpiTool/SpiFlashCmd.c b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c index e6e1007..9321f6b 100644 --- a/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c +++ b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c @@ -211,7 +211,8 @@ EFI_STATUS Status; LIST_ENTRY *CheckPackage; EFI_PHYSICAL_ADDRESS Address = 0, Offset = 0; SHELL_FILE_HANDLE FileHandle = NULL; - UINTN ByteCount, FileSize, I; + UINTN ByteCount, I; + UINT64 FileSize; UINT8 *Buffer = NULL, *FileBuffer = NULL; CHAR16 *ProblemParam, *FilePath; CONST CHAR16 *AddressStr = NULL, *OffsetStr = NULL; @@ -418,7 +419,7 @@ EFI_STATUS Status; } } - Buffer = (UINT8 *) Address; + Buffer = (UINT8 *)(UINTN)Address; if (FileFlag) { Buffer = FileBuffer; }