From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvai6-0002MD-0E for qemu-devel@nongnu.org; Thu, 21 May 2015 20:21:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvai1-0005UJ-0E for qemu-devel@nongnu.org; Thu, 21 May 2015 20:21:09 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:48979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvai0-0005UA-Ot for qemu-devel@nongnu.org; Thu, 21 May 2015 20:21:04 -0400 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 May 2015 18:21:02 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 75B2B3E4003E for ; Thu, 21 May 2015 18:21:00 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t4M0Kmmc47972552 for ; Thu, 21 May 2015 17:20:48 -0700 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t4M0L03Y024767 for ; Thu, 21 May 2015 18:21:00 -0600 Message-ID: <555E766B.40106@linux.vnet.ibm.com> Date: Thu, 21 May 2015 20:20:59 -0400 From: Stefan Berger MIME-Version: 1.0 References: <1431101720-701152-1-git-send-email-stefanb@linux.vnet.ibm.com> <1431101720-701152-4-git-send-email-stefanb@linux.vnet.ibm.com> <20150515171332.7ae7813f@nial.brq.redhat.com> In-Reply-To: <20150515171332.7ae7813f@nial.brq.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/6] Support Physical Presence Interface Spec List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: kevin@koconnor.net, stefanb@us.ibm.com, qemu-devel@nongnu.org, quan.xu@intel.com, mst@redhat.com On 05/15/2015 11:13 AM, Igor Mammedov wrote: > >> + Field(HIGH, AnyAcc, NoLock, Preserve) { >> + SIG1, 32, >> + SIZE, 16, >> + CODE, 8, >> + SUCC, 8, >> + CODO, 8, >> + RESP, 32 >> + } >> + // Check signature and sufficient space >> + If (LAnd( >> + LEqual(SIG1, TCG_MAGIC), > using SIG1 seems to be redundant now, the same goes for BIOS part. > Why just not drop it? I would like to keep the signature as an indicator that the BIOS has initialized the memory. Would that be acceptable ? QEMU provides the ACPI, the BIOS is indep. of it and the OS only sees what QEMU has provided. The OS wouldn't know whether there's a BIOS that supports it what the ACPI indicates. > > } > diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h > index 6d516c6..8d9c8dc 100644 > --- a/include/hw/acpi/tpm.h > +++ b/include/hw/acpi/tpm.h > @@ -31,4 +31,24 @@ > > #define TPM2_START_METHOD_MMIO 6 > > +/* > + * Physical Presence Interface -- shared with the BIOS > + */ > +#define TCG_MAGIC 0x41504354 > + > +#if 0 > +struct tpm_ppi { > + uint32_t sign1; // TCG_MAGIC > + uint16_t size; // number of subsequent bytes for ACPI to access > + uint8_t opcode; // set by ACPI > + uint8_t failure; // set by BIOS (0 = success) > + uint8_t recent_opcode; // set by BIOS > + uint32_t response; // set by BIOS > + uint8_t next_step; // BIOS only > + uint32_t sign2; // TCG_MAGIC > +} QEMU_PACKED; > +#endif I removed sign2 from the SeaBIOS code, so only 1 signature. Stefan