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: 859997 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=linaro.org header.i=@linaro.org header.b="S2EU+6up"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zJ5Yk73HXz9sNw for ; Sat, 13 Jan 2018 02:01:46 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 95875C2228B; Fri, 12 Jan 2018 14:59:11 +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-Google-Smtp-Source: ACJfBos3QAJAK9baal7xZIMtsCukHtmAzfo7I+tFzyao63EGN5ebEK4vUq7G/6MQ0hFREH9p8T9AUg== 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) {