From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400c:c08::241; helo=mail-ua0-x241.google.com; envelope-from=sumit.garg@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-ua0-x241.google.com (mail-ua0-x241.google.com [IPv6:2607:f8b0:400c:c08::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9ABCC210C27A9 for ; Thu, 26 Jul 2018 01:42:16 -0700 (PDT) Received: by mail-ua0-x241.google.com with SMTP id w7-v6so568880uan.9 for ; Thu, 26 Jul 2018 01:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jBti4oYD2O7tjaHMM5oWt2Pg5EOMCFWOm4mk+Edm5WM=; b=G0YvFKghMwsPKAX5mOHNyoTHtZio/H98xza6Kpiw5YeDb5C44zhv6i0w9sfXnHS6Qd Vqju4BV7rGcJsON9HSYCSapBysNMTeiunrwe8wHoRnE+VqaEb5M0MMXCd/YpMVbQjQjU f5VeS+fmp+SMPmT4y7kOvMeWAMvuJcoLHg7d4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jBti4oYD2O7tjaHMM5oWt2Pg5EOMCFWOm4mk+Edm5WM=; b=E94Tui0wyK5KhXdYk3BCeTeMwRyIXGGcTO9YmLoOSIEtTSlagCbUaYXV3OYPi0YwUQ WPsoVo6palJrQa4NBa8DPRxxBSTY/Py2UnLsBnO2FLyMB+u8HjO+U6aw/AsxfxNnWFY+ m9b81KoIG5+J/I9Q3lSsiy80VGHqLDSJrIpTcUVzisgwn1KIje3GpZZVIjghg8gssjct T212+0M5L24CjZCF/o+vyPfvVrTEOSlR4/XgLCKfnYXYcAj51VlGhOwoJWuE6SwyVZ2x ww5P/YCSWr3UMcybQCuak9vBeMZ0KO0glVY1tLZlWTBGJmejLKk9JfPN08QpW2Hq/mro BAbA== X-Gm-Message-State: AOUpUlGUGTsl0MmPZBGskXeSvoq4l5YTTX+N/9Yyv5aTvZF/Qywdo2nj BNhJFl3Y1FHoshVCtcOFaM0bb4h9ZCNHxnWldmDHpA== X-Google-Smtp-Source: AAOMgpeTMo+yrrUt8immOQ5+YyqJeES7IGG2SICO7Boh4G2Gwd/ksniJUgVikhjuGFq2gYRskLoY+MXJP+J+/nNtyEA= X-Received: by 2002:ab0:5c0c:: with SMTP id q12-v6mr680098uaf.134.1532594535299; Thu, 26 Jul 2018 01:42:15 -0700 (PDT) MIME-Version: 1.0 References: <1532351961-17377-1-git-send-email-sumit.garg@linaro.org> <20180726073616.ut62js3w6lxsvrvf@holly.lan> <20180726075050.b6lnnj463phntuwi@holly.lan> In-Reply-To: <20180726075050.b6lnnj463phntuwi@holly.lan> From: Sumit Garg Date: Thu, 26 Jul 2018 14:12:04 +0530 Message-ID: To: Daniel Thompson Cc: Ard Biesheuvel , edk2-devel@lists.01.org, Patch Tracking , Leif Lindholm Subject: Re: [PATCH edk2-platforms v2 1/1] Silicon/SynQuacer: add optional OP-TEE DT node X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2018 08:42:16 -0000 Content-Type: text/plain; charset="UTF-8" On Thu, 26 Jul 2018 at 13:20, Daniel Thompson wrote: > > On Thu, Jul 26, 2018 at 09:39:37AM +0200, Ard Biesheuvel wrote: > > On 26 July 2018 at 09:36, Daniel Thompson wrote: > > > On Wed, Jul 25, 2018 at 12:04:58PM +0200, Ard Biesheuvel wrote: > > >> On 23 July 2018 at 15:19, Sumit Garg wrote: > > >> > OP-TEE is optional on Developerbox controlled via SCP firmware. To check > > >> > if we need to delete OP-TEE DT node, we use DRAM1 region info as SCP > > >> > firmware conditionally carves out Secure memory from DRAM1 region. > > >> > > > >> > Cc: Ard Biesheuvel > > >> > Cc: Leif Lindholm > > >> > Contributed-under: TianoCore Contribution Agreement 1.1 > > >> > Signed-off-by: Sumit Garg > > >> > --- > > >> > > > >> > > >> As discussed on IRC, i am not a fan of inferring the presence of > > >> OP-TEE from the base/size values of the first DRAM region. > > >> > > >> Please refer to the existing PCIe code how to read a GPIO in PEI and > > >> set a dynamic PCD accordingly, so you can use its value in > > >> PlatformDxe. > > > > > > For Trusted Firmware I asked Sumit to look for the OP-TEE memory carve > > > out rather than looking at the switches. This was based on concerns > > > about version skew (new C-A53 firmware, old SCP firmware[1]), in particular > > > if TF-A jumps to an OP-TEE that isn't actually loaded the system will > > > fail in a not very transparent way (especially if the user hasn't found > > > the debug UART behind the back panel yet). > > > > > > What is the consequence of passing a DT with OP-TEE present if one is > > > not actually present? Do we at least get as far as bringing up the > > > framebuffer before things explode? > > > If we pass a DT with OP-TEE and OP-TEE not present, Linux TEE generic driver exits gracefully giving following message: [ 1.976021] optee: probing for conduit method from DT. [ 1.976033] optee: api uid mismatch > > > > Is there any way we can let OP-TEE supply a DT overlay? > > I guess it could implement a secure monitor call to provide it. In > fact I find it a rather pleasing approach. However I think it still loops > us round to pretty much the same question as before. Does TF-A "protec > " a normal world that makes an SMC to an OP-TEE that isn't there by > failing the call in a nice way? > TF-A returns SMC call for OP-TEE as unknown (error code: -1 in "x0" register) if OP-TEE is not present. -Sumit > > Daniel.