From patchwork Thu Apr 20 12:29:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T . Ivanov" X-Patchwork-Id: 675717 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1BF4C77B7C for ; Thu, 20 Apr 2023 12:29:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231820AbjDTM3t (ORCPT ); Thu, 20 Apr 2023 08:29:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbjDTM3s (ORCPT ); Thu, 20 Apr 2023 08:29:48 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E4A35FEA for ; Thu, 20 Apr 2023 05:29:45 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7143D219FF; Thu, 20 Apr 2023 12:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681993784; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n7KqzZ53Bqetayq7fLUITqZmZD9Kd9Jl8L8VLaUQzHM=; b=KCbZGP1+PpPX8QfoEh/2gGuzNBqeyu5sTWF/7diLKSbP8xZbMisn6uxjldzwW1PTA17tnH lD9fAKSohdHEs38gVc83Xfil6KISa4SmXm3BvU+3rUWxLlZBuof2J0BBAfNBs8FNc8VUHr pfiwqPG+XiKQrGgyGSLeBwcXa/eJZt0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681993784; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n7KqzZ53Bqetayq7fLUITqZmZD9Kd9Jl8L8VLaUQzHM=; b=a6o5UBbQnyceSVkmX2w8xUbJrx4M99I2Svvdf6rNUYmHMZR+Mb7q6YOPOU4N1/xF9q87RM wfba/cdUsbh88YAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 57F0D1333C; Thu, 20 Apr 2023 12:29:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wFNUFTgwQWSueQAAMHmgww (envelope-from ); Thu, 20 Apr 2023 12:29:44 +0000 From: "Ivan T. Ivanov" To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski Cc: Nicolas Saenz Julienne , Florian Fainelli , Stefan Wahren , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Tim Gover , "Ivan T . Ivanov" Subject: [PATCH v3 2/3] ARM: dts: Add nvmem node for BCM2711 bootloader public key Date: Thu, 20 Apr 2023 15:29:23 +0300 Message-Id: <20230420122924.37997-3-iivanov@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230420122924.37997-1-iivanov@suse.de> References: <20230420122924.37997-1-iivanov@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Tim Gover Make a copy of the bootloader secure-boot public key available to the OS via an nvmem node. The placement information is populated by the Raspberry Pi firmware[1] if a public key is present in the BCM2711 bootloader EEPROM. [1] https://www.raspberrypi.com/documentation/computers/configuration.html#nvmem-nodes Signed-off-by: Tim Gover [iivanov] Added link to documentation. Signed-off-by: Ivan T. Ivanov --- arch/arm/boot/dts/bcm2711-rpi.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711-rpi.dtsi b/arch/arm/boot/dts/bcm2711-rpi.dtsi index 98817a6675b9..e30fbe84f9c3 100644 --- a/arch/arm/boot/dts/bcm2711-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2711-rpi.dtsi @@ -15,6 +15,7 @@ aliases { ethernet0 = &genet; pcie0 = &pcie0; blconfig = &blconfig; + blpubkey = &blpubkey; }; }; @@ -67,6 +68,19 @@ blconfig: nvram@0 { no-map; status = "disabled"; }; + + /* + * RPi4 will copy the binary public key blob (if present) from the bootloader + * into memory for use by the OS. + */ + blpubkey: nvram@1 { + compatible = "raspberrypi,bootloader-public-key", "nvmem-rmem"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x0 0x0 0x0>; + no-map; + status = "disabled"; + }; }; &v3d {