From patchwork Thu Aug 25 21:45:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 74770 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1056689qga; Thu, 25 Aug 2016 14:48:19 -0700 (PDT) X-Received: by 10.28.12.76 with SMTP id 73mr9728645wmm.118.1472161699607; Thu, 25 Aug 2016 14:48:19 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id nb9si15753906wjb.113.2016.08.25.14.48.19; Thu, 25 Aug 2016 14:48:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C6388A75BA; Thu, 25 Aug 2016 23:47:26 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jL1bVvvuHP-S; Thu, 25 Aug 2016 23:47:26 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 388BEA75BC; Thu, 25 Aug 2016 23:46:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 522344B62B for ; Thu, 25 Aug 2016 23:46:09 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DfYT3qeTqoVP for ; Thu, 25 Aug 2016 23:46:09 +0200 (CEST) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [198.47.19.12]) by theia.denx.de (Postfix) with ESMTPS id 08B594B698 for ; Thu, 25 Aug 2016 23:46:06 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u7PLjoRH012248; Thu, 25 Aug 2016 16:45:50 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7PLjoUM017689; Thu, 25 Aug 2016 16:45:50 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 25 Aug 2016 16:45:50 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7PLjorg003464; Thu, 25 Aug 2016 16:45:50 -0500 Received: from localhost (uda0226330.am.dhcp.ti.com [128.247.83.52]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id u7PLjo324793; Thu, 25 Aug 2016 16:45:50 -0500 (CDT) From: "Andrew F. Davis" To: Lokesh Vutla , Heiko Schocher , Gilles Gameiro , Daniel Allred , Madan Srinivas , Simon Glass , Enric Balletbo i Serra , Hannes Schmelzer , Tom Rini , Tero Kristo Date: Thu, 25 Aug 2016 16:45:36 -0500 Message-ID: <20160825214541.22896-7-afd@ti.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160825214541.22896-1-afd@ti.com> References: <20160825214541.22896-1-afd@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 06/11] board: am33xx-hs: Allow post-processing of FIT image on AM33xx X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" When CONFIG_FIT_IMAGE_POST_PROCESS or CONFIG_SPL_FIT_IMAGE_POST_PROCESS is enabled board_fit_image_post_process will be called, add this function to am33xx boards when CONFIG_TI_SECURE_DEVICE is set to verify the loaded image. Signed-off-by: Andrew F. Davis --- board/ti/am335x/board.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.9.3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 56f4984..0ed16ca 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -775,3 +776,10 @@ int board_fit_config_name_match(const char *name) return -1; } #endif + +#ifdef CONFIG_TI_SECURE_DEVICE +void board_fit_image_post_process(void **p_image, size_t *p_size) +{ + secure_boot_verify_image(p_image, p_size); +} +#endif