From patchwork Fri Jan 12 12:40:06 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: 124336 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2028591qgn; Fri, 12 Jan 2018 04:57:41 -0800 (PST) X-Google-Smtp-Source: ACJfBotPeJjc321Ob36Bfx3tnHybkypY+d1h6/moim2ZOQ/tb3XIF/IZLo1eU4xvXxABSKjpW+B3 X-Received: by 10.80.164.197 with SMTP id x5mr34565531edb.53.1515761861262; Fri, 12 Jan 2018 04:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515761861; cv=none; d=google.com; s=arc-20160816; b=gDruWA1UeqyVLgzxk4hO0PTJwxlFax33WVYIUeghIqC/PBDq07Aqn2gBT9Jse9sNgI zDMZL8WGLYbrZBpsmxNlmTTpP8/E1bHqL9q82YjMFiahwsorfE/NzGN/8IM0htaI8S/p uuyxj5CvSIdN97LNrGJ1Vbc67XP3btgxrX0Q+6o6jj/8U6UC//DA5xtiU8E3YenptQ/F cGEL7ifkCUh5G1ez1sE4aml/EK96d3MXb36Kyt0pDOhfLJfmaBfsOJBBH2TEIKVwG47A EuUIQNFX0RsU92gvB9Qo5FruFu6Sw+Y7IKCJwrB2RGKcGvlZknKFWyr4ukD5J8rQHUvq QmxQ== 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=crMi4kzvb8kC3+6SaEdHdaJ/Bis58bxvykUDzNqSFqA=; b=tWX51M1OPEC0+OoCOZO2XuHSKRPF1SuFACKtUbLG+RA2AJn6UZbkkxYzofpFmQ4aD+ cD/FDly3RDBSDc1vRfs96pQ4ZYlT++MhFXF5SdCusdBD1z0cVxWzzVlnUVfYV8uha2Io 1PZp9HkxKSmSwvDa+gf2yykzCbwddHHzyM13Evnn4OYruFUg/JBKZe8YQUULu78iRAeh GFCO+dMVynBYVkDM1cIwGq9W/Y43J4PGk575uVmBeHSV7EE0vZsWEx72UyDsl67/DS92 kptQBXun4BOFFCajKUqJevdBJcrkozBpPpnu5lr5Xp4fNwjrYs/uhRNzr3kzU4RHKmNm YEYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=B2kcPXE7; 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 m57si2600249edc.116.2018.01.12.04.57.40; Fri, 12 Jan 2018 04:57:41 -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=B2kcPXE7; 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 BE90BC221EA; Fri, 12 Jan 2018 12:47:05 +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_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 9B7AEC22213; Fri, 12 Jan 2018 12:42:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9C31AC21EF7; Fri, 12 Jan 2018 12:40:42 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 9DAAFC22150 for ; Fri, 12 Jan 2018 12:40:38 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id r78so11665329wme.0 for ; Fri, 12 Jan 2018 04:40:38 -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=uPf5TXpZuo5tthq/fIi2SUs55wI+DtHZLs3ap6wroog=; b=B2kcPXE7lBycY6PQKfWpCgWK/v1tYhYtk5fQ4FIN4o93RUERpybe56A81qZCHW5TZ7 baUwUfN9geayKCI0vJGBe62LfFWkg/F1ZeeEP/4fcjq8O5j+UDFzE3yBZ+ihJrIXqkVt HwYaAVJCRSY3L7CwuVd4wzhjjKRbKic/AGh7U= 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=uPf5TXpZuo5tthq/fIi2SUs55wI+DtHZLs3ap6wroog=; b=YuIqaJmqcoSU2nJ1R0mndwYwDejmsf/rvayL9BOwUttWB9X/YGPQdXf2bzYF+LWJMH mrDgp/8/O7RB31o60ZSpf6QHzsSfV1jG3aFN/E1hOQyEMSVJaBy4pgdbPWfPjdhr8gN7 rty1HvGKkaNkYP9n+o0ZGJH8qRDYZCDM/IWtkD97T1CMLdDVmv+NRoLH0dfGQg2uA3j0 5VhDGw4u7Gg1NY0tYdeAQ9T9zjRmJn/vqvnCGV196wAN+hHbD/29u4CORWyqpLm+0h4K 4FcdmTJ7Bh8D0GBPDkzBteJ+qvre6/PM2zpcL9hyDoSKdB2m7/87rvLf4Xa9U7/B6PVv wyzA== X-Gm-Message-State: AKwxytfJ+V90rgdxD3q09OtzqVFB/XotsiUJnstM8PifKKBKh646tKon GgRIhUYYXji/kcIWvY1sTilZlgbEgig= X-Received: by 10.80.142.188 with SMTP id w57mr1970034edw.11.1515760838088; Fri, 12 Jan 2018 04:40:38 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id w2sm13893585edb.4.2018.01.12.04.40.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 04:40:37 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de, brenomatheus@gmail.com Date: Fri, 12 Jan 2018 12:40:06 +0000 Message-Id: <1515760819-15116-13-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515760819-15116-1-git-send-email-bryan.odonoghue@linaro.org> References: <1515760819-15116-1-git-send-email-bryan.odonoghue@linaro.org> Cc: Fabio Estevam Subject: [U-Boot] [PATCH v6 12/25] arm: imx: hab: Print CSF based on IVT descriptor 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" The IVT gives the absolute address of the CSF. There is no requirement for the CSF to be located adjacent to the IVT so lets use the address provided in the IVT header instead of the hard-coded fixed CSF offset currently in place. Signed-off-by: Bryan O'Donoghue Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Cc: Breno Matheus Lima Tested-by: Breno Lima Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/hab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index a8e3e79..229c723 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -466,8 +466,7 @@ int authenticate_image(uint32_t ddr_start, uint32_t image_size, print_buffer(ivt_addr, (void *)(ivt_addr), 4, 0x8, 0); puts("Dumping CSF Header\n"); - print_buffer(ivt_addr + IVT_SIZE, (void *)(ivt_addr + IVT_SIZE), 4, - 0x10, 0); + print_buffer(ivt->csf, (void *)(ivt->csf), 4, 0x10, 0); #if !defined(CONFIG_SPL_BUILD) get_hab_status();