From patchwork Wed Jun 15 19:26:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Dannenberg X-Patchwork-Id: 70122 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp16576qgf; Wed, 15 Jun 2016 12:27:05 -0700 (PDT) X-Received: by 10.194.172.36 with SMTP id az4mr310058wjc.114.1466018823037; Wed, 15 Jun 2016 12:27:03 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 124si6483075wmq.81.2016.06.15.12.27.02; Wed, 15 Jun 2016 12:27:03 -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 33682A75CE; Wed, 15 Jun 2016 21:27:02 +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 Ny4-tp2zlTAU; Wed, 15 Jun 2016 21:27:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59880A7548; Wed, 15 Jun 2016 21:27:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC979A756E for ; Wed, 15 Jun 2016 21:26:57 +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 ibsb1HNnxUXi for ; Wed, 15 Jun 2016 21:26:57 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 3B8EFA7537 for ; Wed, 15 Jun 2016 21:26:53 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5FJQNSm022215; Wed, 15 Jun 2016 14:26:23 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5FJQo12016158; Wed, 15 Jun 2016 14:26:50 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Wed, 15 Jun 2016 14:26:50 -0500 Received: from borg.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5FJQnBY003642; Wed, 15 Jun 2016 14:26:50 -0500 From: Andreas Dannenberg To: , Tom Rini , Simon Glass Date: Wed, 15 Jun 2016 14:26:38 -0500 Message-ID: <1466018801-18044-7-git-send-email-dannenberg@ti.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1466018801-18044-1-git-send-email-dannenberg@ti.com> References: <1466018801-18044-1-git-send-email-dannenberg@ti.com> MIME-Version: 1.0 Cc: Madan Srinivas , Daniel Allred Subject: [U-Boot] [RFC 6/9] arm: omap5: add FIT image post process function 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" From: Daniel Allred Adds a board specific FIT image post processing function for when CONFIG_SECURE_BOOT is defined. Also update the omap common config header to enable CONFIG_SECURE_BOOT always for secure TI devices (CONFIG_TI_SECURE_DEVICE is defined). Signed-off-by: Daniel Allred Signed-off-by: Andreas Dannenberg --- board/ti/am57xx/board.c | 7 +++++++ board/ti/dra7xx/evm.c | 7 +++++++ include/configs/ti_omap5_common.h | 4 ++++ 3 files changed, 18 insertions(+) -- 2.6.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 08cf14d..a9635c2 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -750,3 +750,10 @@ int board_fit_config_name_match(const char *name) return -1; } #endif + +#ifdef CONFIG_SECURE_BOOT +void board_fit_image_post_process(void **p_image, size_t *p_size) +{ + secure_boot_verify_image(p_image, p_size); +} +#endif diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 3fbbc9b..03eefb6 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -739,3 +739,10 @@ int board_fit_config_name_match(const char *name) return -1; } #endif + +#ifdef CONFIG_SECURE_BOOT +void board_fit_image_post_process(void **p_image, size_t *p_size) +{ + secure_boot_verify_image(p_image, p_size); +} +#endif diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 2e4c8e9..9db6da2 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -138,6 +138,10 @@ * print some information. */ #ifdef CONFIG_TI_SECURE_DEVICE + +/* Always enforce for secure devices */ +#define CONFIG_SECURE_BOOT + /* * For memory booting on HS parts, the first 4KB of the internal RAM is * reserved for secure world use and the flash loader image is