Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5135305yba; Wed, 10 Apr 2019 12:08:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRTx6RiduLkGbot1HMBFINIeIbOkHyVCGj02LgLuTIHkhFnhahaFRIl9SBImxrvrZmvoak X-Received: by 2002:a63:6f0a:: with SMTP id k10mr41750917pgc.78.1554923295120; Wed, 10 Apr 2019 12:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554923295; cv=none; d=google.com; s=arc-20160816; b=RYNtDaELz6TSJQ3kCy6uOANvy7lYlm9HDGvI06+hZZqdAWscIJDU/MnEpTaISHnv6e mibSfKBH3Bwhswqno1Zt7q6TPtF82nl8bDTlOM9RJ9Pdg10NSpyXnQGW2wkPmNt6O9Oc paXFRckXVzxb4FVXMYH4cKh52QhcHi5TsPPYOgeRFFHvQaEFOgj3AZoec5oLD61cWyyM 4ChiLoQbSPcrNbWX1rU3ufQFjBCp5eS2dNZ1btm4Rf42DHbft0ZhBWIn2SBf/Cdlcdd8 lp9ri7z68Fl5GTUhPE3sNBCl6d9ggv7wM5Edm9C1h8H03ARaPSzJ3m4ylOvUCdSg9FmB eHeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rvFEBtg/8gPu1SPiOVpApQWqwc7src0Ap4Z1oALjYi0=; b=s4lTqZec39HO004GGPgkJfaB3f53jiyL0KTJ5QBkQF/HwUm9I4BmvDEhL0yFdz52pr LUN3WsUT2Gb7vTkE3m04+E5+3Zq31cW+myKGEorR+LEZS4PLWhGurLpte6ZCGBFTHUCt PTMhpu6zNXhp84RbedZ/BcCx4AOzk7RzPJD3P05nq9MbMd03J6u3cHduGBsrE63PPZOl KSSl94OeikjWd/+HFBWVyxfzec+wQ4dv0YORvs07Sh8xLkfqguG9yjiA9pkMRG8ig/2/ NsE9IVo2C5SxvQgajxTAGgPcMV+xGsM9or1o0JR3hGx4eMmb3jodkDffb8z/YVHV7MI9 ndSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="EX2ze/6D"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si24316604pgc.62.2019.04.10.12.07.59; Wed, 10 Apr 2019 12:08:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="EX2ze/6D"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730869AbfDJR5L (ORCPT + 99 others); Wed, 10 Apr 2019 13:57:11 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:42850 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730819AbfDJR5L (ORCPT ); Wed, 10 Apr 2019 13:57:11 -0400 Received: by mail-qk1-f195.google.com with SMTP id b74so1775574qkg.9 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=thk4VFYIa2pU8SoelM1a3PmaMFwzpfP3I8MR33zg2t5vMFl4H3ojaY+c5SB+6T1j5y KiIyOvvgh47KCybEkMgA3jj26SdYsx+DBeDz6zfrntDjO7qnF4A291uOU5a6y3AmVPW6 Zgo+bydgg1ccpKLifFooEk1Xfg+QGacchzel4a0x2X8JO5SCtow8Vz6TOXOGAVKXCxzy Eq512BGwoPpBrrMvICP32JhHWDHrkenf3Ruwhj5USdKjEo7e8SXqBh4YLi+z7XO6pIsB n5MQJhOkiLA5eVo8fu3Cc/217euIXdU+DO9Uew94b71yFPTreyI1S83/ZE+F5fBXOVqD 7PnA== X-Gm-Message-State: APjAAAXuXMwYjC3zLZu15YfiNFHyhkjrOcRO/AMh97x2UrP41ynFAG8M b0JNGExrm5gNIzyby3otOwvh5g== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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