From patchwork Mon Sep 2 21:18:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti X-Patchwork-Id: 1156736 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=foundries-io.20150623.gappssmtp.com header.i=@foundries-io.20150623.gappssmtp.com header.b="nOaoS5w0"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46MlJf47FXz9sP6 for ; Tue, 3 Sep 2019 08:34:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 477B9C21E1A; Mon, 2 Sep 2019 22:33:42 +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_H2, 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 BD321C21D8E; Mon, 2 Sep 2019 22:33:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4D204C21C50; Mon, 2 Sep 2019 21:18:59 +0000 (UTC) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by lists.denx.de (Postfix) with ESMTPS id BABDFC21BE5 for ; Mon, 2 Sep 2019 21:18:58 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id 201so4129452qkd.13 for ; Mon, 02 Sep 2019 14:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8q5GrFJqeW/hUrIkXAMGQC1/cDc/h/PefE4fkFZiWOA=; b=nOaoS5w0EpymPv1WFOKBtqXxVZNRJNefbsbOF2oQW5Qyxw/abIZmApxPOnosw+zUpu MH3YIoemXvAgNFS60ZdbAuTfhFDzysLfw+W/msePeqVWNZTTpP/tl7l/POzeqtnQ67/j al+uPShK0DLCCCwD7bMg85/RwDC9n7xZG13X6ty1BxNbB3u2UyOW/qtdrOQ6inX5iHzl dbXa2q6oDwA6kVv/q8BU8GCkCjAb0L/eCvyqcVk6ve85mT6nlSyIQ00KK+ioQlo7Ek7P xtoNtPSi2Lkl+biul2gk2JKTJK3CbTxgGQg2uSVB/WOrA2VeiBjpLlcoBde59j8gzD2p Uatg== 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:mime-version :content-transfer-encoding; bh=8q5GrFJqeW/hUrIkXAMGQC1/cDc/h/PefE4fkFZiWOA=; b=iW9xGUrS0mhPuL0c6ycUdJu2nJQNb7cXFAvTzaPPlHXlmWbFf/YGWS2Xrwjq+8+ZEj LIGdgChMtJEiZyK4HJsFSME5YaLWPqBAIWQPCJm0i6ArN+2IAT6RdD6b8W/TzDfnEnGc wjhY8hydocB2YNDMh2jiQF0sDp9AOXP9vKi3uWhWXxSXRSgLaBZ7HX62J0DGULtBliKs e346VX3q3ec+K+/PDxJ7XjZ+8pQqqrOZFOYx6EXViG/g9WBQH3JzJchkQuqwCwixNf1+ ZgqH7W8aJfi0gvFm+cp5n4YPjWGumCXrFlWaaBoeZLF1wKkOkJ6WiUUMXEduO6EW4b32 /BYQ== X-Gm-Message-State: APjAAAUKT/8hh64466fjgSHXJYnQlqpGWmMYPGqCIjojjYtf11DjR7k1 p2tyygqOmjtSc5SrXb2G6eYoqqA6kg== X-Google-Smtp-Source: APXvYqx4lD4bsm9UGwpt9UMTxxPOTbOfXg0KHWvkX7i9Omhofp+cwZr3optK+1TowZmIN26xpXQedg== X-Received: by 2002:a37:e506:: with SMTP id e6mr31597800qkg.326.1567459137283; Mon, 02 Sep 2019 14:18:57 -0700 (PDT) Received: from localhost.localdomain ([2804:14d:badc:8822:d03d:f48e:97da:9d51]) by smtp.gmail.com with ESMTPSA id 138sm3555412qki.114.2019.09.02.14.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 14:18:56 -0700 (PDT) From: Ricardo Salveti To: u-boot@lists.denx.de Date: Mon, 2 Sep 2019 18:18:52 -0300 Message-Id: <20190902211852.7900-1-ricardo@foundries.io> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 02 Sep 2019 22:33:28 +0000 Cc: uboot-imx@nxp.com Subject: [U-Boot] [PATCH] spl: imx: only use HAB if spl fit signature is not enabled 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There is no need to use HAB for FIT signature validation when SPL_FIT_SIGNATURE is also enabled, as that will be validated via the normal U-Boot signed FIT image flow. This allows having SPL validated by HAB and the payloads to follow being validated with FIT signatures only. Signed-off-by: Ricardo Salveti Reviewed-by: Peng Fan --- arch/arm/mach-imx/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 1f230aca33..a98fab8f1c 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -261,6 +261,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) } } +#if !defined(CONFIG_SPL_FIT_SIGNATURE) ulong board_spl_fit_size_align(ulong size) { /* @@ -285,6 +286,7 @@ void board_spl_fit_post_load(ulong load_addr, size_t length) hang(); } } +#endif #endif