Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5131137yba; Wed, 10 Apr 2019 12:03:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzO3KR9WpZYs+e4/WduCE55PHtPCPglv7RG2oORN2TGWp6oSpT/Ju9QhY/n0NO3BAwOcXE0 X-Received: by 2002:a63:e10b:: with SMTP id z11mr42215299pgh.46.1554922984492; Wed, 10 Apr 2019 12:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554922984; cv=none; d=google.com; s=arc-20160816; b=zBFPcE1N7rbePo4U++5NzgHzoWFdR909P1x2o2tHv9GFzYM4gd9nHyZCd8sD9e1lfa S/tZhvrMjtypICpO4tSPPAKXvpX+I7dwy7h4oOYBYZAKFMOOUHtLXIgm+9QQXfMr92z/ moObTBR7Pmnsev2VZr49Gm220wJmK7CynTTLX9aggl3RKV6MlFqO5u6lOlBTgfDnsCy4 YoKNogXAG6VW12kmRvcE64ffQl0ty4JCLPHwJP7UymTEoM7vzeX+q9/JamR+pt/e/Knm SYHuFMH/8Ja+qO1SJ5uPJc78APoB5fjZajlxefDl5DpmJLz/JDvnaQJZOzkWVyeY8Lb4 knRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9m/M8vuo72Jsa9vioWLIp/JIIiML8arN8VWeOm3+CS4=; b=T+CbnPnUx742KFe6h21aRiNMQRRyO/iuh9c2y2UyqammGFUKUPPi55cIXqpmS1DsbN dUdRwC/n5H95WmJMLNknjH0R4DtoAgn8glAKApGVpRvkbRxAsh1SM2n3OUHMhVxZy/2v JDPQqQbsaGgleazGV9FNSzYGabZejHbD3jC3BpU+uezIbactv91clQY42i+yLIa3hopq uq5b/Ir3FCnMGXhXEfsZj5tCnCcvly91RHld4d8qRC6Hdd6h3AJxbvvAe0kTaUTZ1mX9 JZpuKvm/Ab8kWuVtx93tiKv/wrkeg3UW8VFsNQiqEimL80DJrmcLqVi5WXbPIizR1CjB Y5xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FPqOm8AZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si33059419pls.183.2019.04.10.12.02.48; Wed, 10 Apr 2019 12:03:04 -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=@kernel.org header.s=default header.b=FPqOm8AZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728159AbfDJRBw (ORCPT + 99 others); Wed, 10 Apr 2019 13:01:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727464AbfDJRBu (ORCPT ); Wed, 10 Apr 2019 13:01:50 -0400 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AAB3E217F9; Wed, 10 Apr 2019 17:01:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554915709; bh=J4QhhoaGEgYso2GebNmi1v9FAxsbeQ9dqPKaFD6blFI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FPqOm8AZ2hf3cmPDnYuAeiBDcrOodV0nCwCyb+llFfEWGpmh/Xv9H8JkS5zPfi/rr BqApg+oMNgSnMQRI8FatjepBL9Z4nS0sDKSBe5OhqmAgVeXlVZgE6me9MntCAF6kEd dkG/VhijLi3UYqwENy1XNaf/OdKZd+QERBSId7B8= Received: by mail-qk1-f172.google.com with SMTP id b74so1660720qkg.9; Wed, 10 Apr 2019 10:01:49 -0700 (PDT) X-Gm-Message-State: APjAAAUL7A9o5VmhL5qp1Ssf41OkwzvL8lk487+K2fqyjCm3IFbovYr5 cfI5tlUBnZ9b6byoY098lnlF75vH2U9wYcevpA== X-Received: by 2002:ae9:e313:: with SMTP id v19mr32538761qkf.153.1554915708880; Wed, 10 Apr 2019 10:01:48 -0700 (PDT) MIME-Version: 1.0 References: <20190409184958.7476-1-sashal@kernel.org> <20190409184958.7476-2-sashal@kernel.org> <20190410161949.GC11568@sasha-vm> In-Reply-To: <20190410161949.GC11568@sasha-vm> From: Rob Herring Date: Wed, 10 Apr 2019 12:01:37 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/3] ftpm: dt-binding: add dts documentation for fTPM driver To: Sasha Levin Cc: Peter Huewe , Jarkko Sakkinen , jgg@ziepe.ca, 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 Content-Type: text/plain; charset="UTF-8" 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 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 > >> --- /dev/null > >> +++ 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. > These properties were described similarily by other interfaces (see > Documentation/devicetree/bindings/security/tpm/ibmvtpm.txt or > Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt for example). > > We could rename them all if you'd like, I was just trying to follow the > existing code. > > >What memory is used here? This should be under /reserved-memory if it > >is part of "main" memory. > > That's my understanding, yes. > > >Really, I'd prefer to not see this in DT at all. Make the firmware > >discoverable. Why repeat the mistakes of non-discoverable h/w in s/w > >interfaces? OP-Tee at least has defined a mechanism to enumerate TEE > >functions IIRC. > > Sadly the firmware already exists as-is on live hardware, there is a > paper describing it back from 2016 and we're stuck having to support > that. Does the firmware depend on this binding or the DT just gets statically populated with the address/size the firmware hardcodes? I'd prefer not to propagate the IBM binding that we were kind of stuck with. I had similar comments on it... Are there other parts of the TEE firmware that need to be described in DT? Rob