From patchwork Fri Jan 12 14:52:18 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: 124360 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2158801qgn; Fri, 12 Jan 2018 07:01:05 -0800 (PST) X-Google-Smtp-Source: ACJfBot+e0cKvTfhWay9Yp4UKLpzR0ctiynNm/3tXipdbcR4hC3IJaQGvTN++XORzQKL5I5BZf7e X-Received: by 10.80.207.206 with SMTP id i14mr10151583edk.133.1515769264771; Fri, 12 Jan 2018 07:01:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515769264; cv=none; d=google.com; s=arc-20160816; b=y6RWuDLI456ALxE+kN39cy4RBqBdXBaEkSN14Kjjg6N6SYHu9cpbvqvB0Cbc5LmhMc PosK17aPHpu2JS8eR2ji6Z5HND0csHkDu5uqZjTTpA8Pu0LzqX53C2pJkGefJEb7sga+ OB8CoC3Y3hHu5mZjjfa0xwR83Iy/jdKtRtyzvTS0aZlJpJUNUy6/eDjdNCu507Xs9rKu I0FEyJDfQyuwCI7CPL4EjhND8opj9dn4UpeW24SaRrorAtcWIcoRDZv8zfvzyEzSIvK/ /fOKNmpufYKEikPnJ32VK5L1DWL030FYdut6Oy1MKRUIjow1P/Y1Epxg1VC3YCS5ZjJx 3TNg== 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=CPG6Bclq860yb8qN0eimwkuXh48SVIhog/M9eWEYmhA=; b=eCh1DwZmo25aBDjikkYfLl2dEEdm/d16d0mO5ihgAN6yGCH1Y0CHT6jSCAhItGtNtq /PINMdNFb914Wdcdj4goePHix5FNREWBqKAViAi0ru1x5qUzSJS83cckiO9SWQd+5nMH Mno8oL4u9PAhdUhxFIfwtxy1dc6eED8mOFx7kwXXYmtBVaiewJk4vGSHnODvqv160XWD PQUQwEtherWzJM0N6xAUfqD2zZQSOa+wVioSpxyZhi3dEXzMnxW2E8HwtbzPtjZHOC7f Yh0J7Kw3Nerq7XrXphl3KUpkgh2FYWA027IVDILRa3O8DTFy9Yoap0XRsYc4KE4GATER m6pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S2EU+6up; 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 r22si482537edd.337.2018.01.12.07.01.04; Fri, 12 Jan 2018 07:01:04 -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=S2EU+6up; 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 543E1C2227D; Fri, 12 Jan 2018 14:59:10 +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, 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 EB591C22287; Fri, 12 Jan 2018 14:52:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B67F4C22264; Fri, 12 Jan 2018 14:52:33 +0000 (UTC) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by lists.denx.de (Postfix) with ESMTPS id E0C2AC2223F for ; Fri, 12 Jan 2018 14:52:29 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id x4so2726307wmc.0 for ; Fri, 12 Jan 2018 06:52:29 -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=Q5wpH14sEGqzVnSzmLVUCgKcD/HmFjiL28cBIHj/5cg=; b=S2EU+6up78SVb2RNxrpw/phU9tJy8Vzx2BhCrbLf0NjhmXw8QEflQBYc8vs0wZ2+fe D3i10LHkpeIeqAIaEizCK69QJkMJgK3ld+LHCJPgn6e5Otz4bgy14u4JCdUiZlF3JGdX rgtNx49wrldMx2XOQQ4RRk7Nr5aakasnzRz6A= 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=Q5wpH14sEGqzVnSzmLVUCgKcD/HmFjiL28cBIHj/5cg=; b=WXUrNSo/qMcBWWcME9bCxdzE8XPo136npP28yggKZXJGajQYV6K9IZJBxGKMqQwAZl b9bGzpiO9lKXet5PnbWrKI3JB1KfI4svJlRtbnUW8HyDxWBgkp8ywS9dK8LwWTpwjL2l 7vN+P/s5817bEW6N+mN8JNG+I/Tt9OeQAK8uhq0szi9NEv/NJWhp30pK4GOXDbO59Dnd 5dAlyphwe28Q+Y21PSa4anucmwmP7b7kuy2V+bmRqyzHBwqRRC0JiVB/zuF2NfI2V2KK J0f8u9W5FE4DU5CuClkHLgrptA1GwmdFr0r/pOv4jiiRWjH8Yt0IhDNcbeWTmEA5CGA3 DwwA== X-Gm-Message-State: AKwxyteGcW9l6bj/Su2T7I8ulnTFBdiTQRqhBLqSch6Hvkr49ZBUkywY 5/uWR3ea07EnYedHgq38Ym+8bulsmhM= X-Received: by 10.80.177.67 with SMTP id l3mr12795991edd.267.1515768749386; Fri, 12 Jan 2018 06:52:29 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id d20sm1318629ede.16.2018.01.12.06.52.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 06:52:28 -0800 (PST) From: Bryan O'Donoghue To: u-boot@lists.denx.de Date: Fri, 12 Jan 2018 14:52:18 +0000 Message-Id: <1515768744-25246-4-git-send-email-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515768744-25246-1-git-send-email-bryan.odonoghue@linaro.org> References: <1515768744-25246-1-git-send-email-bryan.odonoghue@linaro.org> Cc: trini@konsulko.com, harinarayan@ti.com Subject: [U-Boot] [PATCH 3/9] optee: Make OPTEE_TZDRAM_BASE a mandatory define 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" This patch makes OTPEE_TZDRAM_BASE a mandatory parameter. Subsequent patches will ensure that the region between OTPEE_TZDRAM_BASE and (OTPEE_TZDRAM_BASE + CONFIG_OPTEE_TZDRAM_SIZE) match the information given in the OPTEE header before handing off control to the OPTEE image when booting OPTEE directly via bootm. Signed-off-by: Bryan O'Donoghue Cc: Harinarayan Bhatta Cc: Andrew F. Davis Cc: Tom Rini Cc: Kever Yang Cc: Philipp Tomsich Cc: Peng Fan --- lib/optee/optee.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/optee/optee.c b/lib/optee/optee.c index a6c856a..6e55027 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -5,9 +5,14 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include #include #include +#ifndef OPTEE_TZDRAM_BASE +#error "OPTEE_TZDRAM_BASE not defined" +#endif + int optee_verify_image(struct optee_header *hdr, unsigned long tzdram_start, unsigned long tzdram_len, unsigned long image_len) {