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 00CEAC433EF for ; Wed, 19 Jan 2022 16:03:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D6612831EA; Wed, 19 Jan 2022 17:03:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fastree3d.com 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=fastree3d-com.20210112.gappssmtp.com header.i=@fastree3d-com.20210112.gappssmtp.com header.b="vKf6U8Yw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 44BEE832DA; Wed, 19 Jan 2022 17:03:31 +0100 (CET) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 5E690831CA for ; Wed, 19 Jan 2022 17:03:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=fastree3d.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=adrian.fiergolski@fastree3d.com Received: by mail-lf1-x12d.google.com with SMTP id y15so2954171lfa.9 for ; Wed, 19 Jan 2022 08:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastree3d-com.20210112.gappssmtp.com; s=20210112; h=from:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:in-reply-to :content-transfer-encoding; bh=FOKEiCnJvO76ZU39s3w57rKqdHKPusVE9WkAQujsXCE=; b=vKf6U8YwrXTt6JdeZ/T6GpL01mBN7bazRzK0gVZdaMOi7C57x4LxBnT85I+32BKGNS ZbQaDC44X6nax+NCtbsWaoucygA6vIZneGbo+DpBNcgnwV++81yUMkh9kztL2gXa7h4f wifXTlcUkP0dEQCq+yo+uflup+1PTsUZeAyxi452mUu2pIYR+/evXwaAaKZC7OuhZhdd Q+sFHwRjS4DUFeAcUD2R+Zo9mJg9buFCpuQL1VYzoHUbn6CRh8Leua8VyUvr+L/zXY89 /jX8DZpiODujopFkmID13JC+IykeSjWsOSjctFA7tHSZWzmwJpI+X4hjVOVpPco9uFhb dklQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:in-reply-to :content-transfer-encoding; bh=FOKEiCnJvO76ZU39s3w57rKqdHKPusVE9WkAQujsXCE=; b=xlWapVcqT+Eg6Wztmasc1LXpmbXgU5MHUeeh1JD9xOBS/VT9AEDYrPpsqnm0FvCe4f Vn4Q8tqgDwxQbXngRrTAxZ2MFjDBKU+YqIXRVRAdINrB24kpYO5h7mbXS7WiUx8h2BqJ S+nWw/Dy/diu4uvNYJH8PXhOteODmBWLVgDvOzTBj1bsqo2rEFdSyhFltjR4+yneMOWU aZyMhBhn2L19tEoT5erIffVbWiD3UvGJ2p+ZPtdgQZBd52pzMh5MfBW8e26aI/iTN4uK GB2UnamtS5c5PTLGxi11A1q/wK2lHB716eB918PHkpU+0jvbKAdxAeSGAs0poRnlhMsJ Uxxw== X-Gm-Message-State: AOAM533A5vZqIKjkJPYdi2hXJbB+7W/WxABTSFfF62iD2dSH0bVOK/0I iiCr4A37Zh7/bCT5JQ8dsE1r X-Google-Smtp-Source: ABdhPJzxAEp167xU5Q+xVFDOS3GGc6qTMruzhArbTtb+2380sc6ybokTjmjxe+m3+pjwmgJODrh8tw== X-Received: by 2002:a05:6512:39d5:: with SMTP id k21mr24237468lfu.474.1642608207638; Wed, 19 Jan 2022 08:03:27 -0800 (PST) Received: from [192.168.0.104] ([93.174.30.54]) by smtp.gmail.com with ESMTPSA id t10sm7840lfl.78.2022.01.19.08.03.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 08:03:27 -0800 (PST) From: Adrian Fiergolski X-Google-Original-From: Adrian Fiergolski Message-ID: Date: Wed, 19 Jan 2022 17:03:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: FIT image: load secure FPGA Content-Language: en-GB To: "Jorge Ramirez-Ortiz, Foundries" , michal.simek@xilinx.com, trini@konsulko.com, sjg@chromium.org Cc: u-boot@lists.denx.de, ricardo@foundries.io, mike@foundries.io, igor.opaniuk@foundries.io References: <20211004203226.GA4704@trex> In-Reply-To: <20211004203226.GA4704@trex> Content-Type: text/plain; charset=UTF-8; format=flowed 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Jorge, Have you succeeded to enable secure boot on ZynqMP with SPL (not Xilinx's FSBL)? Is it documented somewhere? Any configuration files/yocto recipes? Have you managed to resolve problem of the bitstream loaded in such a case by SPL? I need to use an encrypted bitstream. However, it required the use of DeviceKeys in post-boot state which eventually requires secure boot. Regards, Adrian On 04.10.2021 22:32, Jorge Ramirez-Ortiz, Foundries wrote: > Hello, > > We are enabling secure boot on Zynqmp with SPL. > > The issue however is that during secure boot, the bootrom not only > validates the first loader (SPL and PMUFW combo) but it will also > expect a signed bitstream during load(FPGA). > > Since currently the SPL load of an FPGA image from FIT does not > support loading images for authentication (fpga_loads), I'd like to > discuss how to best implement such support. > > A pretty standard file.its description of the FPGA loadable looks like > this: > > fpga { > description = "FPGA binary"; > data = /incbin/("${DEPLOY_DIR_IMAGE}/${SPL_FPGA_BINARY}"); > type = "fpga"; > arch = "${UBOOT_ARCH}"; > compression = "none"; > load = <${fpgaloadaddr}>; > hash-1 { > algo = "${FIT_HASH_ALG}"; > }; > }; > > We could extend imagetool.h struct image_tool_params to add more > params or perhpas just define different 'types' of fpga? > > Something like: > "fpga" > "fpga-auth" : authenticated > "fpga-enc" : encrypted > "fpga-sec" : encrypted and authenticated > > Then it would be a matter of modifying > https://github.com/u-boot/u-boot/blob/master/common/spl/spl_fit.c#L572 > > any thoughts? > > TIA > Jorge