Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp340373pxu; Tue, 1 Dec 2020 12:35:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzerxLlsLbH+J/G34/RsirGS4a8IeyMFwul04UzXL1t9Pjie0wz9l7Ku01GV/kfzhlbkdXw X-Received: by 2002:a17:907:411b:: with SMTP id nw19mr4708658ejb.150.1606854933768; Tue, 01 Dec 2020 12:35:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606854933; cv=none; d=google.com; s=arc-20160816; b=NShQDzSlI0eaNMg8tl5O/p+VgRSMl1DJjCKB73PaqXRL752WUSb0F3jFUtWnrQVR7f XdNjymB4zV6x1EBj9BCfkGpI/sIcMfIwIVkVURX/7pvV6lcM+HVrFV5V5efIZGX4PmlP XxDesnl87vf+whYIP1KDlFjrQ4a7ysT75Z6wn4ilc/4OppdJZl7h9GSyl0VxDmCIcbdv 6ov7tBdhRrtoVOwTPSmBINUmpxJb89jZA0NjSTt9KqE5uqYgSxBw0T32E6EDYfUY2VCF jB2CXCL6IK88fOHp6vCFwvA3VpSqx5i8afWT8gs2xUjnujfwJuIsjbjzKVDJxy8B3217 MuEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=u7hNk9DtbVb2Ilg8xQdyNucB4tnaO9DeXYmRyFy83cQ=; b=Jfsq8sHCa+2pYiyGEa5M6siOKaMIsiTETPcfNMCzTSuEorf3GhSaRx2iqVEABvMES8 Yc5nEPT2fi1b2FgOquxXhvgw5CG0ItNGza5ZxnykP4Suts8hJsZS/pFI3JrDBSQp0dtG 7HIA3JkgzDT+jOUewLhe7RmYq2K9JdfdLk4y4lYbt8aIwwYujkQ355/CECEsbOJv+4cW 9AJ0yzKwUMRd20PhUW/tsEM1iiNNeLKd2UVZsj5HaY1TbIiHeD83v3yyqWx0lzAoCq0i Fm7HuisZXJO7+RbEacPm0mB8CovwZ0vSTbbUzlkxMNcShEKUweOnCvbIgkg29JEd6fV5 5q9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si730055eju.683.2020.12.01.12.35.10; Tue, 01 Dec 2020 12:35:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387951AbgLAUdM (ORCPT + 99 others); Tue, 1 Dec 2020 15:33:12 -0500 Received: from mga03.intel.com ([134.134.136.65]:4314 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbgLAUdL (ORCPT ); Tue, 1 Dec 2020 15:33:11 -0500 IronPort-SDR: Flst2d54Dk6E3m+hBHIP0zpSMkE50KaHJpnj2QWuW7DzestaXsNuarjvx5fUpwuf5gI7YdNl/V mhDwI7BwX+9A== X-IronPort-AV: E=McAfee;i="6000,8403,9822"; a="172999292" X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="172999292" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 12:31:26 -0800 IronPort-SDR: EiOcC6sky8HhCK41YcXxgYjV4u9CVgQIj0nOazVFwOWG5DB73cMWW2cQaOtY+6WZaSUaN28Q4A 35ZpzHBomEAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="537675914" Received: from marshy.an.intel.com (HELO [10.122.105.143]) ([10.122.105.143]) by fmsmga006.fm.intel.com with ESMTP; 01 Dec 2020 12:31:25 -0800 Subject: Re: [PATCHv2 1/5] firmware: stratix10-svc: add COMMAND_AUTHENTICATE_BITSTREAM flag To: Moritz Fischer Cc: gregkh@linuxfoundation.org, trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, dinguyen@kernel.org, sridhar.rajagopal@intel.com, richard.gong@intel.com References: <1605709753-7800-1-git-send-email-richard.gong@linux.intel.com> <1605709753-7800-2-git-send-email-richard.gong@linux.intel.com> <771ba4f4-59e1-74b0-ba55-3f65914e2bc7@linux.intel.com> From: Richard Gong Message-ID: <48b61d87-331a-6dba-212e-8b6748429afe@linux.intel.com> Date: Tue, 1 Dec 2020 14:52:11 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Moritz, On 12/1/20 1:19 PM, Moritz Fischer wrote: > Hi Richard, > > On Tue, Dec 01, 2020 at 01:30:16PM -0600, Richard Gong wrote: > >>> Can U-Boot determine whether it's the new or old flow? Can you set a >>> different compatible value in your device-tree, to disambiguate >>> behaviors? >>> >> >> The boot flow is determined by defconfig during compilation, which means >> each boot flow will have its own defconfig. >> >> SDM firmware loads SPL into OCRAM, then SPL will load the apporiate ATF or >> U-boot into the DRAM according to the setting of CONFIG_SPL_ATF. If >> CONFIG_SPL_ATF=y, SPL loads ATF and then jumps to ATF. ATF setups EL3 >> environment and initialize the PSCI services. >> >> CONFIG_SPL_ATF is not set for the old boot flow. > > So you know at (U-Boot) build time? Can you just pass a different DT to > the kernel in that case? > Yes, we have decided the boot flow at build time. Starting from the next release, our U-boot will use the ATF boot flow. Per my limited knowledge in U-boot, I don't think we can follow your suggestion. Or it will take a lot of efforts to achieve. I think that back compatibility is your main concern, correct? the issue does exist with the old boot flow and old firmware, whenever the customers try to use authentication. Unfortunately we can't update U-boot or firmware that has been released. The authentication feature is supported only at the ATF boot flow, updated kernel and firmware. We will have a well-documented document to inform our customers that if they want to have authentication feature, they need to upgrade the latest U-boot, kernel and firmware. We always encourage our customers to take the latest U-boot, kernel and firmware releases in their developments. > - Moritz > Regards, Richard