From patchwork Fri Jan 12 14:52:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 124357 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2156803qgn; Fri, 12 Jan 2018 06:59:25 -0800 (PST) X-Google-Smtp-Source: ACJfBotngX4Pm86lNp7OQcmK00DxPSQd2JnQ53GfenhVyylnXN+ozLBxIRLKYOM8FxUXqvfEtCpf X-Received: by 10.80.217.132 with SMTP id w4mr35202221edj.193.1515769165148; Fri, 12 Jan 2018 06:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515769165; cv=none; d=google.com; s=arc-20160816; b=dI3Em6fkd7ZSA8ceIHEXgVptcyTwnWBOFdonYNZ2gkeLl4KQButh0qXu95lIvceI6V KpAo0PSnMTz1muOpZQnpCb+Sm9ABasCwCJVOVMsH/ScXg99VOk4nFcU7yqVZAtC7MlyR tSjdgbJrffKCk5wZOGzOz6yiHIoPPoszHVTBCjkv4pAzR3aGpOAykY6/Dn920TK1hLEd T2Uz+/iTI8raWBd4ypgSDXgibfSU3pSuKlLTLzaZfciEu8TsE5jOV9NnIRgqxmRuleLb s7EKvhHCzEm8HXuzdm00Qy2VDaouzyIqbOZi+UqUthkiiwGQYkMEggl+cJFEOIwoJqpT yu1Q== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=brSAKscZkcrZV9okNYv82l1S9nE463ZBO1wn/KlqexI=; b=ehKiit7MEmupEiZ3vlegMNOIVDlWB04irWbXEGL90EiVvBKJwb2qy9KEzS/r4ZF9m/ e5NJSJayAZeTvINLdO1NxoL1ZT6Ah5tUoP8H2MxF4OZSmZwlsTfFYt4TEwZ/7/v++QXH LSVVbr+5feInA/DW+HvK+ueqzqM18ujiwxZoo3QvCKV3oSGaA56BcTfNWQJVdapw/IQv cdh1T0yK6I77g6iHO2ZuToRVr19Tcq6jacJyPnxL7v3WaKaIMkD51swJRka95BqtwvNA tLl9FRGYkR9NLXYmyvV8xSboU4B1avszJlb1SAmSgzBBGVTjySyl4XH1HafYZ/DnMpMr 7HXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VzNF/vAv; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id p32si6469513edp.271.2018.01.12.06.59.24; Fri, 12 Jan 2018 06:59:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VzNF/vAv; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id AF044C22252; Fri, 12 Jan 2018 14:58:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BEDB9C2227B; Fri, 12 Jan 2018 14:52:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 237F3C221C3; Fri, 12 Jan 2018 14:52:38 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id E3098C21EE5 for ; Fri, 12 Jan 2018 14:52:34 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id t8so12586083wmc.3 for ; Fri, 12 Jan 2018 06:52:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p0eKO2Jm3VtHXGDoyvoV0e7QbLvZOpM/J/pCm1Ft/MA=; b=VzNF/vAvKiHtEYzSHWmx4V6I4QwKi4OxtYqBccAqTLyB7GPJ1faQirwWrRZ8PrxE13 7/FKNNdh4AzbnF/vKQ1k5h7knnwtbOuhIhklS8h6BBnRFVnNkgj+xg58ArXjJnUIhyC0 Psxcea2POKu11oy7hd9tPCluFgwUmRlc0feWM= 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=p0eKO2Jm3VtHXGDoyvoV0e7QbLvZOpM/J/pCm1Ft/MA=; b=K/t0W7Yo1rMdRj4Rns96s/7fiykSUCax3e41pDvEuaeblczdkSZ+ojZMC4OIE3N2SR ASCJXy+y19ZGyVIP9NaHV79hZR4fLQK3fulBTnPHEyMG41sg/q667HU0CW5FI2zw+Y74 pxzjhXuSzcCCSqpQWB3wfugqUAfOI1MyAEYPIDn7k9fimArSEky1tpW8pedGkXHEH7Q9 7DVSTVpwHjQ8V7IyxCcp1rt8o4kE9HKaCiYkeeT4Bgz31MWm6EWcaIWn0cFPsfkt4vQc iDbBpxFy4LbfjkcsCzv36cs6iTHeIFhYikPY5RAcmfFScdNZH/l8xeMCaGxUDcTsCWeM Gk3Q== X-Gm-Message-State: AKGB3mKXYwDkE9ALAQ7HGvnNeUoyEoE87QkfIfFW6EzPQ+K+gNtv7N7c fDNyylU5LTPtxvsmlO0uiyEhWHmQ7Y4= X-Received: by 10.80.180.236 with SMTP id x41mr37104633edd.241.1515768754429; Fri, 12 Jan 2018 06:52:34 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d20sm1318629ede.16.2018.01.12.06.52.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 06:52:33 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Fri, 12 Jan 2018 14:52:23 +0000 Message-Id: <1515768744-25246-9-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515768744-25246-1-git-send-email-bryan.odonoghue@linaro.org> References: <1515768744-25246-1-git-send-email-bryan.odonoghue@linaro.org> Cc: trini@konsulko.com, harinarayan@ti.com Subject: [U-Boot] [PATCH 8/9] optee: Improve error printout X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When encountering an error in OPTEE verification print out the address of the header and image. Signed-off-by: Bryan O'Donoghue Cc: Harinarayan Bhatta Cc: Andrew F. Davis Cc: Tom Rini Cc: Kever Yang Cc: Philipp Tomsich Cc: Peng Fan --- lib/optee/optee.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/optee/optee.c b/lib/optee/optee.c index 36358f1..8c4e7fe 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -56,10 +56,12 @@ int optee_verify_bootm_image(unsigned long image_addr, return ret; error: - printf("OPTEE verification error tzdram 0x%08lx-0x%08lx " - "header 0x%08x-0x%08x size=0x%08lx arch=0x%08x" - "uimage params 0x%08lx-0x%08lx\n", - tzdram_start, tzdram_start + tzdram_len, hdr->init_load_addr_lo, + printf("OPTEE verification error:" + "\n\thdr=%p image=0x%08lx magic=0x%08x tzdram 0x%08lx-0x%08lx " + "\n\theader lo=0x%08x hi=0x%08x size=0x%08lx arch=0x%08x" + "\n\tuimage params 0x%08lx-0x%08lx\n", + hdr, image_addr, hdr->magic, tzdram_start, + tzdram_start + tzdram_len, hdr->init_load_addr_lo, hdr->init_load_addr_hi, image_len, hdr->arch, image_load_addr, image_load_addr + image_len);