From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=daniel.thompson@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 3A2F8210C1EFF for ; Thu, 26 Jul 2018 00:50:54 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id e7-v6so692557wrs.9 for ; Thu, 26 Jul 2018 00:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OwxrJbRr+vcIvzJKrkjjHgk+E36+xhqXzbxzD1dcY60=; b=SS+p0eIhLUwrD3Bv1Z2RmseBcTfIW3fmaGnF1jxIsUGSHDo++gLyA1RYW6C5SeV9WM /70Rg7EpOgBT5+P/2JZsy6Whcrug9mpJ7oQm8ds4iZemaL0W126hYYRSm5i7+3QNxCwo ef/UemqmdXfJW12kfm5419Gv0lOXPCkznXoek= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OwxrJbRr+vcIvzJKrkjjHgk+E36+xhqXzbxzD1dcY60=; b=hPHQU01XJ2kja9lN/OkkZiEWTlFg+Q4Nyqovl1ePPKQdinpCGsTUu2suPfcWmzZoA0 BLYfqorpLjA3Vq4usugJ6VC5oLT1KrJLBJgdeDwuJKEODTxDw3Ci1WhL3/UxsgjmIwK2 3XPcTlmWfdpEqA7F9yMIzaSeGHPK61TsDLSU5HXpuVr89rWYBcPJwKoKR4ZSOMbprCYa dmU3mbbpE+8Xk094tUAzoBVGj5R2PKTgNvC5FAtjOtMHvDskAdcMqlnlxt3qNzAiWdz/ V+8VMdEjnW2P+lOfOHRA/wIhFWcntOkjN2q5199nQ/ZGEMmcGHfnTmFvf0vXTawR+F6D 40bw== X-Gm-Message-State: AOUpUlHagVQ7PMOsAN+xdwgr0y9Or9UM+bgO9Awbi3GMZHIqsfV0EXfI BFN0wLHNA3Ksd6oVwhfOWf83JJEgmqg= X-Google-Smtp-Source: AAOMgpdPyrKpv+O0YDmd9AUwBb2re37wRHWGUrj7qdvSvkquhUBrBTTuAJoBdWwd7I9OVawCxthUkg== X-Received: by 2002:a5d:6550:: with SMTP id z16-v6mr673334wrv.194.1532591453447; Thu, 26 Jul 2018 00:50:53 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id q3-v6sm723154wmf.21.2018.07.26.00.50.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Jul 2018 00:50:52 -0700 (PDT) Date: Thu, 26 Jul 2018 08:50:50 +0100 From: Daniel Thompson To: Ard Biesheuvel Cc: Sumit Garg , "edk2-devel@lists.01.org" , Patch Tracking , Leif Lindholm Message-ID: <20180726075050.b6lnnj463phntuwi@holly.lan> References: <1532351961-17377-1-git-send-email-sumit.garg@linaro.org> <20180726073616.ut62js3w6lxsvrvf@holly.lan> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20180716 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 07:50:55 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? > > > > 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? Daniel.