From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 808CE7D04D for ; Wed, 10 Apr 2019 17:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730830AbfDJR5L (ORCPT ); Wed, 10 Apr 2019 13:57:11 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:35899 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729307AbfDJR5K (ORCPT ); Wed, 10 Apr 2019 13:57:10 -0400 Received: by mail-qk1-f194.google.com with SMTP id k130so1795285qke.3 for ; Wed, 10 Apr 2019 10:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rvFEBtg/8gPu1SPiOVpApQWqwc7src0Ap4Z1oALjYi0=; b=EX2ze/6DAocz2055pAEWSuvrjiGWI6P2LQHdyigF9CLGW/hGVAATJVoaI/0ctLcV4p enIpOq3OsjgeA8tofJaLL/G7INTFaljBstYyl2dtzQ2+tO8g51e82gdwSW2QMmKRCqTI 3pPJkL8xyfL8dscXwYCu6Nbn7laB9gzLT2OvxkZfq/yshCnZua1c8wGez0NEU5KQQZiD Voxe0O4fLF+XZTlTEImSY/9Exbls1e45eROXj0mBffWi+KfLZmkPKAd+Wl/kMxUXSObr tvtu8ZyWLHTA3a8QlfmAIJQkY9CODeqYg8XOAK/BU//Z0fcWRZeAJXJnUwVHoa4qLJzK 62Ug== 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:user-agent; bh=rvFEBtg/8gPu1SPiOVpApQWqwc7src0Ap4Z1oALjYi0=; b=ep2PFC8ZlrBP3RANRxTFqOy3OoTgNR45XsiSmgvF78MLBX0z/eDKv5fSMO8nVIGin2 SI/73ESVu0r+v3SIDell90urbyYROhU11Z813F2YoVZUf+4Lz5jNmGKlv7gvl26T1Vv3 N3yUjw9AXEMPQ1BOwyQzJbteI2Ovt74ZmUMDzKftw7LdAKn5G0L0zFFDVdrrq7CoZFxB FyyI6Fi6n0PmuuwpBzhxmjdNQb5ixqhxOvxKz0sshRDJ8S050EBroCqxiS+X5ZkgDvcF 4VvLYdq7lWB0YkbtDTE9OcgH/Sz/u8vT7ix1Xiui0VUqWpIbNqHVjH4tCbL4FWsu6Xf1 pctw== X-Gm-Message-State: APjAAAV+Mg2iGXRTm5ltJfL7y4hyDVjwnyS8d/VrKyatNsPmTqxmfO9z /cqiswwjqTdIPtZr87Wj35elww== X-Google-Smtp-Source: APXvYqzHjti7rsotzy6Brc9cjV0LRaZNbg9/rET8ZBSn3KNT+vhVW5zHbMjiwy2OOmzae5gN8kGBhw== X-Received: by 2002:a37:b444:: with SMTP id d65mr34415956qkf.125.1554919029700; Wed, 10 Apr 2019 10:57:09 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-49-251.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.49.251]) by smtp.gmail.com with ESMTPSA id c21sm18785060qkm.8.2019.04.10.10.57.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2019 10:57:08 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hEHTA-00023n-9J; Wed, 10 Apr 2019 14:57:08 -0300 Date: Wed, 10 Apr 2019 14:57:08 -0300 From: Jason Gunthorpe To: Sasha Levin Cc: Rob Herring , Peter Huewe , Jarkko Sakkinen , Mark Rutland , Jonathan Corbet , Arnd Bergmann , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , Linux Doc Mailing List , linux-integrity@vger.kernel.org, linux-kernel@microsoft.com, thiruan@microsoft.com, bryankel@microsoft.com Subject: Re: [PATCH v2 1/3] ftpm: dt-binding: add dts documentation for fTPM driver Message-ID: <20190410175708.GM8997@ziepe.ca> References: <20190409184958.7476-1-sashal@kernel.org> <20190409184958.7476-2-sashal@kernel.org> <20190410161949.GC11568@sasha-vm> <20190410170316.GK8997@ziepe.ca> <20190410175359.GE11568@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190410175359.GE11568@sasha-vm> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Wed, Apr 10, 2019 at 01:53:59PM -0400, Sasha Levin wrote: > On Wed, Apr 10, 2019 at 02:03:16PM -0300, Jason Gunthorpe wrote: > > On Wed, Apr 10, 2019 at 12:01:37PM -0500, Rob Herring wrote: > > > On Wed, Apr 10, 2019 at 11:19 AM Sasha Levin wrote: > > > > > > > > On Tue, Apr 09, 2019 at 04:18:29PM -0500, Rob Herring wrote: > > > > >On Tue, Apr 9, 2019 at 1:50 PM Sasha Levin wrote: > > > > >> > > > > >> The parameters are similar to the ones used by IBM's vTPM and the > > > > >> various I2C tpm drivers. > > > > > > > > > >Bindings describe h/w (or firmware interfaces in this case), not drivers. > > > > > > > > > >> > > > > >> Signed-off-by: Sasha Levin > > > > >> .../bindings/security/tpm/tpm_ftpm_tee.txt | 13 +++++++++++++ > > > > >> .../devicetree/bindings/vendor-prefixes.txt | 1 + > > > > >> 2 files changed, 14 insertions(+) > > > > >> create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > > > > >> > > > > >> diff --git a/Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt b/Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > > > > >> new file mode 100644 > > > > >> index 000000000000..20fca67a56c4 > > > > >> +++ b/Documentation/devicetree/bindings/security/tpm/tpm_ftpm_tee.txt > > > > >> @@ -0,0 +1,13 @@ > > > > >> +Required properties: > > > > >> +- compatible: should be "microsoft,ftpm" > > > > >> +- linux,sml-base: 64-bit base address of the reserved memory allocated > > > > >> + for the firmware event log > > > > >> +- linux,sml-size: size of the memory allocated for the firmware event log > > > > > > > > > >Firmware is defining linux specific properties? What if I want to run > > > > >BSD? We should use 'reg' here instead. > > > > > > > > This is based on already existing code that defines these names, see > > > > tpm_read_log_of() in drivers/char/tpm/eventlog/of.c . > > > > > > BTW, that probably needs updating to handle endianness correctly. > > > > IIRC this legacy IBM code has broken endianness in the firmware.. > > > > All that stuff in read_log_of, and the related DT stuff, is historical > > IBM special case-ness and should not be copied into new things. > > The fTPM driver does not use it on it's own, so I guess I can just drop > this patch then? If your ARM system boots via EFI then it should pass the firmware event log through EFI mechanisms, IIRC. Otherwise maybe you could make a case for using this, but only if the old IBM stuff is perfectly emulated, bugs and all. Do you even have an event log? Jason