From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F7D1C433E0 for ; Fri, 22 Jan 2021 05:18:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A64A23381 for ; Fri, 22 Jan 2021 05:18:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A64A23381 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UkuXJe8flqr1yF3mE44dfdy+AAUjVrjdVEdYRYmUL0U=; b=C1zf/YDyJayIDE+O8tFDLLBw0 HfbWQPHZmWIG1VDUpKlzqKxthbQcnapZBpzCg/pIPbycOKVBGVMgObRq5RTNbtzoXb+PoJ8+OyFKW t5p7Iv114niarRLD4H0Q5MUyefV4jN/Xny5+5TZxP8/TQR1WYITbGOSfKEAcRBpsCH7UPQuNE3Dx8 5M7m+o7MPRrPuOQaypwSwEb4PMwwsyi2u2QltlnrLDjVtLffpZ2aG2LCHP0h05yqpdOvybrtc8DRq J+7NZLks1suk6MvFqIgQTYvPq18XF2HWBrO70EnCYpSHDyTKm/DQ9oVGRzteA7CEwPFwt9rgpgjzm kkDM1Xv7w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2oou-0001mr-EU; Fri, 22 Jan 2021 05:17:16 +0000 Received: from mail-pj1-f52.google.com ([209.85.216.52]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2oos-0001mR-5N for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 05:17:14 +0000 Received: by mail-pj1-f52.google.com with SMTP id u4so3088459pjn.4 for ; Thu, 21 Jan 2021 21:17:13 -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=6N5TXJ6yeDofpR8GczZbN8MhQVoOYTknC4OkzyK0VI0=; b=NSsYAEiTTASk4tw3vhcr2UZG5d7Man2h6lqmIRqxxSE9pp1z0iRdtCFBUuw+zAHH5l 0z39eekkK8ax0Ybnmh57OhNzb8J9ffpSx7kpMKVNeN/fJNvdEAEdYi6JmXt4ZDobx1B0 Faxp0oP3EPeUJJI+kDw1PljM7X5kAvwNhTyCz0yZIXI30rQvjbgqTO3i5mHZko3vXRGY 7xDmQny0c/paI6vAtax12NEhxNjdUfb/2Jtv1e21KcjilUrbbXj/hWRHYbg0QqyBz6Kl PVBatHwH3/vYC/bJG6WFa49raSvHY4H7AhodiFBq24lL9vkNW7dWcCm5d1VT1HK571zx wQ5w== X-Gm-Message-State: AOAM530YZhNsoeRZPQFgl0Y4Yza2sEHwUw9OPCTGEX8Xyw8W5VW3Og5t +//+CIaOXBDv1ppu3zoNFSs= X-Google-Smtp-Source: ABdhPJzZqdfEXnKRH17QQSUd97gL9kLCf7mSygNMIaNfZJoW2mQsbnwaUmDee7o4T0jZcW6cZYyOEA== X-Received: by 2002:a17:90a:de97:: with SMTP id n23mr3405825pjv.216.1611292633004; Thu, 21 Jan 2021 21:17:13 -0800 (PST) Received: from localhost ([2601:647:5b00:1162:1ac0:17a6:4cc6:d1ef]) by smtp.gmail.com with ESMTPSA id m195sm7585191pfd.215.2021.01.21.21.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 21:17:12 -0800 (PST) Date: Thu, 21 Jan 2021 21:17:10 -0800 From: Moritz Fischer To: Nava kishore Manne Subject: Re: [PATCH 1/2] fpga: mgr: Adds secure BitStream loading support Message-ID: References: <20210118025058.10051-1-nava.manne@xilinx.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210118025058.10051-1-nava.manne@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_001714_217993_E1AD747F X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, trix@redhat.com, linux-fpga@vger.kernel.org, michal.simek@xilinx.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, mdf@kernel.org, git@xilinx.com, linux-arm-kernel@lists.infradead.org, chinnikishore369@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 18, 2021 at 08:20:57AM +0530, Nava kishore Manne wrote: > This commit adds secure flags to the framework to support > secure BitStream Loading. > > Signed-off-by: Nava kishore Manne > --- > drivers/fpga/of-fpga-region.c | 10 ++++++++++ > include/linux/fpga/fpga-mgr.h | 12 ++++++++++++ > 2 files changed, 22 insertions(+) > > diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c > index e405309baadc..3a5eb4808888 100644 > --- a/drivers/fpga/of-fpga-region.c > +++ b/drivers/fpga/of-fpga-region.c > @@ -228,6 +228,16 @@ static struct fpga_image_info *of_fpga_region_parse_ov( > if (of_property_read_bool(overlay, "encrypted-fpga-config")) > info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM; > > + if (of_property_read_bool(overlay, "userkey-encrypted-fpga-config")) > + info->flags |= FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM; Can this just be encrypted-fpga-config/FPGA_MGR_ENCRYPTED? > + > + if (of_property_read_bool(overlay, "ddrmem-authenticated-fpga-config")) > + info->flags |= FPGA_MGR_DDR_MEM_AUTH_BITSTREAM; > + > + if (of_property_read_bool(overlay, > + "securemem-authenticated-fpga-config")) > + info->flags |= FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM; > + > if (!of_property_read_string(overlay, "firmware-name", > &firmware_name)) { > info->firmware_name = devm_kstrdup(dev, firmware_name, > diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h > index 2bc3030a69e5..2f7455a60666 100644 > --- a/include/linux/fpga/fpga-mgr.h > +++ b/include/linux/fpga/fpga-mgr.h > @@ -67,12 +67,24 @@ enum fpga_mgr_states { > * %FPGA_MGR_BITSTREAM_LSB_FIRST: SPI bitstream bit order is LSB first > * > * %FPGA_MGR_COMPRESSED_BITSTREAM: FPGA bitstream is compressed > + * > + * %FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM: indicates bitstream is encrypted with > + * user key > + * > + * %FPGA_MGR_DDR_MEM_AUTH_BITSTREAM: do bitstream authentication using DDR > + * memory if supported > + * > + * %FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM: do bitstream authentication using secure > + * memory if supported > */ > #define FPGA_MGR_PARTIAL_RECONFIG BIT(0) > #define FPGA_MGR_EXTERNAL_CONFIG BIT(1) > #define FPGA_MGR_ENCRYPTED_BITSTREAM BIT(2) > #define FPGA_MGR_BITSTREAM_LSB_FIRST BIT(3) > #define FPGA_MGR_COMPRESSED_BITSTREAM BIT(4) > +#define FPGA_MGR_USERKEY_ENCRYPTED_BITSTREAM BIT(5) > +#define FPGA_MGR_DDR_MEM_AUTH_BITSTREAM BIT(6) > +#define FPGA_MGR_SECURE_MEM_AUTH_BITSTREAM BIT(7) > > /** > * struct fpga_image_info - information specific to a FPGA image > -- > 2.18.0 > Thanks, Moritz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel