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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F995C433F5 for ; Tue, 31 May 2022 23:08:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 313FC83ED5; Wed, 1 Jun 2022 01:08:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="eeZw/tIy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29C8983E92; Wed, 1 Jun 2022 01:08:47 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4A50783E43 for ; Wed, 1 Jun 2022 01:08:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io Received: by mail-wm1-x32d.google.com with SMTP id c5-20020a1c3505000000b0038e37907b5bso2065850wma.0 for ; Tue, 31 May 2022 16:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zh3BtrPpPqNvnGOWEbSwcqNtE6xgJ9cmYJYzZjlbLGc=; b=eeZw/tIyQ2Nwhd/eMwsr+MaXTMS1GI/+n2v6tKs2M2ATgi5sNktNfEjW+MnNFWqYzV Sb8l4BKDVFvvoia28/mZQ+oR4JfRzt0ZbpSHCgR5M0BRekew9CQhKW45bIojNFAHNpwu uH06Jm3KbL79tBUmg+Uw2HDyzDF1BN5U2VK1uOyGCYrzNJH5pNn30jsy9Wh/u87i1ufu NetBOWiVFZ+tLqDtW1qsloQm7VqgEshpZ2/0L3/6Kmgm5adREF23HQDPsamJsTkx+sql Pxj4J2ptuUxgqjB/f5R8VWzlOTqGWs0XPRq0b7XeHZ0S65OnAUhck//yve5XBtFBZzx/ Mlmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zh3BtrPpPqNvnGOWEbSwcqNtE6xgJ9cmYJYzZjlbLGc=; b=k3Co+Xo5UUu7NQSYsFlWee80TaX4IRAMxWsvp981eN99EMmd4wapv3UNJOOisuTz2W 0V1d7sb3+Syv6OvUWOQ5lf2kGIs0/iVS2q+/EjTg9bKs8dBUgjpFXu/vtgscBUcr1YVn ka+n9Ok/J9yysWSaHSpWjd80yKgq4H+ZQeyoKMbPs2VvAsCb+ukqOGdxHXNvVV6wXOFZ V0E0AMYVysvpI1+o/EAT9hSED6TEnUTko5poJfahTPAZSrfFhS0AQ4y9zdigmcGpYC8M Nx1B4f0joszdBpIqwC9I0FSeZFTJcKcV8LaZnVJxkAjK/GAZLE59RDpC8wlABk5t0jSe P7Kw== X-Gm-Message-State: AOAM530w/qf/wwTUqmEATLCFH4wP30urg4rrck8L3tMhcQAZaNKx02z3 2o8/vo2attu62sXgQ/KTjcvGGDspHCo5+w== X-Google-Smtp-Source: ABdhPJzDID+lnUpMcEcTZZ7AFN/6oOUVzFHQGcObrboDgMt/cBBMhy8wofHC1B6ws7j426MSotpcHQ== X-Received: by 2002:a05:600c:4f96:b0:397:652a:69d0 with SMTP id n22-20020a05600c4f9600b00397652a69d0mr25362223wmq.16.1654038523505; Tue, 31 May 2022 16:08:43 -0700 (PDT) Received: from cryobook.. ([93.188.34.55]) by smtp.gmail.com with ESMTPSA id j12-20020a5d618c000000b002102f4ebf73sm7673539wru.31.2022.05.31.16.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 16:08:42 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Michal Simek , Adrian Fiergolski , Ricardo Salveti , Jorge Ramirez-Ortiz , Igor Opaniuk , Oleksandr Suvorov , Alexandru Gagniuc , Artem Lapkin , Ashok Reddy Soma , Heiko Schocher , Heinrich Schuchardt , Leo Yu-Chi Liang , Lokesh Vutla , Masahisa Kojima , Michal Simek , Nishanth Menon , Ovidiu Panait , Simon Glass , Steffen Jaeckel Subject: [PATCH v8 00/14] fpga: zynqmp: Adding support of loading authenticated images Date: Wed, 1 Jun 2022 02:08:25 +0300 Message-Id: <20220531230839.183690-1-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This patchset introduces support for the authenticated and encrypted FPGA images on ZynqMP boards, besides that introducing common way to pass the compatible property to any fpga driver. It bases on the initial work by Jorge Ramirez-Ortiz https://patchwork.ozlabs.org/project/uboot/patch/20211015091506.2602-1-jorge@foundries.io/ https://patchwork.ozlabs.org/project/uboot/patch/20211005111324.19749-3-jorge@foundries.io/ Changes in v8: - Michal Simek's suggestions addressed: -- introduce the compatible flags in xilinx_desc; -- pass a binary compatible flag instead of "compatible" property to an FPGA driver. - Optimize a zynqmp_load() function. Changes in v7: - apply Michal Simek's suggestions As I applied changes on Oleksandr's patches, I indicated it by specifying myself as co-author in the commits logs. I am not sure if that is the convention of marking it. Changes in v6: - add support for the encrypted bitfiles. Changes in v5: - replace ifdef with if() where it's possible. Changes in v4: - change interface to xilinx_desc->operations->open() callback. - fix a bug from previous version of the patchset in dereferencing of a parent fpga_desc structure. Changes in v3: - remove the patch which introduced CMD_SPL_FPGA_LOAD_SECURE. - fix mixing definitions/declarations. - replace strcmp() calls with more secure strncmp(). - document the "u-boot,zynqmp-fpga-ddrauth" compatible string. - fix code style by check-patch recommendations. Changes in v2: - add function fit_fpga_load() to simplify calls of fpga_load() from contexts without a compatible attribute. - move all ZynqMP-specific logic to drivers/fpga/zynqmppl.c - prepare for passing a "compatible" FDT property to any fpga driver. Adrian Fiergolski (1): fpga: zynqmp: support loading encrypted bitfiles Oleksandr Suvorov (12): fpga: add option for loading FPGA secure bitstreams fpga: xilinx: add missed identifier names fpga: xilinx: add bitstream flags to driver desc fpga: zynqmp: add str2flags call fpga: add fpga_compatible2flag fpga: xilinx: pass compatible flags to xilinx_load() fpga: pass compatible flags to fpga_load() spl: fit: pass real compatible flags to fpga_load() fpga: xilinx: pass compatible flags to load() callback fpga: zynqmp: optimize zynqmppl_load() code fpga: zynqmp: add bitstream compatible checking fpga: zynqmp: support loading authenticated images Tom Rini (1): Prepare v2022.07-rc3 Makefile | 2 +- boot/Kconfig | 4 +- boot/image-board.c | 4 +- cmd/Kconfig | 3 +- cmd/fpga.c | 8 +-- common/spl/spl_fit.c | 16 +++-- doc/uImage.FIT/source_file_format.txt | 7 +- drivers/fpga/Kconfig | 14 ++++ drivers/fpga/fpga.c | 33 +++++++++- drivers/fpga/spartan2.c | 2 +- drivers/fpga/spartan3.c | 2 +- drivers/fpga/versalpl.c | 2 +- drivers/fpga/virtex2.c | 2 +- drivers/fpga/xilinx.c | 8 +-- drivers/fpga/zynqmppl.c | 93 ++++++++++++++++++++++----- drivers/fpga/zynqpl.c | 2 +- include/fpga.h | 4 +- include/versalpl.h | 2 +- include/xilinx.h | 19 ++++-- include/zynqmppl.h | 3 +- 20 files changed, 178 insertions(+), 52 deletions(-) -- 2.36.1