From patchwork Mon Sep 25 01:51:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 114164 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2068389qgf; Sun, 24 Sep 2017 18:46:22 -0700 (PDT) X-Received: by 10.84.137.129 with SMTP id 1mr5446281pln.376.1506303982685; Sun, 24 Sep 2017 18:46:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506303982; cv=none; d=google.com; s=arc-20160816; b=g1XgROkKJ7kZHTkT+bGVlQTjG/qsEtPnBrdGDcbrVfGbENkZu4G9w5njpGKRa75MZb FUzv/USKaxBw9x3jZn+P/HThLqRMTgF3TwZBHFosZmQPSrcazAJ9jvR+AHwedeR1ovBM CIqmuwcWLkPluPRUzFblnZxPBOYHZbrbGjvjr0+xz+t9u1lsp2XOo3A64vqvswAygCOD sMFPu1frZllDE08j1QqZ1k2Vxpwn+eOQXznUppp5t2MMQa/5vD3U1ru13jgZj9oEev7q R6S+Bb9+p9+5w15ZL233GUWJJ4Mp/eIAsabx1fNl12oJ5neBbyYA+Q2SU0bTgmlz0FmQ 00gA== 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=/KPS1pEwLsZA5EShKNUKvtWgdhPr7e5IoIOhvRSCnxY=; b=zUCZEOIQ4oCJZk8jToS8pFVi+/yr/FS5vQsHD4P3aW444ePZnYOzNa9qHMsErOhFCa mYY9mZvIavm4AhPj3O0DdksAnHzPUm4MxariUCerJHNoIXWikwIyqwggQ9WPM9zJFEye +2vZKvqwnCezPYD6VcczaJ1tXSUm+yOYAmpZrwe3jLXls34tht8TLC/jOn5dneVfED6q idvYzd5eo8CAUv1seuKE8kyvAQDOn2BJDUKDfRKg6hho+AtWQRDVljPIdZB4JANlrO1u yrMtNN3/q/TUxVl/8S0+1h+dK/ar9grSE6gyYJ/Pe6nqj//ruseg//WbnduLs+d/OCNt s+bQ== 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=LaozhhWK; 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 o25si1324463pgn.807.2017.09.24.18.46.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:22 -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=LaozhhWK; 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 7DDAE21E43B5C; Sun, 24 Sep 2017 18:43:01 -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::22d; helo=mail-wr0-x22d.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (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 35E9921E43B4E for ; Sun, 24 Sep 2017 18:42:59 -0700 (PDT) Received: by mail-wr0-x22d.google.com with SMTP id 108so5233157wra.5 for ; Sun, 24 Sep 2017 18:46:10 -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=uqJpvjrOOSyYcnagMvKkRjOCmPLv71Ofcl2VUYLrWM8=; b=LaozhhWKtp4XbJcObqrOncJhHwTaRU1rKIa2uwJHHl0rwT31rWhitt7gU+p1tFQQnf eJYA4fP0rM7tZVmBn3WUubKFC43Pt06y5eyODTqvRNN8utE6um6u9mxoBhiLDzc2t64G 9NDA97Q0ZZG553e8Epi8v966tslPuyOCNnwbTlPE4mqSA6rYC6Wwbe7mLPPzph/6eMPF zbzTpOMixR1kCKyZjmBORPrauw3B9yczO+uiTYns29lmuiXg69YDvBd7anD7XYrn+QGp Og5z4lef2CmhykX0OLxJdr7zN+6bRZXps76sqFwcsq3XwOuK7PTV8nqTJc7XMcW+Gef3 tDeA== 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=uqJpvjrOOSyYcnagMvKkRjOCmPLv71Ofcl2VUYLrWM8=; b=ODqpVD7MuuuCOWmVUKxX9LknqcfSOeS8vFGWGWAE0lMuynqeqTlFqDbvPnMhaOEt4R t3eHotH56cruO4DZBWtbw2np7xSwU/j2Fc/Lh2NKhg2ZT6fkoYK4Ep0abh4E6SEHmn8Y GJ6MoDrcGrR981BeS8xzaU7mwaVqvRZFuMZ4lpq58/nBGMlH997S0b7yyBWQmAFW3WvQ Y2ok5gRQC9byhMjQWhQJXW4WG4WkdbHxH636oRLl/h8EVYQfNny46lAeuRoeZQcZHm1h PjZSd4SWecmXadmxeBGmhm9Jkh2PVxyewrwsmYRcvWu73sy8t51+XDi4V9PXM3f2vzr6 ezzg== X-Gm-Message-State: AHPjjUghD8XeQdSrhnvXAbEZDEFqldbAjAa/sj/oHH6+H/74mrpUwK3k t1Oql8ZS2vEU2EPPDHRFrvfOOeDMJM4= X-Google-Smtp-Source: AOwi7QBORHJdY/B1Ls5UFq0tLgrf685KrWTOEns14jan30RxZvXR14olS2FaVPTPBcTZtI3qRHO3+A== X-Received: by 10.46.15.26 with SMTP id 26mr178312ljp.69.1506303968519; Sun, 24 Sep 2017 18:46:08 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Sep 2017 18:46:07 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Date: Mon, 25 Sep 2017 03:51:55 +0200 Message-Id: <1506304319-8620-7-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 06/10] Marvell/Applications/SpiTool: Fix bug in error test 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 a misplaced closing parenthesis. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Signed-off-by: Marcin Wojtas Reviewed-by: Leif Lindholm --- Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c | 2 +- 1 file changed, 1 insertion(+), 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/SpiTool/SpiFlashCmd.c b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c index b6dc54f..e6e1007 100644 --- a/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c +++ b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c @@ -378,7 +378,7 @@ EFI_STATUS Status; FilePath = (CHAR16 *) FileStr; Status = ShellIsFile (FilePath); // When read file into flash, file doesn't have to exist - if (EFI_ERROR(Status && !(Flag & READ_FILE))) { + if (EFI_ERROR (Status) && !(Flag & READ_FILE)) { Print (L"sf: Wrong FilePath parameter!\n"); return SHELL_ABORTED; } 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; 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; }