Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932313AbbFBOBB (ORCPT ); Tue, 2 Jun 2015 10:01:01 -0400 Received: from mout.gmx.net ([212.227.17.20]:60701 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758949AbbFBOAx (ORCPT ); Tue, 2 Jun 2015 10:00:53 -0400 MIME-Version: 1.0 Message-ID: From: "Peter Huewe" To: "Jarkko Sakkinen" Cc: "Jarkko Sakkinen" , "Marcel Selhorst" , "Jason Gunthorpe" , "moderated list:TPM DEVICE DRIVER" , "open list" Subject: Aw: [PATCH] tpm, tpm_crb: migrate to struct acpi_table_tpm2 and acpi_tpm2_control Content-Type: text/plain; charset=UTF-8 Date: Tue, 2 Jun 2015 16:00:37 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <1432915058-5598-1-git-send-email-jarkko.sakkinen@linux.intel.com> References: <1432915058-5598-1-git-send-email-jarkko.sakkinen@linux.intel.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K0:SNUwjofP8KSPedykGcIhhzUQ54zEC4BJcH7i03yqv5e LR1a1RNtkbumefIZ4YD1y/mUAybJK/heXbx4U4WF56iqpPbsPQ jtco6RxAzsf9xIGHQE0Vrayxal7a9EG45H7x26YbIti2Ubzhu0 YubCBmmrxSt9qJ61DP8mgU3Yvcz4bWGmhv9Gqru3TEx1IfSd7P aywuSthgsD7ca8FLgLDIW30qXbGE2Pj+AFQnu+4HUXVHKsbULi 7lCBI+pvUnLDRalsUSHPygTPbAWC2AbEmCalTFnuww6DMLIJo+ CJ3DGU= X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1499 Lines: 53 Hi >Betreff: [PATCH] tpm, tpm_crb: migrate to struct acpi_table_tpm2 and acpi_tpm2_control > Migrate to struct acpi_table_tpm2 and struct acpi_tpm2_control defined > in include/acpi/actbl3.h from the internal structures. I definitely do like the idea! Thanks for spotting this! However one small remark > -struct crb_control_area { > - u32 req; > - u32 sts; > - u32 cancel; > - u32 start; > - u32 int_enable; > - u32 int_sts; > - u32 cmd_size; > - u64 cmd_pa; > - u32 rsp_size; > - u64 rsp_pa; > -} __packed; > - > > - if (le32_to_cpu(ioread32(&priv->cca->sts)) & CRB_CA_STS_ERROR) > + if (le32_to_cpu(ioread32(&priv->ctl->error)) & CRB_CA_STS_ERROR) > return -EIO; I know the fields are described in include/acpi/actbl3.h as +struct acpi_tpm2_control { + u32 reserved; + u32 error; + u32 cancel; + u32 start; + u64 interrupt_control; + u32 command_size; + u64 command_address; + u32 response_size; + u64 response_address; +}; but are the names there still correct? Isn't this information outdated? The acpi spec refers to the MS spec which is not present anymore, and MS refers to the TCG -- and in the PTP your names are used. ---> We should update the ACPI header? At least the naming for reserved and error. What do you think? Thanks, Peter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/