Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp348483pxb; Wed, 18 Nov 2020 06:13:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyI28nzIUKtYXu+EGrQGNYaAsWIxdrxnKEGh6gTvp45bsXaQSJ02muQqTgXh+bOKAhCm8NH X-Received: by 2002:a50:a40a:: with SMTP id u10mr25293761edb.16.1605708802004; Wed, 18 Nov 2020 06:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605708801; cv=none; d=google.com; s=arc-20160816; b=NmDczfZcde8ZwWWwS56p1OJz6QGhzDqZvWdl/Khh9hHjGjM/fEZa+b5AjcKZ/py1AH MA/45z4ek58mEi7qfmxzls3Ffkgo/UYb/NvEfYU5rQTThfGun2Q0gVfOIvAycEy9eou7 f9HmM8rZAvxI8iEPk9tSKvTIKNUd4HZ15Bs8UrNkfjB+klwSzRQjaFJZYkZZPaPw8AQt aGKXiUsjDwQva4aSisUgsCnMQNStTspP8lUR84BLkI8xLHNDmNjaSkBt7LLMWXQp8yYB Jwp1PlA3HmpnjU7C8WrI1g2/LFIGh12kdspAekqXEcvCScwtbMawS4bc1om+GKYGytrN rL5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=QaUEWU0GHb1+TLhp69CG7LQussi6XeYni/STEkQsYjk=; b=E0A3aDeswlGsSJDNWEoY7+UVr/i9I9Hg6uF6I4v1qB9HaLFIpqOYPKTG9D3yDRz+MH ch6mjkVVIHNNM4q+jefbXF2urShD0eHdwL4I/ZhhE4HGkF1FaKkl9EXANOUcWsEjnrnw ogysKpzKtxanwXbGH9ryrcQquCT6q/TsdObuwfcHbfWw0cOQ5sG/7Ba2hA4nhmForhVj td+U4YmpXOLxdo5JM0cVW3PWkwx1j7rKDOf8WS2pMtnt8YACu4AoRiDeemlLbzGgQh40 78rUrr4v9ZwEyjy5XviAmziv/gEUldNUmx40Lt3WTHxPQ30f2bSFAD/YzYk+GtvZuCNm z8CQ== 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 r22si15349567ejc.124.2020.11.18.06.12.59; Wed, 18 Nov 2020 06:13:21 -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 S1726789AbgKROJF (ORCPT + 99 others); Wed, 18 Nov 2020 09:09:05 -0500 Received: from mga18.intel.com ([134.134.136.126]:44063 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726714AbgKROJD (ORCPT ); Wed, 18 Nov 2020 09:09:03 -0500 IronPort-SDR: 3qMAYDVavMqhB0i4fbq04ncevTUdLdCucjkKeHlqZ3z+/yL0cEalEFW6IlBLx+Es4mtg+pPakk aoQWudk/m5ZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="158892815" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="158892815" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 06:09:02 -0800 IronPort-SDR: g91f9M9sTZQ1rAMbTLTHR7LaKCSrbyLbvXkY71SghjPqQOc9S3bSMrdnz2cQ63rNvkCnDNgPeS P9xuzVTYSgmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="325596908" Received: from marshy.an.intel.com ([10.122.105.143]) by orsmga003.jf.intel.com with ESMTP; 18 Nov 2020 06:09:02 -0800 From: richard.gong@linux.intel.com To: gregkh@linuxfoundation.org, mdf@kernel.org, trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dinguyen@kernel.org, sridhar.rajagopal@intel.com, richard.gong@linux.intel.com, richard.gong@intel.com Subject: [PATCHv2 3/5] fpga: of-fpga-region: add authenticate-fpga-config property Date: Wed, 18 Nov 2020 08:29:11 -0600 Message-Id: <1605709753-7800-4-git-send-email-richard.gong@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1605709753-7800-1-git-send-email-richard.gong@linux.intel.com> References: <1605709753-7800-1-git-send-email-richard.gong@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Gong Add authenticate-fpga-config property to support FPGA bitstream authentication, which makes sure a signed bitstream has valid signatures. Signed-off-by: Richard Gong --- v2: changed in alphabetical order --- drivers/fpga/of-fpga-region.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c index e405309..3840883 100644 --- a/drivers/fpga/of-fpga-region.c +++ b/drivers/fpga/of-fpga-region.c @@ -219,6 +219,9 @@ static struct fpga_image_info *of_fpga_region_parse_ov( info->overlay = overlay; /* Read FPGA region properties from the overlay */ + if (of_property_read_bool(overlay, "authenticate-fpga-config")) + info->flags |= FPGA_MGR_BITSTREM_AUTHENTICATION; + if (of_property_read_bool(overlay, "partial-fpga-config")) info->flags |= FPGA_MGR_PARTIAL_RECONFIG; -- 2.7.4