From patchwork Wed Sep 13 18:27:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 813565 X-Patchwork-Delegate: trini@ti.com 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; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="BSxkk1vK"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xsqsX0X9Wz9s3T for ; Thu, 14 Sep 2017 04:27:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 83520C21EF4; Wed, 13 Sep 2017 18:27:51 +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, 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 5C3C6C21C73; Wed, 13 Sep 2017 18:27:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2A6A2C21C33; Wed, 13 Sep 2017 18:27:48 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id 70231C21D88 for ; Wed, 13 Sep 2017 18:27:47 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8DIRjxZ001800; Wed, 13 Sep 2017 13:27:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1505327265; bh=iF+QQ6DqaC9hBtyuMinWgud0g39cYne7WwHX0UhNlbo=; h=From:To:CC:Subject:Date; b=BSxkk1vKE76s1S0PINvcZoqW/O1kMJ7/u/kK67kYaKHdmRowEXbrobhxbzBDLqnOf 5b7FQ33+BvZNr8IXmx68F5GdHfB3SbhK06stRhLR91mzcggvkoJGtcicDcXVImlaY7 iSaxICX1vDHJychLvj9L2HTew0L4sPVS8AtB4RWc= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8DIRjQ7006065; Wed, 13 Sep 2017 13:27:45 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 13 Sep 2017 13:27:45 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 13 Sep 2017 13:27:45 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8DIRite004087; Wed, 13 Sep 2017 13:27:44 -0500 Received: from localhost (uda0226330.dhcp.ti.com [128.247.59.40]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v8DIRi327361; Wed, 13 Sep 2017 13:27:44 -0500 (CDT) From: "Andrew F. Davis" To: Tom Rini , Lokesh Vutla Date: Wed, 13 Sep 2017 13:27:44 -0500 Message-ID: <20170913182744.8309-1-afd@ti.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] arm: mach-omap2: Relax checks on OP-TEE location to allow pageable image 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" From: Harinarayan Bhatta When the OP-TEE image is built for secure paging the load address may be in SRAM, remove checks that prevent this. Signed-off-by: Harinarayan Bhatta Signed-off-by: Andrew F. Davis Reviewed-by: Lokesh Vutla --- arch/arm/mach-omap2/sec-common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index 2d54a3165e..52e1785b4a 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -305,12 +305,8 @@ int secure_tee_install(u32 addr) if ((hdr->magic != OPTEE_MAGIC) || (hdr->version != OPTEE_VERSION) || - (hdr->init_load_addr_hi != 0) || - (hdr->init_load_addr_lo < (sec_mem_start + sizeof(struct optee_header))) || - (tee_file_size > size) || - ((hdr->init_load_addr_lo + tee_file_size - 1) > - (sec_mem_start + size - 1))) { - printf("Error in TEE header. Check load address and sizes\n"); + (tee_file_size > size)) { + printf("Error in TEE header. Check firewall and TEE sizes\n"); unmap_sysmem(hdr); return CMD_RET_FAILURE; }