Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp408691pxb; Wed, 18 Nov 2020 07:34:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxq0cD1JBL8wOgPfmWG0CIWKETYA2Omtabq7tufi+bpFD4vvLEf3umpMIu4gBEUz/nu0ers X-Received: by 2002:a17:906:2c19:: with SMTP id e25mr20572896ejh.66.1605713698351; Wed, 18 Nov 2020 07:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605713698; cv=none; d=google.com; s=arc-20160816; b=EHJFwzz5X9MavqTh8UAI9D3cgynxe9buOS/qzBHhqme+4WW2dA8LBL3+fUIqv/BCSW m+HXyej1BW10e8tz/ZZ77iuyvzm+Hf0AgBGXbO1wXAzQeQ1Mmrj4zq+UubJk9pNoygIP qLg7Jnc/8g/Se8bUnrpPUa2C4GRoai+lqOcJofdU7aKg5b5W/vLpPO7PtB6wohDeqzJ3 h4SdBWCdLKsWgwkBLOaz40h/JUxQ6N+3bxp2aN7/aknI8fbA2XRjhZRvGbqBecigE02l 4zRSO1AiKsUdD2m+0wCF3jlzd54kQAnYfflEzYMbZ4LIeVMAF0QJg1uC9oDKtZYhTSmn 9scw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=y9/7rMp8wYJx+lOeR+5/3aIIgQ12D6SIhl1zOm1jjJ0=; b=l4EZBxrVdUAT9YOEWslW+DdwOBkkEdgJLOR+hO4e6IrtcLwkLGW9jFFCs9w1ebgyDa /7+W549Fp258MJYiT3S6jJCVjKS56Vk0NTh0kr9P5ixIUUhMAB7m4klBaPNWGpLh2kJz GrtoNYynLBJCdFSzU1UPpRmdf35nxtpnkqEKI40lCExLZzNKf5BHLcPabOIYziGYWhmE j0LetZChWpvjDKdSYDQBtson5kJsSHXejRS0nVT73I6azXd6dRBwkrKxJrqmw9bYjmxc JQ5U/4b+UflFQbmdsTNA5M7Q1xlKrVUqbNkEH0W7bfbqniADmtFGY565R7CoqmvIDLz1 vodQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ml11si16466059ejb.697.2020.11.18.07.34.35; Wed, 18 Nov 2020 07:34:58 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727365AbgKRPaQ (ORCPT + 99 others); Wed, 18 Nov 2020 10:30:16 -0500 Received: from mail-pl1-f174.google.com ([209.85.214.174]:33879 "EHLO mail-pl1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbgKRPaQ (ORCPT ); Wed, 18 Nov 2020 10:30:16 -0500 Received: by mail-pl1-f174.google.com with SMTP id l11so1175997plt.1; Wed, 18 Nov 2020 07:30:15 -0800 (PST) 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; bh=y9/7rMp8wYJx+lOeR+5/3aIIgQ12D6SIhl1zOm1jjJ0=; b=rpy3By+UD1kOxgi7hiWPd1IFVJwCY/eQS5UbtpYpnSMzFyTSRh8mkSEgcHISzVTPHo 416W1U1wcY1mwtr0wCsS46i/7VBNUh1dR14s7wBCrktxQtVfe1MSvxPu9fwBByl80HBf IaXW1VacHS2br/OpcSCCpXf0gnZ05Hdh/u19xEW8lUaS45l5oo1jXYIW8ays/xyamSsl UyhzH4WF3TvOnDE2cOCJi6CVVArTak6N1RJBKmbHR3rtq4YqXpAUo3dRMv/RKKQFL0c2 D0DMxfHM2LGgrYIDr+1K49aIH+/6Aemtiet08fdh42P7pSraCw2jUhAzmjRql9VwWX97 pZUw== X-Gm-Message-State: AOAM533u2qIJLVSGcP8Adc2FHA5W889J2KUPfN5NYcF/J2TGPMi74w0U VpZK9QMmVuU7Sos1AvZK3Jrj1jP02b0= X-Received: by 2002:a17:90b:3508:: with SMTP id ls8mr450885pjb.61.1605713415458; Wed, 18 Nov 2020 07:30:15 -0800 (PST) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id w127sm25641571pfc.172.2020.11.18.07.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 07:30:14 -0800 (PST) Date: Wed, 18 Nov 2020 07:30:13 -0800 From: Moritz Fischer To: richard.gong@linux.intel.com Cc: gregkh@linuxfoundation.org, mdf@kernel.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 Subject: Re: [PATCHv2 1/5] firmware: stratix10-svc: add COMMAND_AUTHENTICATE_BITSTREAM flag Message-ID: References: <1605709753-7800-1-git-send-email-richard.gong@linux.intel.com> <1605709753-7800-2-git-send-email-richard.gong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1605709753-7800-2-git-send-email-richard.gong@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 08:29:09AM -0600, richard.gong@linux.intel.com wrote: > From: Richard Gong > > Add COMMAND_AUTHENTICATE_BITSTREAM command flag for new added bitstream > authentication feature. Authenticating a bistream is to make sure a signed > bitstream has the valid signatures. > > Except for the actual configuration of the device, the bitstream > authentication works the same way as FPGA configuration does. If the > authentication passes, the signed bitstream will be programmed into QSPI > flash memory and will be expected to boot without issues. > > Clean up COMMAND_RECONFIG_FLAG_PARTIAL flag by resetting it to 0, which > aligns with the firmware settings. Should this be down with the v2: ? > > Signed-off-by: Richard Gong > --- > v2: new added > --- > include/linux/firmware/intel/stratix10-svc-client.h | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/include/linux/firmware/intel/stratix10-svc-client.h b/include/linux/firmware/intel/stratix10-svc-client.h > index a93d859..85463c8 100644 > --- a/include/linux/firmware/intel/stratix10-svc-client.h > +++ b/include/linux/firmware/intel/stratix10-svc-client.h > @@ -51,12 +51,17 @@ > #define SVC_STATUS_NO_SUPPORT 6 > > /** > - * Flag bit for COMMAND_RECONFIG > + * Flag bit for COMMAND_RECONFIG, in bit number > * > * COMMAND_RECONFIG_FLAG_PARTIAL: > - * Set to FPGA configuration type (full or partial). > + * Set for partial FPGA configuration. > + * > + * COMMAND_AUTHENTICATE_BITSTREAM: > + * Set for bitstream authentication, which makes sure a signed bitstream > + * has valid signatures before committing it to QSPI flash memory. > */ > -#define COMMAND_RECONFIG_FLAG_PARTIAL 1 > +#define COMMAND_RECONFIG_FLAG_PARTIAL 0 > +#define COMMAND_AUTHENTICATE_BITSTREAM 1 Can you explain how this commit by itself doesn't break things? Before this change firmware expected BIT(0) to be set for partial reconfiguration, now BIT(0) suddenly means authentication? How doest his work? :) Was there a firmware version change? Did this never work before? If this is version depenedent for firmware, then this might need a different compatible string / id / some form of probing? Entirely possible that I'm missing something, but it doesn't *seem* right. > > /** > * Timeout settings for service clients: > -- > 2.7.4 > Cheers, Moritz